1whodo(1M) System Administration Commands whodo(1M)
2
3
4
6 whodo - who is doing what
7
9 /usr/sbin/whodo [-h] [-l] [user]
10
11
13 The whodo command produces formatted and dated output from information
14 in the /var/adm/utmpx and /proc/pid files.
15
16
17 The display is headed by the date, time, and machine name. For each
18 user logged in, device name, user-ID and login time is shown, followed
19 by a list of active processes associated with the user-ID. The list
20 includes the device name, process-ID, CPU minutes and seconds used, and
21 process name.
22
23
24 If user is specified, output is restricted to all sessions pertaining
25 to that user.
26
28 The following options are supported:
29
30 -h Suppress the heading.
31
32
33 -l Produce a long form of output. The fields displayed are: the
34 user's login name, the name of the tty the user is on, the time
35 of day the user logged in (in hours:minutes), the idle time —
36 that is, the time since the user last typed anything (in
37 hours:minutes), the CPU time used by all processes and their
38 children on that terminal (in minutes:seconds), the CPU time used
39 by the currently active processes (in minutes:seconds), and the
40 name and arguments of the current process.
41
42
44 Example 1 Using the whodo Command
45
46
47 The command:
48
49
50 example% whodo
51
52
53
54
55 produces a display like this:
56
57
58 Tue Mar 12 15:48:03 1985
59 bailey
60 tty09 mcn 8:51
61 tty09 28158 0:29 sh
62
63 tty52 bdr 15:23
64 tty52 21688 0:05 sh
65 tty52 22788 0:01 whodo
66 tty52 22017 0:03 vi
67 tty52 22549 0:01 sh
68
69 xt162 lee 10:20
70 tty08 6748 0:01 layers
71 xt162 6751 0:01 sh
72 xt163 6761 0:05 sh
73 tty08 6536 0:05 sh
74
75
76
78 If any of the LC_* variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COL‐
79 LATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the
80 environment, the operational behavior of tar(1) for each corresponding
81 locale category is determined by the value of the LANG environment
82 variable. If LC_ALL is set, its contents are used to override both the
83 LANG and the other LC_* variables. If none of the above variables is
84 set in the environment, the "C" (U.S. style) locale determines how
85 whodo behaves.
86
87 LC_CTYPE Determines how whodo handles characters. When LC_CTYPE
88 is set to a valid value, whodo can display and handle
89 text and filenames containing valid characters for that
90 locale. The whodo command can display and handle
91 Extended Unix code (EUC) characters where any individual
92 character can be 1, 2, or 3 bytes wide. whodo can also
93 handle EUC characters of 1, 2, or more column widths. In
94 the "C" locale, only characters from ISO 8859-1 are
95 valid.
96
97
98 LC_MESSAGES Determines how diagnostic and informative messages are
99 presented. This includes the language and style of the
100 messages, and the correct form of affirmative and nega‐
101 tive responses. In the "C" locale, the messages are pre‐
102 sented in the default form found in the program itself
103 (in most cases, U.S. English).
104
105
106 LC_TIME Determines how whodo handles date and time formats. In
107 the "C" locale, date and time handling follow the U.S.
108 rules.
109
110
112 The following exit values are returned:
113
114 0 Successful completion.
115
116
117 non-zero An error occurred.
118
119
121 /etc/passwd System password file
122
123
124 /var/adm/utmpx User access and administration information
125
126
127 /proc/pid Contains PID
128
129
131 See attributes(5) for descriptions of the following attributes:
132
133
134
135
136 ┌─────────────────────────────┬─────────────────────────────┐
137 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
138 ├─────────────────────────────┼─────────────────────────────┤
139 │Availability │SUNWcsu │
140 └─────────────────────────────┴─────────────────────────────┘
141
143 ps(1), who(1), attributes(5), environ(5)
144
145
146
147SunOS 5.11 18 Jun 2003 whodo(1M)