On 25 March 2011 09:15, David Vasek <va...@fido.cz> wrote:
> On Thu, 24 Mar 2011, Jason McIntyre wrote:
>
>> On Thu, Mar 24, 2011 at 06:02:15PM +0000, Glen Anderson wrote:
>>>
>>> I liked the idea of using an adjective when talking about the combined
>>> statistics however cumulative isn't really an accurate term and while
>>> ostensibly mean seems appropriate I'm unsure how top calculates that
>>> line on machines with CPUs of varying speeds. If it takes a mean of
>>> the percentages it's clearly misleading, if it does something a it
>>> cleverer use of the term mean is wrong. With this in mind I think the
>>> following tweak to Jason's suggestion would be best.
>>>
>>
>> i'm fine with this. anyone object?
>
> I am not in position to object or not. What I meant was to make it clear
> right from the man page that "single line for all processors" is indeed
> *combined* statistics for all CPU's in one set of numbers, not statistics
> for all individual processors somehow condensed to a single line. Perhaps
> word "combined" can be used there?
>
> Anyway, it was only a suggestion, if you think it is not relevant, simply
> ignore it. Glen's version is good too.

"combined" is ok with me, it doesn't imply anything about how the
figures are reached so side-steps the issues I had earlier. In the
esoteric case I mentioned people will make their own (probably
incorrect) assumptions with either wording. I've included a new diff
making it clear that they're combined statistics.

Ultimately I think there should be a note explaining what happens in
the case of non-identical CPUs but without knowing what top does I'm
happy with either of the following diffs.

I'll have a dig through the source to see if I can find out. I'm not
holding out much hope as "learn C" has been gathering dust on my todo
list for a while... A bit of code reading won't do me any harm though.

$ diff -u top.1 top.1.new
--- top.1       Thu Mar 24 12:39:45 2011
+++ top.1.new   Fri Mar 25 09:28:16 2011
@@ -75,7 +75,8 @@
 The options are as follows:
 .Bl -tag -width Ds
 .It Fl 1
-Display CPU statistics on a single line instead of a line per CPU.
+Display combined CPU statistics on a single line instead of individual CPU
+statistics on multiple lines.
 .It Fl b
 Use
 .Em batch
@@ -282,7 +283,8 @@
 .Sq P
 interactive command.
 .It 1
-Display CPU statistics on a single line instead of a line per CPU.
+Toggle between combined CPU statistics on a single line and individual CPU
+statistics on multiple lines.
 .It C
 Toggle the display of process command line arguments.
 .It d Ar count

>>> $ diff -u top.1 top.1.new
>>> --- top.1 B  B  B  Thu Mar 24 12:39:45 2011
>>> +++ top.1.new B  Thu Mar 24 17:59:30 2011
>>> @@ -75,7 +75,8 @@
>>> B The options are as follows:
>>> B .Bl -tag -width Ds
>>> B .It Fl 1
>>> -Display CPU statistics on a single line instead of a line per CPU.
>>> +Display CPU statistics for all processors on a single line instead of
>>> one
>>> +line per CPU.
>>> B .It Fl b
>>> B Use
>>> B .Em batch
>>> @@ -282,7 +283,8 @@
>>> B .Sq P
>>> B interactive command.
>>> B .It 1
>>> -Display CPU statistics on a single line instead of a line per CPU.
>>> +Toggle CPU statistics between a single line for all processors and one
>>> line
>>> +per CPU.
>>> B .It C
>>> B Toggle the display of process command line arguments.
>>> B .It d Ar count

Reply via email to