| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ps - Report Process Status Information about processes running on the system can be viewed using the ps command. This will provide a snapshot, at a single moment in time, of what is happening on the system. This command has a wide number of options, which affects how the processes are viewed and what information about them is displayed. A partial example of the results of running the ps command is: ps aux Heres a sample output: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 1488 476 ? S Jul20 0:05 init root 2 0.0 0.0 0 0 ? SW Jul20 0:01 [keventd] root 3 0.0 0.0 0 0 ? SWN Jul20 0:00 [ksftrqd] root 4 0.0 0.0 0 0 ? SW Jul20 0:34 [kswapd] root 5 0.0 0.0 0 0 ? SW Jul20 0:00 [bdflush] root 6 0.0 0.0 0 0 ? SW Jul20 0:00 [kupdatd] root 8 0.0 0.0 0 0 ? SW Jul20 0:00 [scsieh0] root 9 0.0 0.0 0 0 ? SW Jul20 0:00 [khubd] root 11 0.0 0.0 0 0 ? SW Jul20 11:46 [kjourld] root 535 0.0 0.0 1616 580 ? S Jul20 17:54 syslogd-m root 540 0.0 0.0 2332 520 ? S Jul20 4:41 klogd -2 root 645 0.0 0.0 3388 596 ? S Jul20 0:00 /usr/sshd root 665 0.0 0.1 3180 916 ? S Jul20 0:00 xinetd-stay root 685 0.0 0.1 2612 932 ? S Jul20 0:00 /bin/sh root 757 0.0 0.0 1524 432 ? S Jul20 0:01 gpm -t imps root 798 0.0 0.0 1972 644 ? S Jul20 0:00 crond xfs 852 0.0 0.4 9616 3504 ? S Jul20 0:52 xfs -drpprv snort870 0.0 0.4 12968 3308 ? S Jul20 18:53 /bin/snort -D -i eth0 root 906 0.0 0.5 8508 4008 ? S Jul20 0:11 cupsd root 963 0.0 0.0 1464 380 tty3 S Jul20 0:00 /sbin/mngty tty3 This system was running X Windows with a number of applications open and several servers running, the full listing showed over 80 separate processes. Quite a large chunk of information! One way to reduce the amount of information shown can be to look at only processes associated with a certain user in the following manner: [phil@virtual1 phil]$ ps aux|grep phil This will yield the following, more manageable output: root 22314 0.0 0.1 3752 1004 ? S Jul27 0:00 login -- phil phil 22315 0.0 0.1 3276 1212 tty1 S Jul27 0:00 -bash phil 22360 0.0 0.1 2580 944 tty1 S Jul27 0:00 /bin/sh /X11R phil 22371 0.0 0.0 2780 608 tty1 S Jul27 0:00 xinit /etc/X1 phil 22376 0.0 0.1 2592 980 tty1 S Jul27 0:00 /bin/sh phil 22425 0.0 1.0 25104 8100 ? S Jul27 0:03 kdeinit: phil 22428 0.0 1.2 25072 9732 ? S Jul27 0:14 kdeinit: dcop phil 22431 0.0 1.4 26180 10856 ? S Jul27 0:01 kdeinit: klau phil 22433 0.0 1.7 27904 13472 ? S Jul27 1:20 kdeinit: kded This also is an excellent example of a use of the grep command to filter the output of the ps command and only show the information desired.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||