1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
'\" te
.\" Copyright (c) 2013 Gary Mills
.\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" 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.
.\" 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.
.\" 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]
.TH WHODO 8 "Dec 15, 2013"
.SH NAME
whodo \- who is doing what
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/whodo\fR [\fB-h\fR] [\fB-l\fR] [\fIuser\fR]
.fi
.SH DESCRIPTION
.sp
.LP
The \fBwhodo\fR command produces formatted and dated output from information in
the \fB/var/adm/utmpx\fR and \fB/proc/pid\fR files.
.sp
.LP
The display is headed by the date, time, and machine name. For each user logged
in, device name, user-ID and login time is shown, followed by a list of active
processes associated with the user-ID. The list includes the device name,
process-ID, CPU minutes and seconds used, and process name.
.sp
.LP
If \fIuser\fR is specified, output is restricted to all sessions pertaining to
that user.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 6n
Suppress the heading.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.RS 6n
Produce a long form of output. The fields displayed are: the user's login name,
the name of the tty the user is on, the time of day the user logged in
(in ISO time format, weekday name and \fIhours\fR\fB:\fR\fIminutes\fR,
or ISO date format),
the idle time \(em that is, the time since the user last typed anything
(in \fIhours\fR\fB:\fR\fIminutes\fR\fB:\fR\fIseconds\fR),
the CPU time used by all processes and their children on that terminal
(in \fIhours\fR\fB:\fR\fIminutes\fR\fB:\fR\fIseconds\fR),
the CPU time used by the currently active processes
(in \fIhours\fR\fB:\fR\fIminutes\fR\fB:\fR\fIseconds\fR),
and the name and arguments of the current process.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRUsing the whodo Command
.sp
.LP
The command:
.sp
.in +2
.nf
example% whodo
.fi
.in -2
.sp
.sp
.LP
produces a display like this:
.sp
.in +2
.nf
Tue Mar 12 15:48:03 1985
bailey
tty09 mcn 8:51
tty09 28158 0:29 sh
tty52 bdr 15:23
tty52 21688 0:05 sh
tty52 22788 0:01 whodo
tty52 22017 0:03 vi
tty52 22549 0:01 sh
xt162 lee 10:20
tty08 6748 0:01 layers
xt162 6751 0:01 sh
xt163 6761 0:05 sh
tty08 6536 0:05 sh
.fi
.in -2
.sp
.SH ENVIRONMENT VARIABLES
.sp
.LP
If any of the \fBLC_*\fR variables ( \fB\fR\fBLC_CTYPE\fR\fB,\fR
\fBLC_MESSAGES\fR\fB,\fR \fBLC_TIME\fR\fB,\fR \fBLC_COLLATE\fR\fB,\fR
\fBLC_NUMERIC\fR\fB,\fR and \fBLC_MONETARY\fR ) (see \fBenviron\fR(7)) are not
set in the environment, the operational behavior of \fBtar\fR(1) for each
corresponding locale category is determined by the value of the \fBLANG\fR
environment variable. If \fBLC_ALL\fR is set, its contents are used to override
both the \fBLANG\fR and the other \fBLC_*\fR variables. If none of the above
variables is set in the environment, the "C" (U.S. style) locale determines how
\fBwhodo\fR behaves.
.sp
.ne 2
.na
\fB\fBLC_CTYPE\fR\fR
.ad
.RS 15n
Determines how \fBwhodo\fR handles characters. When \fBLC_CTYPE\fR is set to a
valid value, \fBwhodo\fR can display and handle text and filenames containing
valid characters for that locale. The \fBwhodo\fR command can display and
handle Extended Unix code (EUC) characters where any individual character can
be 1, 2, or 3 bytes wide. \fBwhodo\fR can also handle EUC characters of 1, 2,
or more column widths. In the "C" locale, only characters from ISO 8859-1 are
valid.
.RE
.sp
.ne 2
.na
\fB\fBLC_MESSAGES\fR\fR
.ad
.RS 15n
Determines how diagnostic and informative messages are presented. This includes
the language and style of the messages, and the correct form of affirmative and
negative responses. In the "C" locale, the messages are presented in the
default form found in the program itself (in most cases, U.S. English).
.RE
.sp
.ne 2
.na
\fB\fBLC_TIME\fR\fR
.ad
.RS 15n
Determines how \fBwhodo\fR handles date and time formats. In the "C" locale,
date and time handling follow the U.S. rules.
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 12n
Successful completion.
.RE
.sp
.ne 2
.na
\fBnon-zero\fR
.ad
.RS 12n
An error occurred.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/passwd\fR\fR
.ad
.RS 18n
System password file
.RE
.sp
.ne 2
.na
\fB\fB/var/adm/utmpx\fR\fR
.ad
.RS 18n
User access and administration information
.RE
.sp
.ne 2
.na
\fB\fB/proc/pid\fR\fR
.ad
.RS 18n
Contains PID
.RE
.SH SEE ALSO
.sp
.LP
.BR ps (1),
.BR who (1),
.BR attributes (7),
.BR environ (7)
|