?
Solved

need a script to Moniter  zombie process

Posted on 2008-02-07
6
Medium Priority
?
273 Views
Last Modified: 2013-12-11
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 .
0
Comment
Question by:TheMajestic
  • 3
  • 2
6 Comments
 
LVL 40

Expert Comment

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

http://en.wikipedia.org/wiki/Zombie_process
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 20853830
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
 
LVL 41

Expert Comment

by:HonorGod
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.,
  >./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 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.

 
LVL 4

Author Comment

by:TheMajestic
ID: 20864643
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
 
LVL 40

Accepted Solution

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

0
 
LVL 41

Expert Comment

by:HonorGod
ID: 20920078
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

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