O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other Tools

ps

The ps command, short for process status, has some features for keeping tabs on your program’s memory use. Here is one use of ps:

$​ ​p​s​ ​a​u​x​w​ ​|​ ​g​r​e​p​ ​s​o​m​e​t​h​i​n​g​-​i​n​t​e​r​e​s​t​i​n​g​

where something-interesting is the PID or program name of interest. So, something like

$​ ​p​s​ ​a​u​x​w​ ​|​ ​g​r​e​p​ ​F​i​n​d​e​r​

will show some information about the Finder process:

m​a​r​k​d​ ​ ​ ​2​2​9​ ​ ​ ​0​.​0​ ​ ​1​.​9​ ​ ​ ​ ​2​9​1​2​5​8​4​ ​ ​3​3​1​3​6​ ​ ​?​?​ ​ ​S​ ​ ​ ​0​:​4​3​.​1​1​ ​/​S​y​s​t​e​m​/​ ​\​
L​i​b​r​a​r​y​/​C​o​r​e​S​e​r​v​i​c​e​s​/​F​i​n​d​e​r​.​a​p​p​/​C​o​n​t​e​n​t​s​/​M​a​c​O​S​/​F​i​n​d​e​r​ ​-​p​s​n​_​0​_​2​6​2​1​

In order, the columns are:

  1. Owner of the process (markd).

  2. Process ID ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required