need a script to Moniter  zombie process

Posted on 2008-02-07
Medium Priority
Last Modified: 2013-12-11

  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 .
Question by:TheMajestic
  • 3
  • 2
LVL 40

Expert Comment

ID: 20852808
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.

LVL 41

Expert Comment

ID: 20853830

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.
LVL 41

Expert Comment

ID: 20853948
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 new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Author Comment

ID: 20864643
  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 .

LVL 40

Accepted Solution

omarfarid earned 2000 total points
ID: 20865302
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

LVL 41

Expert Comment

ID: 20920078

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").

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
No other job is as rewarding and demanding as building an iPhone app is. It is not really in the hands of the developer for the success of an iPhone app. Many factors operate jointly for every iOS application's success in the market.
Starting up a Project
Loops Section Overview

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question