1w(1)                             User Commands                            w(1)
2
3
4

NAME

6       w - display information about currently logged-in users
7

SYNOPSIS

9       w [-hlsuw] [user]
10
11

DESCRIPTION

13       The w command displays a summary of the current activity on the system,
14       including what each user is doing. The heading line shows  the  current
15       time,  the  length  of time the system has been up, the number of users
16       logged into the system, and the average number of jobs in the run queue
17       over the last 1, 5 and 15 minutes.
18
19
20       The  fields  displayed  are: the user's login name, the name of the tty
21       the user is on, the time of day the user logged on (in  hours:minutes),
22       the  idle time—that is, the number of minutes since the user last typed
23       anything (in hours:minutes), the CPU time used  by  all  processes  and
24       their children on that terminal (in minutes:seconds), the CPU time used
25       by the currently active processes (in minutes:seconds),  and  the  name
26       and arguments of the current process.
27

OPTIONS

29       The following options are supported:
30
31       -h    Suppresses the heading.
32
33
34       -l    Produces a long form of output, which is the default.
35
36
37       -s    Produces  a  short  form of output. In the short form, the tty is
38             abbreviated, the login time and CPU times are left  off,  as  are
39             the arguments to commands.
40
41
42       -u    Produces  the  heading  line  which  shows  the current time, the
43             length of time the system has been up, the number of users logged
44             into  the system, and the average number of jobs in the run queue
45             over the last 1, 5 and 15 minutes.
46
47
48       -w    Produces a long form of output, which is also  the  same  as  the
49             default.
50
51

OPERANDS

53       user    Name  of  a  particular user for whom login information is dis‐
54               played. If specified, output is restricted to that user.
55
56

EXAMPLES

58       Example 1 Sample Output From the w Command
59
60         example% w
61
62
63         10:54am  up 27 day(s), 57 mins,  1 user,  load average: 0.28, 0.26, 0.22
64         User     tty            login@    idle     JCPU      PCPU       what
65         ralph    console  7:10am    1       10:05   4:31     w
66
67
68

ENVIRONMENT VARIABLES

70       See  environ(5) for descriptions of the following environment variables
71       that affect the execution of w: LC_CTYPE, LC_MESSAGES, and LC_TIME.
72

FILES

74       /var/adm/utmpx    user and accounting information
75
76

ATTRIBUTES

78       See attributes(5) for descriptions of the following attributes:
79
80
81
82
83       ┌─────────────────────────────┬─────────────────────────────┐
84       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │Availability                 │SUNWcsu                      │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       ps(1), who(1), whodo(1M), utmpx(4), attributes(5), environ(5)
91

NOTES

93       The  notion  of the "current process" is unclear. The current algorithm
94       is "the highest numbered process on the terminal that is  not  ignoring
95       interrupts,  or,  if there is none, the highest numbered process on the
96       terminal". This fails, for example, in critical  sections  of  programs
97       like the shell and editor, or when faulty programs running in the back‐
98       ground fork and fail to ignore interrupts. In cases  where  no  process
99       can be found, w prints .
100
101
102       The  CPU  time  is only an estimate, in particular, if someone leaves a
103       background process running after logging out, the person  currently  on
104       that terminal is ``charged'' with the time.
105
106
107       Background  processes  are not shown, even though they account for much
108       of the load on the system.
109
110
111       Sometimes processes, typically those in  the  background,  are  printed
112       with  null  or garbaged arguments. In these cases, the name of the com‐
113       mand is printed in parentheses.
114
115
116       w does not know about the conventions for detecting background jobs. It
117       will sometimes find a background job instead of the right one.
118
119
120
121SunOS 5.11                        19 Mar 2004                             w(1)
Impressum