From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8ec5c0b0c889b39f X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-11-22 05:57:52 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!EU.net!sun4nl!philapd!apdnews!spoetnix.idca.tds.philips.nl!wilko From: wilko@idca.tds.philips.nl (Wilko Bulte) Newsgroups: comp.unix.osf.osf1 Subject: Re: Determining %age CPU usage of a process. Message-ID: Date: 22 Nov 93 13:44:39 GMT References: Sender: news@idca.tds.philips.nl 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