Gnu – w

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:

  1. 17:37:51 -> current time
  2. up 7:52 -> how long the system has been running
  3. 1 user -> how many users are currently logged on
  4. load average: 0,44, 0,62, 0,69 -> the load average the past 1, 5 and 15 minutes respectively
  5. Then, for each user logged into the system we have one row showing:
    1. user-> login name
    2. :0 -> the tty name
    3. From -> this field only appears if the user is connected through a remote ssh conection. In this example do not appears because the user is local
    4. 09:45 -> login time
    5. ?xdm? -> idle time (usually for remote users, if the user is local, shows xdm, the display manager)
    6. JCPU -> is the time used by all processes attached to the tty
    7. PCPU -> is the time used by the current process (the one in the what field)
    8. /usr/libexec… -> command line of the current process

That is a lot of info for just w !


Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *