ps

ps

ps lists the currently running processes on the system. Each time a program runs on the system a number of processes are started and run to make a program work. These processes or tasks can be listed with the ps command.

 

ps will list processes connected with your account

 

ps aux will show all processes on the machine

 

-a current user's processes shown

-f display process family trees, all of the processes related to a daemon for example

-l long format

-u user format with names and start times

-w wide output format, easier to read

-x see processed not started with terminal, usually a daemon

-C display processes used with a command

-U display processes associated with a user

 

ps -U mike

The example shows each process that the user owns

mike@ub:~$ ps -U mike

PID TTY TIME CMD

7596 ? 00:00:00 x-session-manag

7641 ? 00:00:00 ssh-agent

7644 ? 00:00:00 dbus-launch

7645 ? 00:00:00 dbus-daemon-1

7647 ? 00:00:01 gconfd-2

7650 ? 00:00:00 gnome-keyring-d

7652 ? 00:00:00 esd

7654 ? 00:00:00 bonobo-activati

7656 ? 00:00:01 gnome-settings-

7659 ? 00:00:04 gam_server

7667 ? 00:00:00 xscreensaver

7691 ? 00:00:00 gnome-smproxy

7693 ? 00:00:05 metacity

7701 ? 00:00:03 gnome-panel

7703 ? 00:00:12 nautilus

7705 ? 00:00:00 gnome-volume-ma

7711 ? 00:00:00 update-notifier

7713 ? 00:00:01 gnome-cups-icon

7718 ? 00:00:04 wnck-applet

7720 ? 00:00:00 trashapplet

7723 ? 00:00:00 gnome-vfs-daemo

7731 ? 00:00:00 mapping-daemon

7736 ? 00:00:00 clock-applet

7738 ? 00:00:00 notification-ar

7740 ? 00:00:00 gnome-netstatus

7742 ? 00:00:01 battstat-applet

7744 ? 00:00:00 mixer_applet2

7747 ? 00:04:17 firefox-bin

8394 ? 00:00:44 soffice.bin

9399 ? 00:00:00 gksudo

10141 ? 00:00:00 gnome-terminal

10143 ? 00:00:00 gnome-pty-helpe

10144 pts/0 00:00:00 bash

10160 pts/0 00:00:00 ps

 

 

Often you may want to only look at the processes for one command:

 

ps -aux | grep sendmail

 

This example looks at the processes run by sendmail.