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