Understanding the Usage of ps Command with -e and -u Options

0
3
Asked By TechieGuru87 On

Hey everyone, I have a question regarding the `ps` command in Linux. A colleague mentioned that our user seems to have too many processes running on the server. I ran this command:

`ps -eT -u bobthebuilder | wc -l`

and it returned a count of 4109 processes. My confusion is whether it makes sense to use both the `-e` (which shows all processes) and `-u` (which specifies a user) flags together. When I tried running the command without the counting part, I saw process IDs for root and daemon processes, which seems to suggest that the total count for the user might not be accurate. Can anyone clarify this for me?

1 Answer

Answered By LinuxLover42 On

You're right to question that! Even without checking the manual, running something like `ps -eT -u nobody` clearly shows processes that aren’t owned by that user. So your instincts about the count being off make sense.

CuriousCat99 -

Thanks, I thought I was losing my mind here. Now to convince management their Senior engineer is wrong.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.