[PATCH] Add (optional) CPU statistics to top

Alex Landau landau_alex at yahoo.com
Mon Jun 11 07:12:05 UTC 2007


Oh, I forgot to say: if you removed div() from the new code, you should probably remove
it also from the old one (the calculation of per-process cpu and mem usage), since the
global calculations are done only once per a refresh, while the per-process are done,
well..., per-process per refresh.
Alex

--- Alex Landau <landau_alex at yahoo.com> wrote:

> 
> --- Denis Vlasenko <vda.linux at googlemail.com> wrote:
> 
> > On Sunday 10 June 2007 07:30, Alex Landau wrote:
> > > The attached patch adds user, system, nice, irq,
> > > sortirq, etc. status line to top (if
> > > ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE is set).
> > > 
> > > The patch is against trunk rev 18739. It was tested
> > > with that revision, with the affecting configuration
> > > options on and off (CONFIG_TOP_CPU_USAGE_PERCENTAGE,
> > > CONFIG_FEATURE_USE_TERMIOS).
> > > 
> > > Issue no. 0001379 in bug tracker.
> > 
> > Thanks for pinging.
> > 
> 
> Not at all.
> 
> > Applied to svn with modifications. See attached.
> > 
> > [Or maybe not applied yet. My ISP feelin' bad ATM :( ]
> > 
> > Fractional percents ("27.6%") cost rather a lot in code and
> > are not that important in practice, thus I simplified that
> 
> No problem.
> 
> > to integer percents. It also gave more space for labels:
> > "softirq" is better than "si".
> 
> I'm not sure. I formatted the line exactly like top(1) does. I think that even if
> "softirq" looks better that "si", for the sake of "output compatibility" for users that
> are used to "si" (like myself), it's better to use the original names.
> > --
> > vda
> 
> Alex
> 
> [diffs snipped]
> 
> 
> 
>  
> ____________________________________________________________________________________
> No need to miss a message. Get email on-the-go 
> with Yahoo! Mail for Mobile. Get started.
> http://mobile.yahoo.com/mail 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
> 



       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433



More information about the busybox mailing list