*BSD News Article 30026


Return to BSD News archive

Xref: sserve comp.unix.programmer:16762 comp.unix.misc:12215 comp.unix.questions:48921 comp.unix.aix:37112 comp.unix.bsd:13846
Newsgroups: comp.unix.programmer,comp.unix.misc,comp.unix.questions,comp.unix.aix,comp.unix.bsd
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!netnews.upenn.edu!news.cc.swarthmore.edu!psuvax1!news.ecn.bgu.edu!usenet.ins.cwru.edu!howland.reston.ans.net!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!accapadi
From: accapadi@austin.ibm.com (Matt Accapadi)
Subject: Re: %CPU usage for a process ?
Sender: news@austin.ibm.com (News id)
Message-ID: <CpAqxF.1w3E@austin.ibm.com>
Date: Wed, 4 May 1994 21:12:51 GMT
Reply-To: accapadi@austin.ibm.com
References: <2q75oj$s1c@vixen.cso.uiuc.edu>
Organization: IBM, Austin, Tx.
Lines: 14

I must be missing something.  How about  ps -eF "%c %u %p %C"|sort -rn +3


In article <2q75oj$s1c@vixen.cso.uiuc.edu>,
Libor Michalek <libor@rasputin.ncsa.uiuc.edu> wrote:
>  I was wondering if anyone knows how to calculate %CPU usage for a process.
>I know how to get information from the kernals memory, but the kernal does
>NOT keep %CPU usage for a process (altough it does keep CPU time for a 
>process), so I assume that you use some of the fields from the process table
>to calculate this information. So does any one know how to do this 
>calculation??? I don't care which unix you can help me with since the
>process table for most unices are pretty similar, and I'm far too familiar
>with alot of them :-) but if you really want to pick one heres a list of
>OS's that I'll need the information for: