I need to run a script to count how many uid's are say nobody and when there are more than 5 nobody ids running to alert me. I thought ps -u nobody | wc -l would work but I get a false number. I did it for root and it tells me there are more:
ps -ef | grep root | grep -v grep | wc -l
47
ps -fu root | wc -l
69
when I manually count there are only 47 root uid's running
using the ps -ef | pg command...
Help please.....
ps -ef | grep root | grep -v grep | wc -l
47
ps -fu root | wc -l
69
when I manually count there are only 47 root uid's running
using the ps -ef | pg command...
Help please.....