[cod] OT: /proc, top, ps broken in some linux kernels?

Josh Berry games at chickenmonkey.co.uk
Wed Jun 2 20:01:51 EDT 2004


Ahh, that explains a lot. I have just learnt to live with it. You best
bet is to use something like MRTG or RRDTool to graph the 1 minute or 5
minute average for the CPU usage on the process (You would need to use
ps, grep sed and awk to get the figure - my knowledge of regular
expressions isn't good enough to help I am afraid).

That would give you an OK indication of the usage, but I don't think you
can ever get it exactly.

Josh

On Wed, 2004-06-02 at 13:02, Steven Hartland wrote:
> Yes I've just been speaking to the coder of top / ps and
> it appears that its quite possible for a process to use 90%
> cpu but say its using 0% in both top and ps as process usage
> is only sampled on clock tick so if you have a process which
> gets scheduled but never uses and entire tick worth of cpu
> before yielding it will never get shown. With the lower
> frequency 2.4 kernel this has a high chance of happening
> than the higher frequency 2.6 kernel.
> Personally I would say this is a major design flaw in linux
> as it makes any sort of cpu comparison tests null and void.
> 
>     Steve / K
> ----- Original Message ----- 
> From: "Josh Berry" <games at chickenmonkey.co.uk>
> To: <cod at icculus.org>
> Sent: Wednesday, June 02, 2004 1:42 PM
> Subject: Re: [cod] OT: /proc, top, ps broken in some linux kernels?
> 
> 
> > Try graphing load average when running and comparing it to when the box
> > is not running the game. That will give you a much better idea of what
> > sort of resources the game is using.
> > 
> > I have always seen this sort of behaviour - especially in top - on
> > various kernels all the way from 4.2 to 4.6
> > 
> > Regards
> > Josh
> 
> 
> 
> ================================================
> This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 
> 
> In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137
> or return the E.mail to postmaster at multiplay.co.uk.
> 




More information about the Cod mailing list