Examining the u-area of a process
In addition to the information about a process held in the
process table, the user area (``u-area'') of each process
contains information that the process uses when it is running.
The process table is permanently resident in memory, but a
process's u-area can be swapped out to disk.
The form of a u-area corresponds to the user structure
defined in <sys/user.h>.
When issued without arguments, the output of the user command contains information about the u-area of the process that is currently executing or, for a memory image, the process that was executing at the time of the panic. If the system was executing the idle loop (no process was runnable) at the time of the panic, there is no current process.
You can specify a process table slot number
(obtained from the proc command)
to user to view the u-area for that process.
You can also specify a process ID
(PID) as an argument if you prefix it with the
# unary operator.
The following example shows selected portions of the full display obtained using the -f option:
>The following sections are of interest:
user -f 86PER PROCESS USER AREA FOR PROCESS 86 USER ID's: uid: 13297, gid: 1014, real uid: 13297, real gid: 1014 supplementary gids: 1014 50 PROCESS TIMES: user: 19, sys: 131, child user: 6085, child sys: 7785 PROCESS MISC: command: ksh, psargs: -ksh proc: P#86, cntrl tty: 58,6 start: Fri Jul 15 15:23:21 1994 mem: 1e5, type: exec su-user proc/text lock: none current directory: I#360 OPEN FILES AND POFILE FLAGS: [ 0]: F#216 r [ 1]: F#216 w [ 2]: F#216 w [ 3]: F#292 r [ 4]: F#174 [ 6]: F#156 : F#246 c r w FILE I/O: u_base: 0x45164c, file offset: 10302696, bytes: 1230 segment: data, cmask: 0022, ulimit: 2097151 file mode(s): read SIGNAL DISPOSITION: sig# signal oldmask sigmask 1: 0x6ffc - 1 2: 0x7718 - 2 ...
psargstell you the name of the program and the first few arguments to the command. The
starttime shows the actual clock time when the process was initialized.
OPEN FILES AND POFILE FLAGS
F#numbers represent slot numbers in the open file table and can be used as arguments to the file command. For example, file descriptor 1 usually corresponds to the standard output (stdout) unless this was redefined. In this example, it points to slot 216 of the open file table; you can use the command file 216 to view this entry.