xref: /original-bsd/usr.bin/w/w.1 (revision c3e32dec)
1.\" Copyright (c) 1980, 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)w.1	8.1 (Berkeley) 06/06/93
7.\"
8.Dd
9.Dt W 1
10.Os BSD 4
11.Sh NAME
12.Nm w
13.Nd "who present users are and what they are doing"
14.Sh SYNOPSIS
15.Nm w
16.Op Fl hin
17.Op Fl M Ar core
18.Op Fl N Ar system
19.Op Ar user
20.Sh DESCRIPTION
21The
22.Nm w
23utility prints a summary of the current activity on the system,
24including what each user is doing.
25The first line displays the current time of day, how long the system has
26been running, the number of users logged into the system, and the load
27averages.
28The load average numbers give the number of jobs in the run queue averaged
29over 1, 5 and 15 minutes.
30.Pp
31The fields output are the user's login name, the name of the terminal the
32user is on, the host from which the user is logged in, the time the user
33logged on, the time since the user last typed anything,
34and the name and arguments of the current process.
35.Pp
36The options are as follows:
37.Bl -tag -width Ds
38.It Fl h
39Suppress the heading.
40.It Fl i
41Output is sorted by idle time.
42.It Fl M
43Extract values associated with the name list from the specified
44core instead of the default
45.Dq /dev/kmem .
46.It Fl N
47Extract the name list from the specified system instead of the
48default
49.Dq /vmunix .
50.It Fl n
51Show network addresses as numbers (normally
52.Nm w
53interprets addresses and attempts to display them symbolically).
54.El
55.Pp
56If a
57.Ar user
58name is specified, the output is restricted to that user.
59.Sh FILES
60.Bl -tag -width /var/run/utmp -compact
61.It Pa /var/run/utmp
62list of users on the system
63.El
64.Sh SEE ALSO
65.Xr who 1 ,
66.Xr finger 1 ,
67.Xr ps 1 ,
68.Xr uptime 1 ,
69.Sh BUGS
70The notion of the
71.Dq current process
72is muddy.
73The current algorithm is ``the highest numbered process on the terminal
74that is not ignoring interrupts, or, if there is none, the highest numbered
75process on the terminal''.
76This fails, for example, in critical sections of programs like the shell
77and editor, or when faulty programs running in the background fork and fail
78to ignore interrupts.
79(In cases where no process can be found,
80.Nm w
81prints
82.Dq \- . )
83.Pp
84The
85.Tn CPU
86time is only an estimate, in particular, if someone leaves a background
87process running after logging out, the person currently on that terminal is
88.Dq charged
89with the time.
90.Pp
91Background processes are not shown, even though they account for
92much of the load on the system.
93.Pp
94Sometimes processes, typically those in the background, are printed with
95null or garbaged arguments.
96In these cases, the name of the command is printed in parentheses.
97.Pp
98The
99.Nm w
100utility does not know about the new conventions for detection of background
101jobs.
102It will sometimes find a background job instead of the right one.
103.Sh COMPATIBILITY
104The
105.Fl f ,
106.Fl l ,
107.Fl s ,
108and
109.Fl w
110flags are no longer supported.
111.Sh HISTORY
112The
113.Nm
114command appeared in
115.Ux 3.0 .
116