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