W
Section: User Commands (1)
Updated: local
Index
Return to Main Contents
NAME
w - display users and processes
SYNOPSIS
w
DESCRIPTION
W
is a program which displays an "intelligent" listing of the current users,
what they're doing, and how active they are. There are two basic kinds
of information displayed: system information and per-user information.
An example is shown below.
10:55pm up 2 wks 2 days, 4 users
User tty login@ idle JCPU PCPU what
rhg tty6 10:36pm 12:20 12:20 csh
robertd tty7 10:21pm 9:21 9:21 csh
bobw tty13 10:26pm 160:35 149:43 rn
allbery tty15 9:47pm 50:22 0:18 sh
The first line displays the current time, how long the system has been up,
and the number of users.
The other lines display for each user, the user's login name, the
terminal the user is on, the time the user logged in, how long the user has
been idle, the CPU time used by the current program and total CPU for the
login session, and the current program.
FILES
/dev/kmem System memory (the process table)
/dev/mem In-core program images
/dev/swap Swapped program images
/dev Searches for terminals
/etc/utmp Current system users and boot time
/xenix System namelist
NOTES
W
displays the process name as shown by
ps(1)
without the -f argument.
SEE ALSO
ps(1), who(1).
BUGS
JCPU and current process are both kludges. The former is really only the
CPU of running programs in the terminal session, as Xenix does not retain
user and system times for all programs in a session; the latter attempts to
disregard background processes, but it is nearly impossible to successfully
determine if a program is in the background or not. This is exacerbated by
the fact that VAR csh(1)'s, when available, look suspiciously like
background processes because they close their standard input.
If the user block is demand paged,
w
won't find it; I don't have access to a demand-paged system.
who -u
and
w
have different ideas on what constitutes idle time; one uses time of last
input, the other the time of last output.
It is possible that reading the summarized child's system and user times
would produce a better approximation of JCPU. This is only likely, however,
if the times are updated recursively.
Things can change while
w
is running; this occasionally causes the current program to be printed as
"[can't stat]" or as "[interstice]".
If you want "w" to work correctly, get 4.2BSD.
It should really take options for the system namelist, memory, and
swap files.
Because Xenix lacks the appropriate kernel variables, load averages are
not available.
CREDIT
Based on a utility written at the University of California at Berkeley.
Original written by Brandon S. Allbery.
Modified for SCO Xenix 386 by John F. Haugh II (jfh@rpp386).
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- FILES
-
- NOTES
-
- SEE ALSO
-
- BUGS
-
- CREDIT
-
This document was created by
man2html,
using the manual pages.
Time: 07:09:22 GMT, December 12, 2024