Quote:
|
Originally Posted by beeblequix
ps -aux|grep 'some_process'|wc -l
|
This method can come up with a count that's one too hig (intermittantly). You will sometimes catch your "grep" in the count to!
I know I'm only running one copy of "init", but see below where my count would have been two by your method:
Code:
$ ps aux | grep init
root 1 0.0 0.0 1600 536 ? S Sep14 0:02 init [2]
haertig 22987 0.0 0.0 1928 600 pts/0 R+ 15:13 0:00 grep init
$