On Mon, Feb 28, 2011 at 4:03 AM, Kishore Kumar Pusukuri
<kish...@cs.ucr.edu> wrote:
> Hi,
> Using either uptime(1) command or getloadavg(3) system call, we can measure 
> average system load with minutes resolution. However, I would like to measure 
> average system load (average number of active threads) with milliseconds 
> resolution.
>
> Could you suggest me a way, please?

What do you *really* want to get out of this measurement?

The whole point of the averages is that they average over a sufficiently
long interval to dampen out the noise. Measuring those sorts of values
over very short intervals (in particular something like milliseconds) isn't
directly going to give you anything useful.

Over intermediate times (seconds) you can use the unix:0:sysinfo kstat
like vmstat does (see the source at
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/stat/vmstat/vmstat.c
for details).

As all this boils down to "what's scheduled to run" then investigation
of the dtrace sched provider may be worthwhile.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
observability-discuss mailing list
observability-discuss@opensolaris.org

Reply via email to