How can a simple server load measurement be taken with server side only
<p>I am looking for/would like to write a simple load testing script in C# for my server. I would particularly like to measure cpu and memory load (i.e. how little of each are free); I am not concerned about band width.</p>

<p>I guess there methods involving loops and timers but I don't know how Windows Server works - even though it is heavily loaded, the speed at which scripts are run may be unchanged.</p>

<p>I would prefer to keep the bench-marking server side if possible.</p>

<p>I would be very interested to hear from people who have done something similar or who have ideas.</p>

<p>Thanks in advance!</p>

<p>Note: The precision of the reading of cpu and memory load could be as little as red, yellow or green (a traffic light) if that is all that can be done on the server alone.</p>
