need a script to Moniter zombie process

hi,

  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 .
LVL 4
TheMajesticAsked:
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.

omarfaridCommented:
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.

http://en.wikipedia.org/wiki/Zombie_process
0
HonorGodSoftware EngineerCommented:
Interesting.

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.
0
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.,
  >./versionInfo.sh

- Point your browser to the WebSphere Application Server support site:
  http://www.IBM.com/software/webservers/appserv/was/support/

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

- 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.
0
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:
hi,
 
  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 .


 
0
omarfaridCommented:
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
then
echo $c processes are running | /usr/bin/mail user@domain
fi

0

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:
omarfarid:

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