Tell me in plain english what my Mac is doing
September 22, 2006 10:30 PM   Subscribe

I want to know what's going on when my mac is churning the HD, or becomes unresponsive due to apps loading, or doing maintenance. Does such an app exist?

Every time my (1st Gen G4) mac mini locks up for a few seconds, or slows to a crawl because I accidentally opened an HD quicktime movie link instead of the "large" version of a movie trailer, I'm left wondering what exactly it's doing, how long it'll take until I can use it in a productive manner again, and what app I could force quit to make things go faster.

Is there any app that'll say, basically, "I'm turning on the fan now cos app XYZ is requesting more power" or "Everything's slowing down because some port-scanning kiddy tried to access the /Sites/ sub-directory and I'm writing that in your 200MB error.log"?

I know the activity monitor sorta does that, but it's not very helpful to know that the mysqld process is now using 2.21% instead of 2.19% of the CPU.
posted by slater to Computers & Internet (13 answers total)
 
A lot of times, such slowdowns and HD churning indicate that you're low on memory and your computer is using the page file/writing memory to disk.

I'm not a mac person, so I can't tell you the appropriate app to use to check this, but it should be easy enought o accomplish. I'm also willing to bet that if you popped some more ram into the computer, your problems would become less frequent.
posted by chrisamiller at 10:55 PM on September 22, 2006


The technical term for what Chris just described is "thrashing".
posted by Steven C. Den Beste at 11:14 PM on September 22, 2006


The following link; specifically, this comment, may assist you with learning how to collect statistics about your OS X (and generically, UNIX) machine as it works.
posted by Blazecock Pileon at 11:16 PM on September 22, 2006


Response by poster: Chrisamiller: I know that, but I've maxed out my lil mac mini with 1Gb of RAM (already upgraded from 512Mb)

Blazecock: errr... that goes to someone's user profile? Will Patrick McGoohan help me solve my Mac problems?
posted by slater at 11:58 PM on September 22, 2006


Open terminal and type "top". Press 'M' to sort by memory usage. Usually, thrashing is due to a process running out of memory and sing the HD as swap.
posted by handee at 12:45 AM on September 23, 2006


Strange, 5 posts in and nobody has mentioned the obvious?

Go into /Applications/Utilities and you'll see a handy little app called "Activity Viewer". It is effectively a nice graphical version of the aforementioned 'top'. I think by default it sorts by CPU usage, although you can mess around and sort by various columns, rearrange columns, etc.

Offhand I don't think it can show you which processes are utilizing the hard disk, but if the process in question also happens to be using the CPU at the same time (pretty common) then it'll still show up as being the culprit.
posted by cyrusdogstar at 5:25 AM on September 23, 2006


Whoops, it's Activity Monitor, not Viewer. My bad (I always launch it with Quicksilver, so I just type 'act' and up it pops). Should still be pretty obvious :)
posted by cyrusdogstar at 5:28 AM on September 23, 2006


MenuMeters will give you an idea of what your system is doing at any given time. It can show you the two most important statistics for figuring out why your computer is slowing down: CPU usage and paging activity.

Your fan is turning on because your CPU has been at 100% for a little while and has heated up. I don't believe there's another explanation for the fan.

Paging is swapping memory from RAM (fast) to your hard drive (slooooooooooooow) and back again; virtual memory. Chances are that's whats causing a lot of the slowdowns you're experiencing.

Install MenuMeters and keep an eye on those two things and you'll get an idea of what's causing slowdowns on your system.

Finally, you can force-quit any app by Ctrl clicking (or right clicking) any icon in the Dock, then holding down Option. The "Quit" choice will become "Force Quit."
posted by revgeorge at 7:21 AM on September 23, 2006


Best answer: OP: I know the activity monitor sorta does that, but it's not very helpful to know that the mysqld process is now using 2.21% instead of 2.19% of the CPU.

Answers: "try top", "try activity monitor", "try menumeters"

Boy, no one really bothered to read the question.

Your answer is no, there currently exists no such Macintosh application that will do what you want.
posted by WCityMike at 7:33 AM on September 23, 2006


Response by poster: OK, that's what I thought. Still, thanks for the answers! :)
posted by slater at 11:58 AM on September 23, 2006


WCityMike has a point. But beyond that, disk activity, to a great extent, except for page file use, or initial application load, can be pretty asynchronous. That means, that in a well written system/application, the disk will "prefetch" information likely to be needed shortly and store it either in the disk's own sector cache, which is a small amount of fast local memory located in the disk's own integral controller, or in buffers in main memory. Likewise, writes to the disk are generally buffered in main memory, so that the CPU doesn't have to wait for disk input/output activity (aka I/O) to occur, before doing some other waiting task. Finally, all modern personal computers make use of Paged Memory Management Units (PMMU), and Direct Memory Access (DMA), which are dedicated silicon logic subsystems that bypass the CPU for operations that require movement of information to or from main memory.

So, for all these reasons, the activities of the CPU and the disk at any given time are largely unrelated, in the immediate instant. The CPU monitor is an accurate look at what the machine is doing at any given instant, but any snapshot of outstanding disk requests would be more a comment on the success/failure of caching algorithms/prefetch predictions/storage algorithms/etc than it would be a useful look at what you, as a user, could control/interrupt/reprioritize to get more useful machine cycles. Managing the disk resources, for better or worse, and generally for much the better, has long since become the O/S responsibility, and your input as a user is neither wanted, nor helpful. Sorry, but that's the way it is. :-)
posted by paulsc at 12:00 PM on September 23, 2006


Right now, WCityMike is probably right. Soon though, DTrace^ will be able to tell you what you want to know. It'll come with Leapord.
posted by Skorgu at 1:17 PM on September 23, 2006


Holy god, did I really type Leapord? *Leopard*
posted by Skorgu at 3:30 PM on September 23, 2006


« Older What do Jews think of converts?   |   Baking rice Newer »
This thread is closed to new comments.