need a script to Moniter zombie process


  i am having WebSphere AppServer and sometimes in my application AppServer Zombie process are created , i need to moniter the zombie process of my AppServer . can anyone help me to do it?.

thanks in advance .
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you want, you can run a script that will keep running ps command and grep for Z in the STAT field. Z indicates a zombie process.
HonorGodSoftware EngineerCommented:

What version of WebSphere are we talking about?

What kind and version of Unix are you using?

Do you know what kind of processes these are?

I'm trying to understand what is occurring, because this is an unexpected situation.

The best solution, in my opinion, would be to understand how and why the zombie processes are getting created, so that the underlying issue could be resolved.
HonorGodSoftware EngineerCommented:
I wonder if this is related to a known issue with WebSphere?

- First, find the version of WebSphere being used:

- Open a command prompt, and "cd" to the AppServer/bin directory. e.g.,
  > cd /opt/IBM/WebSphere/Appserver/bin

- Execute "versionInfo" command script to display the version information.  e.g.,

- Point your browser to the WebSphere Application Server support site:

- Locate & use the "Recommended fixes" link (in the "Download" section)
- Use the version specific link at the top of the page to position the screen to the
  table of information related to the version in question (e.g., "Version 6.1")
- See if you are at (or near) the "latest" available version of the product (e.g., "")

- If not, use the Operating System specific link to open the page specific for the OS in question
  e.g., "AIX"
  Note: You will need to stop all WebSphere related processes (even zombies) before fixes
            can be installed.
- Review the details available on the page to find out how to install the update
- If necessary, you may need to install the latest version of the "Update Installer" program first
- Retrieve, and install the Application Server fixes, and possibly the SDK updates
- Verify the successful installation of the updates
- start you application server process, and monitor them to see if the issue has been resolved.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

TheMajesticAuthor Commented:
  The situation is something like this . when i restart the application, the old Appserver process is not getting killed . so now i have 2 Appserver process in my system . and both the appserver's are trying to access same log files .

So i want to write a script which sends me mail when more than 1 Appserver process is running .

You may run script like this:

c=`/usr/bin/ps -ef | /usr/bin/grep -v grep | /usr/bin/grep Appserver | wc -l`
if test $c -gt 1
echo $c processes are running | /usr/bin/mail user@domain


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HonorGodSoftware EngineerCommented:

your use of this idiom is somewhat problematic:

/usr/bin/grep -v grep | /usr/bin/grep Appserver

since the second "grep" process would not be filtered by the "grep -v grep" since that second grep is not active to be filtered.

A better way would be to use something like:

/usr/bin/grep [A]ppserver

since the grep process will not match the string for which you are searching (i.e., "Appserver").
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.