Results 1 to 3 of 3
Hey All,
So I was curious why I was having trouble with this command while on a RHEL server the other day.
*Running ps with the U Flag*
-bash-2.05b$ ps ...
- 06-01-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 2
[SOLVED] PS Question
Hey All,
So I was curious why I was having trouble with this command while on a RHEL server the other day.
*Running ps with the U Flag*
-bash-2.05b$ ps aux | grep snmpd | grep -v grep
-bash-2.05b$
-bash-2.05b$ which snmpd
-bash-2.05b$ whereis snmpd
snmpd: /usr/local/man/man1/snmpd.1
(NOtice this command did not return the process)
*running ps without the u flag*
-bash-2.05b$ ps ax | grep snmpd | grep -v grep
74952 p1- R 254:22.46 /usr/local/sbin/snmpd
-bash-2.05b$ ps ax | grep snmpd | grep -v grep
74952 p1- R 254:30.13 /usr/local/sbin/snmpd
-bash-2.05b$ ps -aux | grep snmpd | grep -v grep
-bash-2.05b$
(Notice this option returned the running process. )
Why would the U flag not return the snmpd process?
Thanks.
- 06-02-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Because on Linux the U option requires a user list and will only return the processes that belong to members of the list. It is not the same a the U option for Solaris and other legacy Unix systems.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-02-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 2
Thanks!
That makes sense.


