Have you ever wonder who is in your system? and doing what? Well, beauty always comes in small packages and today it is not an exception, the only thing you need is: w
.This small tool comes to the rescue. The format is as follows:
w [options] user […]
Lets see some examples:
- w -> this command with no parameters shows you all the info you need. This is the output (depends on your system):
17:37:51 up 7:52, 1 user, load average: 0,44, 0,62, 0,69
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
user :0 09:45 ?xdm? 1:23m 0.00s /usr/libexec/gdm-x-session --run-script /usr/bin/gnome-session
lets see what we have here:
17:37:51
-> current timeup 7:52
-> how long the system has been running1 user
-> how many users are currently logged onload average: 0,44, 0,62, 0,69
-> the load average the past 1, 5 and 15 minutes respectively- Then, for each user logged into the system we have one row showing:
user
-> login name:0
-> the tty nameFrom
-> this field only appears if the user is connected through a remote ssh conection. In this example do not appears because the user is local09:45
-> login time?xdm?
-> idle time (usually for remote users, if the user is local, shows xdm, the display manager)- JCPU -> is the time used by all processes attached to the tty
- PCPU -> is the time used by the current process (the one in the what field)
/usr/libexec
… -> command line of the current process
That is a lot of info for just w !
Deja una respuesta