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