oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

What Is Activity Monitor (or How to Take Your Mac's Pulse)
Pages: 1, 2, 3, 4

What's Keeping My Computer Busy?

The processes list shows every application, utility, or daemon currently running on your computer, whether it's visible to you or not. Each running process has a row of its own. You can sort the display in different ways by clicking or option-clicking on any of the column headings. Let's go through the columns one by one, to see what they're for.

The left-most column displays the Process ID. This is a number assigned to each process by the computer. The number increases incrementally when another app is opened or process begun. The higher the process IDs are, the longer your computer has been running and adding processes to the list.

If you sort the list by Process ID, you can quickly see what the most recent applications or processes are. If you've just launched something that's slowed the whole machine to a near-standstill, this might help you spot the culprit.

Next along to the right is the Process Name, which is straightforward enough. The names you recognize in this list are the applications you're running, and they will probably be visible in the Dock or the Menu Bar. Anything you don't recognize here is likely to be a system process running behind the scenes.

Sorting the list by Process Name is handy for finding the details of a particular app. If one app is unresponsive, or keeps displaying the Spinning Beach Ball of Doom, you might be able to find out why.

After that there's the User column. Every running process is under the control of one of the users on your computer--although in this case, the computer itself can be a user. Processes assigned to root were instigated by the operating system, the kernel, or some other high-level part of the system. Most of these are things that are essential to the smooth running of your system--such as automount, which makes external hard disks or optical disks appear magically on your desktop when you connect or insert them.

There's a toolbar control for sorting by User. It lets you toggle the list between showing only the processes owned by you, or only those owned by the computer, or all processes. You can also choose to see only active, inactive, windowed, or your selected apps. This comes in handy when you have a very large number of processes running, and need to filter the list to make it easier to spot problems.

The next column is % CPU, and this is where things start to get really interesting.

This column shows what percentage of your processor's available capacity is being consumed by one single process. Usually, processes that are actively working on a task will move to the top of this column if you choose to sort the list with it.

So if iPhoto is importing pictures, Mail is fetching messages, or GarageBand is working on your pop masterpiece, those apps will be eating up much more processor oomph than TextEdit or Preview sitting quietly in the background. When your computer is slowing down, you can soon spot which process is hogging the CPU.

Next along is the # Threads column. A thread is a sequence of instructions being performed by one application or process, so one app might be running several of them simultaneously. The more threads you see shown in this column, the busier that application is. If there are several threads visible, but nothing appears to be happening on your screen, it might be a sign that the application is busy doing something in the background.

Finally, you'll see two more columns showing Real Memory and Virtual Memory, shown as a number of megabytes in use. Real memory is simply the physical memory you have installed in your machine--the sticks of 256MB, 512MB or 1GB RAM that are fixed into dedicated slots on the motherboard. This is the memory where the computer actually does work, where processes are run.

Virtual memory, on the other hand, is fake memory that uses a chunk of your hard disk. A specialist program (on OS X, it's the dynamic_pager process--look at the All Processes view in Activity Monitor and you'll find it lurking somewhere down the list) keeps track of everything that's in real memory and periodically assigns some data to virtual memory, by means of an essential swap file on the hard disk. Stuff gets sent to the swap file until it is needed, at which point it is called back into real memory. Something else is stored in virtual memory in its place.

This is how today's RAM-hungry operating systems and applications manage to run lots of stuff at the same time. Now that plenty of RAM and plenty of hard disk space come as standard on every new computer, it's easy for the system to swap data between different types of memory and make the most efficient use of the hardware available.

There are other columns you can select for viewing if you wish. Under View -> Columns, you'll see CPU Time, # Ports, Private Memory, Shared Memory, Messages Sent, and Messages Received. All of them have their own uses, but we shan't go into any further detail on them in this article.

Pages: 1, 2, 3, 4

Next Pagearrow