[Info-vax] How to obtain percentage of a given CPU consumed by a process
johnwallace4 at yahoo.co.uk
johnwallace4 at yahoo.co.uk
Sun Jun 5 04:56:33 EDT 2016
On Saturday, 4 June 2016 20:17:52 UTC+1, Hans Vlems wrote:
> I'll bite: how?
There may be a strong hint in the wording: "whilst *recording* minimal
CPU time".
Is *recording* CPU time in the usual OS-provided way guaranteed to
produce a result which will be the same time (give or take a little
bit) as the actual *used* CPU time?
Generally not, on VMS or elsewhere, on VAX or elsewhere, though
on Alpha the RPCC instruction provided an interesting approach to
accurately seeing how much processor time a process has really
used. Maybe x86-64 has something similar by now, maybe ARM also.
I can't remember whether the approach I'd use can be done just with
non-priv code, but I'm pretty sure I have done it, as an exercise in
demonstrating that trusting the usual tools is a good start, but not
always reliable.
Let's see what people come up with. Have a lot of fun. Back in a
while...
More information about the Info-vax
mailing list