Contenues dans
Trouver plus de documentation
Ressources d'assistance comprises
| Télécharger cet ouvrage au format PDF (4770 Ko)
prstat(1M)
NAME
| SYNOPSIS
| DESCRIPTION
| OPTIONS
| OUTPUT
| OPERANDS
| EXAMPLES
| EXIT STATUS
| ATTRIBUTES
| SEE ALSO
| NOTES
NAME
prstat- report active process statistics
SYNOPSIS
prstat [-acJLmRtTv] [-C psrsetlist] [-j projlist] [-k tasklist] [-n ntop[,nbottom]] [-p pidlist] [-P cpulist] [-s key | -S key ] [-u euidlist] [-U uidlist] [interval [count]]
DESCRIPTION
The prstat utility iteratively examines all
active processes on the system and reports statistics based on the selected output mode and sort order. prstat provides options to examine only processes matching specified PIDs, UIDs, CPU IDs, and processor
set IDs.
The -j, -k, -C, -p, -P, -u, and -U options accept lists as arguments. Items in a list can be either separated by commas or enclosed in quotes and separated by commas or spaces.
If you do not specify an option, prstat examines all processes and reports statistics sorted by CPU usage.
OPTIONS
OUTPUT
The following list defines the column headings and the meanings of a prstat report:
- PID
-
The process ID of the process.
- USERNAME
-
The real user (login) name or real user ID.
- SIZE
-
The total virtual memory size of the process, including all mapped files and devices, in kilobytes (K), megabytes (M), or gigabytes (G). The resident set size of the process (RSS),
in kilobytes (K), megabytes (M), or gigabytes (G).
- STATE
-
The state of the process:
- cpuN
-
Process is running on CPU N.
- sleep
-
Sleeping: process is waiting for an event to complete.
- run
-
Runnable: process in on run queue.
- zombie
-
Zombie state: process terminated and parent not waiting.
- stop
-
Process is stopped.
- PRI
-
The priority of the process. Larger numbers mean higher priority.
- NICE
-
Nice value used in priority computation. Only processes in certain scheduling classes have a nice value.
- TIME
-
The cumulative execution time for the process.
- CPU
-
The percentage of recent CPU time used by the process.
- PROCESS
-
The name of the process (name of executed file).
- LWPID
-
The lwp ID of the lwp being reported.
- NLWP
-
The number of lwps in the process.
The following columns are displayed when the -v or -m option is specified
- USR
-
The percentage of time the process has spent in user mode.
- SYS
-
The percentage of time the process has spent in system mode.
- TRP
-
The percentage of time the process has spent in processing system traps.
- TFL
-
The percentage of time the process has spent processing text page faults.
- DFL
-
The percentage of time the process has spent processing data page faults.
- LCK
-
The percentage of time the process has spent waiting for user locks.
- SLP
-
The percentage of time the process has spent sleeping.
- LAT
-
The percentage of time the process has spent waiting for CPU.
- VCX
-
The number of voluntary context switches.
- ICX
-
The number of involuntary context switches.
- SCL
-
The number of system calls.
- SIG
-
The number of signals received.
Under the -l option, one line is printed for each lwp in the process and some reporting fields show the values for the lwp, not the process.
OPERANDS
EXAMPLES
Example 1 Reporting the Five Most Active Super-User Processes
The following command reports the five most active super-user processes running on CPU1 and CPU2:
example% prstat -u root -n 5 -P 1,2 1 1
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/LWP
306 root 3024K 1448K sleep 58 0 0:00.00 0.3% sendmail/1
102 root 1600K 592K sleep 59 0 0:00.00 0.1% in.rdisc/1
250 root 1000K 552K sleep 58 0 0:00.00 0.0% utmpd/1
288 root 1720K 1032K sleep 58 0 0:00.00 0.0% sac/1
1 root 744K 168K sleep 58 0 0:00.00 0.0% init/1
TOTAL: 25, load averages: 0.05, 0.08, 0.12
|
Example 2 Displaying Verbose Process Usage Information
The following command displays verbose process usage information about processes with lowest resident set sizes owned by users root and john.
example% prstat -S rss -n 5 -vc -u root,john
PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP
1 root 0.0 0.0 - - - - 100 - 0 0 0 0 init/1
102 root 0.0 0.0 - - - - 100 - 0 0 3 0 in.rdisc/1
250 root 0.0 0.0 - - - - 100 - 0 0 0 0 utmpd/1
1185 john 0.0 0.0 - - - - 100 - 0 0 0 0 csh/1
240 root 0.0 0.0 - - - - 100 - 0 0 0 0 powerd/4
TOTAL: 71, load averages: 0.02, 0.04, 0.08
|
EXIT STATUS
ATTRIBUTES
SEE ALSO
NOTES
The snapshot of system usage displayed by prstat is true only for a split-second, and it may not be accurate by the time it is displayed. When the -m option is specified, prstat tries to turn on microstate accounting for each process; the original
state is restored when prstat exits. See proc(4) for additional information about the microstate accounting facility.
SunOS 5.9 Last Revised 4 Jan 2001
NAME
| SYNOPSIS
| DESCRIPTION
| OPTIONS
| OUTPUT
| OPERANDS
| EXAMPLES
| EXIT STATUS
| ATTRIBUTES
| SEE ALSO
| NOTES
|