C.6 ps Command
C.6 ps Command
The ps command displays a list of process statuses. When no options are specified, the command outputs information on those processes that have the same execution user ID as the user executing the command and the same control terminal.
If you specify an option, output information is controlled by the option.
Table C-6 lists the options of the ps command and how those options are useful for troubleshooting.
If you specify an option, output information is controlled by the option.
Table C-6 lists the options of the ps command and how those options are useful for troubleshooting.
Option | Description | Application |
---|---|---|
-e |
Displays information on various processes. | Allows you to view the process IDs and files that can be executed. |
-f |
Generates a complete list. | Allows you to view process information such as the user ID, the parent process ID, the execution time, and the paths to the executed files. |
-o option |
Selects any items from those that can be configured as outputs. The pid, pcpu, pmem, and comm options display the process ID, CPU usage, memory usage, and corresponding executable files, respectively. | Allows you to check only the most important information. By determining the resource usage rate, you can identify those processes that could potentially affect the system performance or even cause a hang up. |
The following example shows the output from the ps command.
# ps -eo pcpu,pid,comm|sort -rn %CPU PID COMMAND 0.0 674 sort 0.0 673 ps 0.0 637 -bash 0.0 636 login 0.0 634 /usr/sbin/in.telnetd 0.0 629 -bash 0.0 613 /usr/bin/login 0.0 602 /usr/lib/devchassis/devchassisd 0.0 600 /opt/SUNWldm/bin/ldmd 0.0 581 /usr/lib/inet/in.ndpd 0.0 580 /sbin/dhcpagent 0.0 577 /usr/lib/rmvolmgr 0.0 548 /usr/sbin/auditd 0.0 519 /usr/sbin/syslogd 0.0 508 /usr/lib/ssh/sshd 0.0 497 /usr/lib/fm/fmd/fmd 0.0 487 /usr/lib/hal/hald-addon-cpufreq 0.0 472 /usr/lib/autofs/automountd 0.0 470 /usr/lib/autofs/automountd 0.0 468 /usr/lib/inet/inetd 0.0 458 hald-runner 0.0 453 /usr/lib/hal/hald 0.0 450 /usr/sbin/rpcbind 0.0 421 /usr/lib/inet/proftpd 0.0 413 /usr/sbin/cron 0.0 382 /lib/svc/method/iscsid 0.0 369 /usr/lib/efcode/sparcv9/efdaemon 0.0 332 /usr/sbin/nscd 0.0 297 /usr/lib/picl/picld 0.0 272 /lib/inet/nwamd 0.0 179 /usr/lib/devfsadm/devfsadmd 0.0 176 /usr/lib/zones/zonestatd 0.0 171 /usr/lib/ldoms/drd 0.0 164 /usr/lib/ldoms/ldmad 0.0 161 /usr/lib/utmpd 0.0 158 /usr/lib/dbus-daemon 0.0 128 /usr/lib/sysevent/syseventd 0.0 112 /usr/lib/pfexecd 0.0 98 /lib/inet/in.mpathd 0.0 74 /lib/crypto/kcfd 0.0 73 /lib/inet/ipmgmtd 0.0 59 /usr/sbin/dlmgmtd 0.0 38 /lib/inet/netcfgd 0.0 13 /lib/svc/bin/svc.configd 0.0 11 /lib/svc/bin/svc.startd 0.0 8 vmtasks 0.0 7 intrd 0.0 6 kmem_task 0.0 5 zpool-rpool 0.0 3 fsflush 0.0 2 pageout 0.0 1 /usr/sbin/init 0.0 0 sched # |
< Previous Page | Next Page >