Know Who’s Who Are Logging And What The User Is Doing

If you are a system administrator or sysadmin of a Linux computer, where multiple users can log in simultaneously, you may be wondering how we can find out who I am currently logged in and what your users are doing using w command.

[lica @ canada ~] # w
11:18:03 up 3 days, 23:31, 1 user, load average: 1.22, 1.20, 1.05
lica pts / 1 gw.kurungsiku 11:05 0.00s 0.01s 0.00s w
From the above info we can see there is 1 user with:

  • username lica
  • login from pseudo terminal pts / 1
  • from my gw.kurungs
  • logged in at 11:05
  • idle for 0.05s
  • JCPU 0.01s, is the amount of time used by all processes related to the tty used by the user, but excludes previous background jobs and only includes the currently running background jobs
  • The PCPU0.00s time used by the current process is written in the WHAT column
  • The last/last command is executed w

Leave a Reply

Your email address will not be published. Required fields are marked *