3BSD/usr/man/man1/w.1

Compare this file to the similar file:
Show the results in this format:

.TH W 1 11/13/79
.UC
.SH NAME
w \- who is on and what they are doing
.SH SYNOPSIS
.B w
[
.B \-hs
]
.SH DESCRIPTION
.I W
is like
.I who,
except that the name of the process the user is currently
talking to, and the CPU time used by the user since login and
this process are printed.
.PP
The fields output are:
the users login name,
the name of the tty the user is on,
the time of day the user logged on,
the number of minutes since the user last typed anything,
the CPU time used by all processes and their children on that terminal,
the CPU time used by the current process,
the name and arguments of the current process.
.PP
The
.B \-h
flag suppresses the heading.
The
.B \-s
flag asks for a short form of output.
In the short form, the tty is abbreviated, the login time and cpu times
are left off, as are the arguments to commands.
.PP
The time printed above the user column is the current time of day.
The load average numbers give the number of jobs in the run queue
averaged over 1, 5 and 15 minutes.
.SH FILES
.ta 1i
/etc/utmp
.br
/dev/kmem
.br
/dev/drum
.SH AUTHOR
Mark Horton
.SH BUGS
The notion of the ``current process'' is muddy.
The current algorithm is ``the highest numbered process on
the terminal that is not ignoring interrupts,
or, if there is none, the highest numbered process on the terminal''.
This fails, for example, in critical sections of programs
like the shell and editor.
(In these cases, no process can be found and
.I w
prints ``\-''.)
.PP
The CPU time is only an estimate, in particular, if someone leaves a
background processs running after logging out, the person currently
on that terminal is ``charged'' with the time.
.PP
Background processes are not shown, even though they account for
much of the load on the system.
.PP
Some processes, typically those in the background, are
printed with null or garbaged arguments, even though
the process has not swapped.
(Sometimes ps even loses on its own arguments!)
In these cases, the name of the command is printed in parentheses.