C.7 prstat Command
C.7 prstat Command
The prstat command repeatedly tests all the active processes on the system, and provides statistics based on the specified output mode and sorting order. The output from the prstat command is similar to that from the ps command.
Table C-7 lists the options of the prstat command and how those options are useful for troubleshooting.
Table C-7 lists the options of the prstat command and how those options are useful for troubleshooting.
Option | Description | Application |
---|---|---|
No options | Displays a list of processes sorted in descending order of CPU resource consumption. The list is restricted by the height of the terminal window and the number of processes. The output is automatically updated every 5 seconds, and is stopped by pressing the [Ctrl] + [C] keys. | The output allows you to view process IDs, the User IDs, memory usage, status, CPU usage, and command names. |
-n number |
Restricts the number of lines in the output. | Limits the amount of displayed data, so that you can identify those processes that are consuming excessive amounts of resources. |
-s key |
Sorts the list by key parameter. | The list can be sorted by cpu (default), time, and size. |
-v |
Displays the information in detailed mode. | Allows you to view other parameters. |
The following example shows the output from the prstat command.
# prstat -n 5 -s size PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 497 root 55M 49M sleep 59 0 0:01:12 0.0% fmd/37 600 root 41M 36M sleep 59 0 0:09:13 0.0% ldmd/13 11 root 37M 33M sleep 59 0 0:00:17 0.0% svc.startd/12 468 root 24M 12M sleep 59 0 0:00:00 0.0% inetd/4 13 root 20M 19M sleep 59 0 0:00:37 0.0% svc.configd/24 Total: 49 processes, 669 lwps, load averages: 0.05, 0.05, 0.04 # |
< Previous Page | Next Page >