BSD 4_2 development
[unix-history] / usr / man / man1 / w.1
CommitLineData
cb3f4193
C
1.TH W 1 "15 August 1980"
2.UC 4
3.SH NAME
4w \- who is on and what they are doing
5.SH SYNOPSIS
6.B w
7[
8.B \-h
9] [
10.B \-s
11] [ user ]
12.SH DESCRIPTION
13.I W
14prints a summary of the current activity on the system,
15including what each user is doing.
16The heading line shows the current time of day,
17how long the system has been up,
18the number of users logged into the system,
19and the load averages.
20The load average numbers give the number of jobs in the run queue
21averaged over 1, 5 and 15 minutes.
22.PP
23The fields output are:
24the users login name,
25the name of the tty the user is on,
26the time of day the user logged on,
27the number of minutes since the user last typed anything,
28the CPU time used by all processes and their children on that terminal,
29the CPU time used by the currently active processes,
30the name and arguments of the current process.
31.PP
32The
33.B \-h
34flag suppresses the heading.
35The
36.B \-s
37flag asks for a short form of output.
38In the short form, the tty is abbreviated, the login time and cpu times
39are left off, as are the arguments to commands.
40.B \-l
41gives the long output, which is the default.
42.PP
43If a
44.I user
45name is included,
46the output will be restricted to that user.
47.SH FILES
48.ta 1i
49/etc/utmp
50.br
51/dev/kmem
52.br
53/dev/drum
54.SH "SEE ALSO"
55who(1), finger(1), ps(1)
56.SH AUTHOR
57Mark Horton
58.SH BUGS
59The notion of the ``current process'' is muddy.
60The current algorithm is ``the highest numbered process on
61the terminal that is not ignoring interrupts,
62or, if there is none, the highest numbered process on the terminal''.
63This fails, for example, in critical sections of programs
64like the shell and editor,
65or when faulty programs running in the background
66fork and fail to ignore interrupts.
67(In cases where no process can be found,
68.I w
69prints ``\-''.)
70.PP
71The CPU time is only an estimate, in particular, if someone leaves a
72background process running after logging out, the person currently
73on that terminal is ``charged'' with the time.
74.PP
75Background processes are not shown, even though they account for
76much of the load on the system.
77.PP
78Sometimes processes, typically those in the background, are
79printed with null or garbaged arguments.
80In these cases, the name of the command is printed in parentheses.
81.PP
82W does not know about the new conventions for detection of background jobs.
83It will sometimes find a background job instead of the right one.