xref: /freebsd/usr.bin/w/w.1 (revision fbbd9655e5107c68e4e0146ff22b73d7350475bc)
19b50d902SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1991, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
289b50d902SRodney W. Grimes.\"     @(#)w.1	8.1 (Berkeley) 6/6/93
29c3aac50fSPeter Wemm.\" $FreeBSD$
309b50d902SRodney W. Grimes.\"
3106691045SCraig Rodrigues.Dd December 1, 2015
329b50d902SRodney W. Grimes.Dt W 1
3362500372SRuslan Ermilov.Os
349b50d902SRodney W. Grimes.Sh NAME
359b50d902SRodney W. Grimes.Nm w
36a76f1729SSteve Price.Nd "display who is logged in and what they are doing"
379b50d902SRodney W. Grimes.Sh SYNOPSIS
388fe908efSRuslan Ermilov.Nm
39d6112c71SMarcel Moolenaar.Op Fl -libxo
407860b557SAndrey A. Chernov.Op Fl dhin
419b50d902SRodney W. Grimes.Op Fl M Ar core
429b50d902SRodney W. Grimes.Op Fl N Ar system
43ac3cd520SBrian Feldman.Op Ar user ...
449b50d902SRodney W. Grimes.Sh DESCRIPTION
459b50d902SRodney W. GrimesThe
4690389da9SPhilippe Charnier.Nm
479b50d902SRodney W. Grimesutility prints a summary of the current activity on the system,
489b50d902SRodney W. Grimesincluding what each user is doing.
499b50d902SRodney W. GrimesThe first line displays the current time of day, how long the system has
509b50d902SRodney W. Grimesbeen running, the number of users logged into the system, and the load
519b50d902SRodney W. Grimesaverages.
529b50d902SRodney W. GrimesThe load average numbers give the number of jobs in the run queue averaged
539b50d902SRodney W. Grimesover 1, 5 and 15 minutes.
549b50d902SRodney W. Grimes.Pp
559b50d902SRodney W. GrimesThe fields output are the user's login name, the name of the terminal the
569b50d902SRodney W. Grimesuser is on, the host from which the user is logged in, the time the user
579b50d902SRodney W. Grimeslogged on, the time since the user last typed anything,
589b50d902SRodney W. Grimesand the name and arguments of the current process.
599b50d902SRodney W. Grimes.Pp
609b50d902SRodney W. GrimesThe options are as follows:
6189273e7bSRuslan Ermilov.Bl -tag -width indent
6206691045SCraig Rodrigues.It Fl -libxo
6306691045SCraig RodriguesGenerate output via
6406691045SCraig Rodrigues.Xr libxo 3
6506691045SCraig Rodriguesin a selection of different human and machine readable formats.
6606691045SCraig RodriguesSee
6706691045SCraig Rodrigues.Xr xo_parse_args 3
6806691045SCraig Rodriguesfor details on command line arguments.
697860b557SAndrey A. Chernov.It Fl d
707860b557SAndrey A. Chernovdumps out the entire process list on a per controlling
717860b557SAndrey A. Chernovtty basis, instead of just the top level process.
729b50d902SRodney W. Grimes.It Fl h
739b50d902SRodney W. GrimesSuppress the heading.
749b50d902SRodney W. Grimes.It Fl i
759b50d902SRodney W. GrimesOutput is sorted by idle time.
769b50d902SRodney W. Grimes.It Fl M
779b50d902SRodney W. GrimesExtract values associated with the name list from the specified
789b50d902SRodney W. Grimescore instead of the default
7989273e7bSRuslan Ermilov.Pa /dev/kmem .
809b50d902SRodney W. Grimes.It Fl N
819b50d902SRodney W. GrimesExtract the name list from the specified system instead of the
829b50d902SRodney W. Grimesdefault
8389273e7bSRuslan Ermilov.Pa /boot/kernel/kernel .
849b50d902SRodney W. Grimes.It Fl n
850227791bSRuslan ErmilovDo not attempt to resolve network addresses (normally
8690389da9SPhilippe Charnier.Nm
875b718312SBrian Somersinterprets addresses and attempts to display them as names).
882279a9a4SHajimu UMEMOTOWhen
892279a9a4SHajimu UMEMOTO.Fl n
902279a9a4SHajimu UMEMOTOis specified more than once, hostnames stored in utmp are attempted to
912279a9a4SHajimu UMEMOTOresolve to display them as network addresses.
929b50d902SRodney W. Grimes.El
939b50d902SRodney W. Grimes.Pp
94ac3cd520SBrian FeldmanIf one or more
959b50d902SRodney W. Grimes.Ar user
96ac3cd520SBrian Feldmannames are specified, the output is restricted to those users.
979b50d902SRodney W. Grimes.Sh FILES
980806dd92SEd Schouten.Bl -tag -width ".Pa /var/run/utx.active" -compact
990806dd92SEd Schouten.It Pa /var/run/utx.active
1009b50d902SRodney W. Grimeslist of users on the system
1019b50d902SRodney W. Grimes.El
1026c7216dfSRuslan Ermilov.Sh COMPATIBILITY
1036c7216dfSRuslan ErmilovThe
1046c7216dfSRuslan Ermilov.Fl f ,
1056c7216dfSRuslan Ermilov.Fl l ,
1066c7216dfSRuslan Ermilov.Fl s ,
1076c7216dfSRuslan Ermilovand
1086c7216dfSRuslan Ermilov.Fl w
1096c7216dfSRuslan Ermilovflags are no longer supported.
1109b50d902SRodney W. Grimes.Sh SEE ALSO
1119b50d902SRodney W. Grimes.Xr finger 1 ,
1129b50d902SRodney W. Grimes.Xr ps 1 ,
113da1ff3cbSWolfram Schneider.Xr uptime 1 ,
114a01ced33SMarcel Moolenaar.Xr who 1 ,
115a01ced33SMarcel Moolenaar.Xr libxo 3 ,
116a01ced33SMarcel Moolenaar.Xr xo_parse_args 3
1176c7216dfSRuslan Ermilov.Sh HISTORY
1186c7216dfSRuslan ErmilovThe
1196c7216dfSRuslan Ermilov.Nm
1206c7216dfSRuslan Ermilovcommand appeared in
1216c7216dfSRuslan Ermilov.Bx 3.0 .
1229b50d902SRodney W. Grimes.Sh BUGS
1239b50d902SRodney W. GrimesThe notion of the
1249b50d902SRodney W. Grimes.Dq current process
1259b50d902SRodney W. Grimesis muddy.
12689273e7bSRuslan ErmilovThe current algorithm is
12789273e7bSRuslan Ermilov.Do
12889273e7bSRuslan Ermilovthe highest numbered process on the terminal
1299b50d902SRodney W. Grimesthat is not ignoring interrupts, or, if there is none, the highest numbered
13089273e7bSRuslan Ermilovprocess on the terminal
13189273e7bSRuslan Ermilov.Dc .
1329b50d902SRodney W. GrimesThis fails, for example, in critical sections of programs like the shell
1339b50d902SRodney W. Grimesand editor, or when faulty programs running in the background fork and fail
1349b50d902SRodney W. Grimesto ignore interrupts.
1359b50d902SRodney W. Grimes(In cases where no process can be found,
13690389da9SPhilippe Charnier.Nm
1379b50d902SRodney W. Grimesprints
13889273e7bSRuslan Ermilov.Ql \- . )
1399b50d902SRodney W. Grimes.Pp
1409b50d902SRodney W. GrimesThe
1419b50d902SRodney W. Grimes.Tn CPU
1429b50d902SRodney W. Grimestime is only an estimate, in particular, if someone leaves a background
1439b50d902SRodney W. Grimesprocess running after logging out, the person currently on that terminal is
1449b50d902SRodney W. Grimes.Dq charged
1459b50d902SRodney W. Grimeswith the time.
1469b50d902SRodney W. Grimes.Pp
1479b50d902SRodney W. GrimesBackground processes are not shown, even though they account for
1489b50d902SRodney W. Grimesmuch of the load on the system.
1499b50d902SRodney W. Grimes.Pp
1509b50d902SRodney W. GrimesSometimes processes, typically those in the background, are printed with
1519b50d902SRodney W. Grimesnull or garbaged arguments.
1529b50d902SRodney W. GrimesIn these cases, the name of the command is printed in parentheses.
1539b50d902SRodney W. Grimes.Pp
1549b50d902SRodney W. GrimesThe
15590389da9SPhilippe Charnier.Nm
1569b50d902SRodney W. Grimesutility does not know about the new conventions for detection of background
1579b50d902SRodney W. Grimesjobs.
1589b50d902SRodney W. GrimesIt will sometimes find a background job instead of the right one.
159