[gllug] ps oddities

Steve Nelson sanelson at gmail.com
Wed Mar 23 20:15:15 UTC 2005


Hello All,

I'm trying to understand why the output of ps differs so much when
using the Unix98 options and BSD options.

eg - busy redhat app server; lets look for some java processes.  I
know that this machine is running tomcat, netiq and sitescope, all of
which should show up as java processes.

Here are example processes genereated by ps ax:

7098 ?        S      0:00 /local/netiq/UnixAgent/../jre/bin/java -Djava.netiq.h
8045 ?        S      0:00 /local/SiteScope/java/bin/exe/java -Xmx96m -Dsun.net.
31882 pts/1    S      0:04 /usr/j2sdk1.4.2_03/bin/java -Djava.awt.headless=true

However, ps -ef doesn't show the netiq processes.  As a result we see
quite different results thus:

# ps -ef | grep -ic java
146
# ps ax | grep -ic java
191

Furthermore if I try to include usernames and process start times, I
now get no results at all:

# ps aux | grep -i java
root      4767  0.0  0.0  1736  592 pts/2    S    15:12   0:00 grep -i java

I am confused!

For reference, this is RHAS 2.1, procps version 2.0.7 and grep (GNU grep) 2.4.2

This is significant because many people who may log onto this machine
come from a solaris background and will automatically do ps -ef and
not ps ax, and thus would not find the netiq processes.

What's going on?

S.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list