Monitoring CPU time

Francois Tigeot ftigeot at wolfpond.org
Mon Apr 5 10:04:05 PDT 2010


On Mon, Apr 05, 2010 at 09:21:41AM -0700, Matthew Dillon wrote:
> 
>     systat -pv 1
> 
>     In terms of extracting it in a script... I dunno about that.

I'm beginning to think I will need to write a C program for that. top(1)
uses a kinfo_proc structure to get its data and AFAIK there's no easy-to-use
sysctl.

systat and vmstat give only an instant snapshot of the system state with
1 second precision or so. An average on 5 minutes would be much better for my
purposes.

-- 
Francois Tigeot





More information about the Users mailing list