whodo Command
Purpose
Lists the jobs being performed by users on the system.
Syntax
Description
Prints information on all processes for a terminal, as well as the child processes.
By default, the output generated by the command for each active logged user will contain name of the terminal, user ID, date login time. The output is headed by the date, time and machine name. This information is followed by a record of active processes associated with that user ID. Each record shows the terminal name, process-ID, CPU minutes and seconds used, and process name.
Flags
Item | Description |
---|---|
-h | Suppress the heading that is printed on the output. |
-l | Produce a long form of output. A summary of
the current activity on the system is printed. The summary includes
the following:
|
-X | Prints all available characters of each user name instead of truncating to the first 8 characters. The user name is also moved to the last column of the output. |
Parameters
Item | Description |
---|---|
User | Limits output to all sessions pertaining to the user specified with User. More than one user name cannot be specified at a time. |
Exit Status
- 0
- The command completed successfully.
- >0
- An error occurred.
Examples
- When the whodo command is invoked on host "linguist" without
any flags or parameters, the output looks similar to the following:
Sun Jul 28 16:27:12 2002 linguist lft0 jeffg 8:15 ? 4136 0:00 dtlogin ? 3408 4:55 dtsession ? 2072 4:37 dtwm ? 17310 0:00 dtexec ? 20904 5:53 dtterm pts/0 22454 0:00 ksh pts/0 4360 0:07 ksh pts/0 25788 0:00 whodo ? 23672 0:00 dtexec ? 27536 0:00 dtterm pts/3 21508 0:00 ksh ? 23888 0:00 dtexec ? 24384 2:49 dtterm pts/2 24616 0:00 ksh pts/2 25002 0:04 ksh pts/2 26110 0:00 ksh ? 25276 0:00 dtexec ? 27090 0:31 dtterm pts/1 24232 0:00 ksh pts/1 23316 0:01 ksh ? 12566 4:23 dtfile ? 21458 1:35 dtfile pts/0 jeffg 8:16 pts/0 22454 0:00 ksh pts/0 4360 0:07 ksh pts/0 25788 0:00 whodo pts/1 jeffg 17:8 pts/1 24232 0:00 ksh pts/1 23316 0:01 ksh pts/2 jeffg 17:20 pts/2 24616 0:00 ksh pts/2 25002 0:04 ksh pts/2 26110 0:00 ksh pts/3 root 16:26 pts/3 21508 0:00 ksh
- The command whodo -l on the host linguist
produces the following output:
04:33PM up 20 day(s), 22 hr(s), 51 mins(s) 5 user(s) User tty login@ idle JCPU PCPU what jeffg lft0 08Jul02 21day(s) /usr/sbin/getty /de jeffg pts/0 08Jul02 14:00 7 whodo -l jeffg pts/1 16Jul02 10day(s) 44 9 /usr/bin/ksh jeffg pts/2 12Jul02 11 8:39 4 /usr/bin/ksh root pts/3 04:26PM 7 -ksh
- The command whodo -lX on the host kq11
produces the following output:
12:50AM up 3 day(s), 1 hr(s), 41 mins(s) 4 user(s) tty login@ idle JCPU PCPU what User tty0 Wed11PM 2day(s) -ksh root pts/0 12:12AM tn 0 root pts/1 12:20AM whodo -lX long_username_greater_than_eight_characters pts/2 Fri05AM 2day(s) -ksh root
Files
Item | Description |
---|---|
/usr/sbin/whodo | Contains the whodo command. |
/etc/utmp | Contains the list of users. |