Main index

Introducing UNIX and Linux


Maintaining your Linux OS

Overview
Basic management
      Passwords
      Checking storage space
      Checking processes
      Managing users
      Shutting down and restarting your computer
      Automating tasks
Linux file management
      File compression and archiving tools
      File managers
      File splitters
Linux networking
      Getting started
      MAC and IP addresses
      Domain names
      Adding a Linux host to an existing network
      Building a private network
      Configuring the network interface
Security
Uninstalling Linux
Summary

Checking processes

Using the command ps it is possible to view the processes which are currently running on your system. By including a combination of run-time flags it is possible to output the user (UID), process identifier (PID), parent process identifier (PPID), start time (STIME), cumulative execution time (TIME) and command name (CMD) of each process on the system. The output will look something like this:

UID   PID    PPID   C  STIME     TTY     TIME   CMD
Croe  29527  16663  0  15:55:44  pts/37  38:24  netscape 
Jara  29793  29792  0  16:25:55  pts/17  0:01   gs 
sue   27128  1      0  12:02:30  pts/35  0:01   ttsession

This output is the result of running the command ps -af. For more on the runtime flags of ps type man ps

It is worth checking the processes on your system from time to time as occasionally when you close down an application, or something crashes, the associated processes remain. If processes are defunct, usually written DEFUNCT in the CMD column of the ps output, or are simply unwanted, then they can be removed using the command kill. It is a rule that processes can only be killed by their owners or by the root user; this is useful as it saves you (or anyone else) inadvertently killing the active processes of other users.


Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck