[X-Unix] monitor processes all night for usage?

Larry Helms lhelms at sonic.net
Mon Jul 12 02:16:01 PDT 2004


The Unix utility "sar" is often used to monitor such activity

>From a terminal window:
$ man sar

$ sar -dgpu -o $HOME/sardata.sar {repeat} {every x seconds}

Example:

$ sar -dgpu -o $HOME/sardata.sar 60 60

This will save the data to a file... Sampling 60 times... Every 60 seconds.
Adjust the {repeat} and {seconds} according to how much and how often you
want to sample performance data.

Then use this command to 'report' on all the data captured:


$ sar -dgpu -f $HOME/sardata.sar

CAUTION:  the output file generated by the first command... Could be quite
large.


> From: "William H. Magill" <magill at mcgillsociety.org>
> Reply-To: "Mac OS X Unix" <X-Unix at lists.themacintoshguy.com>
> Date: Sun, 11 Jul 2004 12:49:52 -0400
> To: "Mac OS X Unix" <X-Unix at lists.themacintoshguy.com>
> Subject: Re: [X-Unix] monitor processes all night for usage?
> 
> 
> On 11 Jul, 2004, at 11:39, luke wrote:
>> is there a simple way to monitor ALL processes all night in such a way
>> that in the morning i know why my fans in my powerbook keep running
>> all night and the machine is overly warm in the morning?
> 
> No, it's not as simple a problem as it appears on the surface.
> 
> One assumes that you are checking the dock and quitting any "inactive"
> applications. A great many apps are anything but "inactive" when simply
> "sitting there." (Mail is one that comes immediately to mind.)
> 
> You could let top run and look at the cumulative CPU time ... (Or the
> GUI version in Applications/Utilities  -- "Activity Monitor")
> 
> Disk activity is probably the culprit, but there is not an easy way to
> map which process is causing the activity. I/O statistics are reported
> by device, not process.
> 
>> would be nice if i could correlate the heat with an app or two.
> 
> You don't happen to have a CD or DVD in the drive, by chance?
> 
> If you do, it is spun up periodically (every 15 minutes?) to see what's
> on it.
> 
> 
> T.T.F.N.
> William H. Magill
> # Beige G3 - Rev A motherboard - 768 Meg
> # Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
> # PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
> # XP1000  [Alpha EV6]
> magill at mcgillsociety.org
> magill at acm.org
> magill at mac.com
> 
> 
> ----------
> Check out the Mac OS X email list FAQ
> http://www.themacintoshguy.com/lists/X.html
> 
> To unsubscribe, E-mail to: <X-Unix-off at lists.themacintoshguy.com>
> To switch to the DIGEST mode, E-mail to
> <X-Unix-digest at lists.themacintoshguy.com>
> Need help from a real person? Try.  <X-Unix-request at lists.themacintoshguy.com>
> 
> ----------
> $14.99 Unlimited Nationwide Mac Dialup and Mac Web Hosting from your Mac ISP
> Serious Mac Internet Solutions From NineWire!   http://macinternetaccess.com
> 
> DVIator   | Run Dual ADC displays on your G4 or just one on an older Mac!
> Dr. Bott  | <http://www.drbott.com/prod/DVIator.html>
> 
>  Support   | Support this list by clicking here before you buy!
> this List  |  http://www.themacintoshguy.com/support.html
> 
> OS X News, Dr.Mac, Forums, Tutorials, Tips, Hints, FAQ?s -
> http://www.osxfaq.com
> 



More information about the X-Unix mailing list