Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

top and ps give different results

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hi,

I ran the top command and then typed u and then entered a user. This gave me all the processes running for that user.

I had 3 ksh process running.

When running ps for that user there was only one ksh running.

Why are there discrepancies?

Thanks,

Chris
 
ps on its own will only list processes running for that user against the current terminal. ps -u user should list all processes owned by that user. Annihilannic.
 
Thanks annihilannic,

Funny thing is I've only opened up one instance of ksh as far as I am aware.

I log in and then user the become command (a modified version of the su command) and I become a different user but I don't load any more instances of ksh.

Any ideas? Maybe there is always someone logged in as that user? Does that make sense?

PS the ps -u option did show me the same results as top.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top