Groups | Blog | Home
all groups > dotnet general > april 2005 >

dotnet general : Measure the load on a computer


Michael A. Covington
4/14/2005 7:19:39 PM
We have a computer that multiple people use through Remote Desktop.

Is there a measurement analogous to UNIX's "load average" -- average number
of processes trying to run, or something -- that can be read by a program
running as an ordinary user (not administrator)?

I'm willing to write programs in Win32 or .NET, or use utilities, or
anything reasonable. I want to end up with something that can run whenever
a user logs on, to tell him how heavily loaded the machine is.

Thanks!

Michael A. Covington
4/14/2005 10:47:42 PM
[quoted text, click to view]

I should add that I'm interested in situations where the load is more than
100%, i.e., there are processes waiting to run. Loads up to 100% are
viewable in Task Manager. But a non-administrator cannot view applications
other than his/her own.

AMercer
4/15/2005 4:28:03 AM
the microsoft pstat.exe utility may help, but i am unfamiliar with it. maybe
you could run it periodically, read its output, and infer the info you want.
it seems that an ingredient you need is the amount of time a thread is ready
to be dispatched but is not yet dispatched (thread latency?). i'll be
watching this question with interest.

[quoted text, click to view]
Michael A. Covington
4/18/2005 12:00:00 AM

[quoted text, click to view]

You can say that again. I wonder if there is a Resource Kit tool that does
this.

For those who tuned in late: I'm wanting to measure the load on a
multi-user Windows server whose CPU is almost always 100% occupied (in UNIX
terms, has a load average greater than 1.0), and I want the equivalent of
the UNIX load average (i.e., basically the number of processes sharing the
CPU).

Measuring up to 100% (with Task Manager) is not good enough.


AMercer
4/18/2005 5:12:38 AM
still watching with interest. the silence is deafening.
AMercer
6/28/2005 5:26:02 AM
[quoted text, click to view]

Does this computer run either XP SP1 or Windows Server 2003? If so, try:

BOOL GetSystemTimes(
LPFILETIME lpIdleTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime
);
AddThis Social Bookmark Button