* Determining %age CPU usage of a process.
@ 1993-11-22 11:43 Anthony Baxter
1993-11-22 13:44 ` Wilko Bulte
0 siblings, 1 reply; 2+ messages in thread
From: Anthony Baxter @ 1993-11-22 11:43 UTC (permalink / raw)
Well, the port of 'top' to the alphas is almost done. The only teensy thing
missing is the percentage cpu calculation.
'struct proc' contains a field:
fixpt_t p_pctcpu; /* %cpu for this process during p_time */
but as far as I can tell, this is never actually set by anything.
I _know_ it must be possible to determine this, (ps does it, see below)
but how? and where is it stored?
vvvv
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 19082 92.0 1.3 9.55M 840K p5 R 22:48:39 0:54.15 a.out
As to how ps gets its info, for each process it does 3 calls to table,
one TBL_UAREA, one TBL_ARGUMENTS, and one TBL_PROCINFO (this info from
trace-0.3)
Theres nothing in TBL_PROCINFO, nothing in TBL_ARGUMENTS, so it must
be something in the user area - but what??
Anyone with access to DEC OSF/1 source for ps like to help me out here?
All I need is a hint - pretty please?
Its pretty much the only thing holding back 'top' from being finished.
Anthony
--
anthony baxter australian artificial intelligence institute
email : anthony@aaii.oz.au 1 grattan st, carlton, australia 3053
/\/\|| phone : +613 663 7922
It's not denial. I'm just selective about the reality I accept. - Calvin
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Determining %age CPU usage of a process.
1993-11-22 11:43 Determining %age CPU usage of a process Anthony Baxter
@ 1993-11-22 13:44 ` Wilko Bulte
0 siblings, 0 replies; 2+ messages in thread
From: Wilko Bulte @ 1993-11-22 13:44 UTC (permalink / raw)
anthony@aaii.oz.au (Anthony Baxter) writes:
>Well, the port of 'top' to the alphas is almost done. The only teensy thing
>missing is the percentage cpu calculation.
>'struct proc' contains a field:
> fixpt_t p_pctcpu; /* %cpu for this process during p_time */
>but as far as I can tell, this is never actually set by anything.
>I _know_ it must be possible to determine this, (ps does it, see below)
>but how? and where is it stored?
You might check /sys/include/kern/tash.h
I think the accounting is kept there somewhere
Wilko
--
| / o / / _ Wilko Bulte mail: wilko@idca.tds.philips.nl
|/|/ / / /( (_) |d|i|g|i|t|a|l| Equipment Corporation voice: +3155-432062
fax: +3155-432103 DTN: 829 2062 PO Box 245 - 7300 AE Apeldoorn - The Netherlands
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-11-22 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-11-22 11:43 Determining %age CPU usage of a process Anthony Baxter
1993-11-22 13:44 ` Wilko Bulte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox