Seeing All the Processes

To see all of the processes running on your Mac OS X computer, we can use the ProcessViewer application we introduced in Chapter 2. Figure 9-2 contains a screen shot of ProcessViewer displaying the user processes at a given time, whereas Figure 9-3 shows the administrator (or root) processes. Figure 9-2 contains additional process ID information at the bottom of the window.

User processes with process ID information

Figure 9-2. User processes with process ID information

Administrator (root) processes

Figure 9-3. Administrator (root) processes

We can also use the ps command in a Terminal (Unix) window to see all of the running processes. The ps command has many options, but using the options a, u, and x gives us a user-readable listing of all the currently running processes. (ProcessViewer’s output is nicer, but it contains less information than the ps command’s output.)

Enter ps auxww in a Terminal window (the suffix ww is for wide format). Your listing should contain many of the same programs as the following listing (the processes in our ps listing differ from those in our ProcessViewer listing). Some of the processes running on your computer are bound to differ; it depends on which programs you are running and how your system is configured. wsurfer is the username of the user who logged in, and we’ve formatted the shell output a bit to make it easier to read.

% ps auxww
USER      PID %CPU %MEM      VSZ    RSS  TT  STAT      TIME COMMAND
wsurfer   615   4.2  5.1    38040  13248  ??  Ss     0:01.24 
   /System/Library/CoreServices/WindowServer console
wsurfer    63   0.4  0.6     9400   1664  ??  Ss     0:03.35 
   /System/Library/Frameworks/ApplicationServices.framework/Versions/A/
   Frameworks/ATS.framework/Versions/A/Support/ATSServer
root       41   0.0  0.6     3372   1480  ??  Ss     0:00.00 kextd
root       67   0.0  0.0     1276     96  ??  Ss     0:01.85 update
root       70   0.0  0.0     1296    108  ??  Ss     0:00.00 dynamic_pager
   -H 40000000 -L 160000000 -S 80000000 -F /private/var/vm/swapfile
root       93   0.0  0.1     2332    372  ??  Ss     0:00.38 
   /sbin/autodiskmount -va
root      116   0.0  0.6     3820   1496  ??  Ss     0:00.93 configd
root      151   0.0  0.1     1288    156  ??  Ss     0:00.11 syslogd
root      157   0.0  0.0     1604    120  ??  Ss     0:00.00 
   /usr/libexec/CrashReporter
root      179   0.0  0.1     1580    368  ??  Ss     0:00.23 netinfod -s local
root      186   0.0  0.2     2448    488  ??  Ss     0:01.32 lookupd
root      196   0.0  0.1     1528    300  ??  S<s    0:01.99 ntpd -f 
   /var/run/ntp.drift -p /var/run/ntpd.pid
root      205   0.0  0.6     8968   1476  ??  S      0:03.54 AppleFileServer
root      209   0.0  0.4     2872   1060  ??  Ss     0:00.85 
   /System/Library/CoreServices/coreservicesd
root      216   0.0  0.0     1288    116  ??  Ss     0:00.00 inetd
root      226   0.0  0.0     1276     84  ??  S      0:00.00 nfsiod -n 4
root      227   0.0  0.0     1276     84  ??  S      0:00.00 nfsiod -n 4
root      228   0.0  0.0     1276     84  ??  S      0:00.00 nfsiod -n 4
root      229   0.0  0.0     1276     84  ??  S      0:00.00 nfsiod -n 4
root      236   0.0  0.1     2192    320  ??  Ss     0:00.00 automount 
   -m /Network/Servers -fstab -m /automount -static
root      239   0.0  0.4     3684   1068  ??  S      0:00.20 DirectoryService
root      249   0.0  0.3     2136    656  ??  Ss     0:00.23 
   /System/Library/CoreServices/SecurityServer
root      255   0.0  0.1     1536    224  ??  Ss     0:00.42 /usr/sbin/sshd
root      260   0.0  0.1     1560    152  ??  Ss     0:00.07 cron
root      267   0.0  0.2     5108    528  ??  Ss     0:03.20 slpd -f 
   /etc/slpsa.conf
wsurfer   616   0.0  1.7    46392   4464  ??  Ss     0:01.65 
   /System/Library/CoreServices/loginwindow.app/loginwindow console
