Print this page
2849 uptime should use locale settings for current time
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/w.1
+++ new/usr/src/man/man1/w.1
1 1 '\" te
2 +.\" Copyright (c) 2013 Gary Mills
2 3 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH W 1 "Mar 19, 2004"
7 +.TH W 1 "Dec 15, 2013"
7 8 .SH NAME
8 9 w \- display information about currently logged-in users
9 10 .SH SYNOPSIS
10 11 .LP
11 12 .nf
12 13 \fBw\fR [\fB-hlsuw\fR] [\fIuser\fR]
13 14 .fi
14 15
15 16 .SH DESCRIPTION
16 17 .sp
17 18 .LP
18 19 The \fBw\fR command displays a summary of the current activity on the system,
19 20 including what each user is doing. The heading line shows the current time, the
20 21 length of time the system has been up, the number of users logged into the
21 22 system, and the average number of jobs in the run queue over the last 1, 5 and
22 23 15 minutes.
23 24 .sp
24 25 .LP
25 -The fields displayed are: the user's login name, the name of the tty the user
26 -is on, the time of day the user logged on (in \fIhours:minutes\fR), the idle
27 -time\(emthat is, the number of minutes since the user last typed anything (in
28 -\fIhours:minutes\fR), the \fBCPU\fR time used by all processes and their
29 -children on that terminal (in \fIminutes:seconds\fR), the \fBCPU\fR time used
30 -by the currently active processes (in \fIminutes:seconds\fR), and the name and
26 +The fields displayed are: the user's login name,
27 +the name of the tty the user is on,
28 +the time of day the user logged on (in ISO time format, weekday name
29 +and \fIhours:minutes\fR, or ISO date format), the idle
30 +time\(emthat is, the number of minutes since the user last typed anything
31 +(in \fIhours:minutes:seconds\fR),
32 +the \fBCPU\fR time used by all processes and their
33 +children on that terminal (in \fIhours:minutes:seconds\fR),
34 +the \fBCPU\fR time used
35 +by the currently active processes (in \fIhours:minutes:seconds\fR),
36 +and the name and
31 37 arguments of the current process.
32 38 .SH OPTIONS
33 39 .sp
34 40 .LP
35 41 The following options are supported:
36 42 .sp
37 43 .ne 2
38 44 .na
39 45 \fB\fB-h\fR\fR
40 46 .ad
41 47 .RS 6n
42 48 Suppresses the heading.
43 49 .RE
44 50
45 51 .sp
46 52 .ne 2
47 53 .na
48 54 \fB\fB-l\fR\fR
49 55 .ad
50 56 .RS 6n
51 57 Produces a long form of output, which is the default.
52 58 .RE
53 59
54 60 .sp
55 61 .ne 2
56 62 .na
57 63 \fB\fB-s\fR\fR
58 64 .ad
59 65 .RS 6n
60 66 Produces a short form of output. In the short form, the tty is abbreviated, the
61 67 login time and \fBCPU\fR times are left off, as are the arguments to commands.
62 68 .RE
63 69
64 70 .sp
65 71 .ne 2
66 72 .na
67 73 \fB\fB-u\fR\fR
68 74 .ad
69 75 .RS 6n
70 76 Produces the heading line which shows the current time, the length of time the
71 77 system has been up, the number of users logged into the system, and the average
72 78 number of jobs in the run queue over the last 1, 5 and 15 minutes.
73 79 .RE
74 80
75 81 .sp
76 82 .ne 2
77 83 .na
78 84 \fB\fB-w\fR\fR
79 85 .ad
80 86 .RS 6n
81 87 Produces a long form of output, which is also the same as the default.
82 88 .RE
83 89
84 90 .SH OPERANDS
85 91 .sp
86 92 .ne 2
87 93 .na
88 94 \fB\fIuser\fR\fR
89 95 .ad
90 96 .RS 8n
91 97 Name of a particular user for whom login information is displayed. If
92 98 specified, output is restricted to that user.
93 99 .RE
94 100
95 101 .SH EXAMPLES
96 102 .LP
97 103 \fBExample 1 \fRSample Output From the \fBw\fR Command
98 104 .sp
99 105 .in +2
100 106 .nf
101 107 example% \fBw\fR
102 108
103 109
104 110 10:54am up 27 day(s), 57 mins, 1 user, load average: 0.28, 0.26, 0.22
105 111 User tty login@ idle JCPU PCPU what
106 112 ralph console 7:10am 1 10:05 4:31 w
107 113 .fi
108 114 .in -2
109 115 .sp
110 116
111 117 .SH ENVIRONMENT VARIABLES
112 118 .sp
113 119 .LP
114 120 See \fBenviron\fR(5) for descriptions of the following environment variables
115 121 that affect the execution of \fBw\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
116 122 \fBLC_TIME\fR.
117 123 .SH FILES
118 124 .sp
119 125 .ne 2
120 126 .na
121 127 \fB\fB/var/adm/utmpx\fR\fR
122 128 .ad
123 129 .RS 18n
124 130 user and accounting information
125 131 .RE
126 132
127 133 .SH SEE ALSO
128 134 .sp
129 135 .LP
130 136 \fBps\fR(1), \fBwho\fR(1), \fBwhodo\fR(1M), \fButmpx\fR(4),
131 137 \fBattributes\fR(5), \fBenviron\fR(5)
132 138 .SH NOTES
133 139 .sp
134 140 .LP
135 141 The notion of the "current process" is unclear. The current algorithm is "the
136 142 highest numbered process on the terminal that is not ignoring interrupts, or,
137 143 if there is none, the highest numbered process on the terminal". This fails,
138 144 for example, in critical sections of programs like the shell and editor, or
139 145 when faulty programs running in the background fork and fail to ignore
140 146 interrupts. In cases where no process can be found, \fBw\fR prints
141 147 \fB\(mi\fR\&.
142 148 .sp
143 149 .LP
144 150 The \fBCPU\fR time is only an estimate, in particular, if someone leaves a
145 151 background process running after logging out, the person currently on that
146 152 terminal is ``charged'' with the time.
147 153 .sp
148 154 .LP
149 155 Background processes are not shown, even though they account for much of the
150 156 load on the system.
151 157 .sp
152 158 .LP
153 159 Sometimes processes, typically those in the background, are printed with null
154 160 or garbaged arguments. In these cases, the name of the command is printed in
155 161 parentheses.
156 162 .sp
157 163 .LP
158 164 \fBw\fR does not know about the conventions for detecting background jobs. It
159 165 will sometimes find a background job instead of the right one.
↓ open down ↓ |
119 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX