View previous topic :: View next topic |
Author |
Message |
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5910
|
Posted: Fri Nov 04, 2011 6:13 am Post subject: count active users including su shells [solved] |
|
|
Hello,
I need to track how much users are logged on the machine I use.
I know I can see them using who | awk '{ print $1 }' | sort | uniq, problem is that this doesn't shows users that are logged in using su <user> or sh - <user> commands.
is there any way to find these users too? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Last edited by DaggyStyle on Fri Nov 04, 2011 7:44 am; edited 1 time in total |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Fri Nov 04, 2011 7:42 am Post subject: |
|
|
Code: | ps --no-headers -ao %U | sort -u |
Listed users could just have a something running and are not logged in for sure, but may be that helps? _________________ The End of the Internet! |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5910
|
Posted: Fri Nov 04, 2011 7:43 am Post subject: |
|
|
truc wrote: | Code: | ps --no-headers -ao %U | sort -u |
Listed users could just have a something running and are not logged in for sure, but may be that helps? |
seems right!
Thanks! _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
|