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