1.\" Copyright (c) 1980, 1990, 1991 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)w.1 6.8 (Berkeley) 04/23/91 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 hi 17.Op Ar user 18.Sh DESCRIPTION 19.Nm W 20prints a summary of the current activity on the system, 21including what each user is doing. 22The heading shows the current time of day, how long the system has been up, 23the number of users logged into the system, and 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 user's login name, the name of the terminal (tty) the user is on, 29the host from which the user is logged in, the time the user logged on, 30the time since the user last typed anything, 31the 32.Tn CPU 33time used by all processes and their children on that tty, 34the 35.Tn CPU 36time used by the currently active processes, and the name and arguments 37of the current process. 38.Pp 39Available options are: 40.Bl -tag -width Ds 41.It Fl h 42Suppress the heading. 43.It Fl i 44Output is sorted by idle time. 45.El 46.Pp 47If a 48.Ar user 49name is given, the output is restricted to that user. 50.Sh FILES 51.Bl -tag -width /var/run/utmp -compact 52.It Pa /var/run/utmp 53list of users on the system 54.El 55.Sh SEE ALSO 56.Xr who 1 , 57.Xr finger 1 , 58.Xr ps 1 59.Sh BUGS 60The notion of the 61.Dq current process 62is muddy. 63The current algorithm is ``the highest numbered process on the terminal that 64is not ignoring interrupts, or, if there is none, the highest numbered 65process on the terminal''. 66This fails, for example, in critical sections of programs like the shell 67and editor, or when faulty programs running in the background fork and fail 68to ignore interrupts. 69(In cases where no process can be found, 70.Nm w 71prints 72.Dq \- . ) 73.Pp 74The 75.Tn CPU 76time is only an estimate, in particular, if someone leaves a 77background process running after logging out, the person currently 78on that terminal is 79.Dq charged 80with the time. 81.Pp 82Background processes are not shown, even though they account for 83much of the load on the system. 84.Pp 85Sometimes processes, typically those in the background, are 86printed with null or garbaged arguments. 87In these cases, the name of the command is printed in parentheses. 88.Pp 89.Nm W 90does not know about the new conventions for detection of background jobs. 91It will sometimes find a background job instead of the right one. 92.Sh COMPATIBILITY 93The 94.Fl f , 95.Fl l , 96.Fl s , 97and 98.Fl w 99flags are no longer supported. 100.Sh HISTORY 101The 102.Nm 103command appeared in 104.Ux 3.0 . 105