Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

To expand on this question: users command lists 5 of the same users...what are they doing?

How can I track down what each user is doing or what service/app/request spawned another login of that user?

EDIT: http://askubuntu.com/a/115028/38901 answer from the previous post offers the solution of using who which is useful to see where the user is. Still, any way to see what?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

You can use who command to see where your users have logged in eg. tty, pseudo terminals, etc.

you can also use

ps -ef

from your terminal to see what all users are doing

share|improve this answer
    
Okay, thanks. I'll mark as solved when the time is allowed. Just a quick question: I see how I can use ps -ef and who together to know who's doing what, but when there is a ? under the TTY field, what am I to make of that? Is that the default logged in user? –  TryTryAgain Mar 22 '12 at 8:01
add comment

The w command displays exactly that:

w - Show who is logged on and what they are doing.

Example:

w
 14:20:15 up  5:10,  4 users,  load average: 0,00, 0,04, 0,05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     pts/2    :0.0             09:11    5:07m  1.02s  1.02s ssh somewhere
user     pts/3    :0.0             09:11    5:08m  2.61s  2.61s ssh somewhere
user     pts/5    :0.0             09:12    5:07m  0.41s  0.41s /usr/bin/luit -
user     pts/0    :0.0             12:35    0.00s  0.34s  0.00s w
share|improve this answer
    
easy, thanks. good stuff –  TryTryAgain Mar 23 '12 at 1:07
add comment

You can try ps -efu user, doing man ps will list all options avaiable

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.