wsurfer   623   0.0  0.6    18624   1612  ??  Ss     0:00.93 
   /System/Library/CoreServices/pbs
wsurfer   624   0.0  5.7    75876  14816  ??  S      0:02.45 
   /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0_262145
wsurfer   628   0.0  1.3    53288   3292  ??  S      0:00.54 
   /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0_393217
wsurfer   629   0.0  1.0    56400   2748  ??  S      0:00.46 
   /System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/
   SystemUIServer -psn_0_524289
wsurfer   630   0.0  1.1    59632   2960  ??  S      0:00.60 
   /Applications/Clock.app/Contents/MacOS/Clock -psn_0_655361
wsurfer   631   0.0  0.5    39072   1324  ??  S      0:00.13 
   /Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/
   MacOS/iTunesHelper -psn_0_786433
wsurfer   632   0.0  2.0    62820   5168  ??  S      0:01.37 
   /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_917505
wsurfer   633   0.0  0.4     5876    940 std  Ss     0:00.15 -tcsh (tcsh)
root      572   0.0  0.0        0      0 con- Z      0:00.00  (AEServer)
root      638   0.0  0.1     1324    288 std  R+     0:00.01 ps auxww
root        1   0.0  0.1     1292    248  ??  SLs    0:00.01 /sbin/init
root        2   0.0  0.1     1300    144  ??  SL     0:01.31 /sbin/mach_init
%

Table 9-1 contains descriptions of the meanings of the different fields in the ps listing.

Table 9-1. Fields in the ps command output

Field

Meaning

USER

Username of the user who owns the process; usually root, for processes run by the system, or your username.

PID

Process identifier of each process.

%CPU

Percentage of CPU time the process is using.

%MEM

Percentage of physical memory the process is using.

VSZ

Amount of virtual memory the process is using.

RSS

Amount of process resident in physical memory.

TT

Terminal being used by the process; a “??” means that the process is not associated with any terminal. Programs that are run from the Mac OS X Terminal application are usually associated with a terminal, whereas GUI programs are not.

STAT

Status of the process: R is running, S is stopped, W is waiting, N is “niced” (running with reduced priority).

TIME

Length of time the process has been running.

COMMAND

Command that ran the program that started the process.

You can look up the ps command by typing man ps in a Terminal window to learn further details concerning this command’s output.

Most of the processes displayed in the ps auxww listing above have an important function. Table 9-2 lists what each one does.

Table 9-2. Description of the processes in our ps listing

Process

Function

slpd -f /etc/slpsa.conf

This command is not documented.

/sbin/mach_init

mach_init is the master Unix process that starts all other processes.

kextd

This command is not documented.

ATSServer

Although this command is not documented, we believe that it is the Adobe Type Server.

update

Flushes internal filesystem caches to the disk every 30 seconds.

dynamic_pager

System memory paging daemon.

autodiskmount

Disk automounter.

configd

System Configuration Server.

syslogd

System logging daemon.

CrashReporter

Reports crashes.

netinfod

NetInfo Daemon.

lookupd

Lookup daemon, which makes NetInfo run faster.

ntpd

Network Time Protocol daemon, which keeps the computer’s clock synchronized with the time servers.

AppleFileServer

File server for AppleShare.

coreservicesd

Core services daemon.

inetd

Internet daemon, which starts a variety of Internet daemons.

nfsiod

NFS IO daemon, which provides a write-back cache for the Network File Service.

DirectoryService

Provides directory services.

automount

Auto NFS mounter, which automatically mounts NFS filesystems when requested.

pbs

Pasteboard Server.

SecurityServer

Core Services Security Server.

sshd

SSH server.

cron

Program that automatically runs programs listed in the file/usr/lib/crontab at predetermined times.

WindowServer

Mac OS X Window Server.

loginwindow

Process that runs the login window.

pbs

Mac OS X Pasteboard server, which coordinates sharing of data on the various pasteboards.

Finder

Mac OS X Finder.

Dock

Mac OS X Dock.

SystemUIServer

Provides command bar icon menus.

Terminal

Terminal application.

CPU Monitor

CPU monitor.

ps auxww

ps program, which generated this listing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.137