Name
w — stdin stdout - file -- opt --help --version
Synopsis
w [username]The w command displays the
current process running in each shell for all logged-in
users:
$ w 10:51pm up 8 days, 3:42, 8 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT barrett pts/0 :0 Sat 2pm 27:13m 0.07s 0.07s emacs jones pts/1 host1 6Sep03 2:33m 0.74s 0.21s bash smith pts/2 host2 6Sep03 0.00s 13.35s 0.04s w
The top line is the same one printed by uptime. The columns indicate the user’s
terminal, originating host or X display (if applicable), login time,
idle time, two measures of the CPU time (run man w for details), and the current
process. Provide a username to see only that user’s
information.
For the briefest output, try w
-hfs.
Useful options
|
|
Don’t print the header line. |
|
|
Don’t print the FROM column. |
|
|
Don’t print the JCPU and PCPU columns. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access