WARNING: This site is intended for online use only; mass-downloading of pages degrades the server and is prohibited.
If you attempt to use tools to mass-download the site, you may be blocked permanently by automated software.
If you want to read this CertiGuide offline, please use one of the links on the left to purchase a convenient PDF copy. Thank you.

Read this whole guide offline with no ads, for a very low price!
Click Here!

Custom Search






Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System
      9  Command Line Functions And Administrative Utilities
           9  Process Management

Previous Topic/Section
Overview of Processes, Sessions and Daemons
Previous Page
Pages in Current Topic/Section
1
Next Page
pstree - Show Process Relationships
Next Topic/Section

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

Here’s 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.


Previous Topic/Section
Overview of Processes, Sessions and Daemons
Previous Page
Pages in Current Topic/Section
1
Next Page
pstree - Show Process Relationships
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



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.