[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] top '-c' switch to enable output of SMP cpu lines.
From: Jonathan Sambrook <jonathan () hmmn ! org>
Date: 2022-01-27 12:08:32
Message-ID: 0235abbc-7bdb-4e43-d547-90c05f43ee08 () hmmn ! org
[Download RAW message or body]
On 26/01/2022 12:12, David Laight wrote:
> From: Jonathan Sambrook
>> Sent: 25 January 2022 17:44
>>
>> This allows access to SMP cpu lines for batch output, as well as
>> displaying SMP info in interactive mode without having to press '1'.
>>
>> My motivation here is to be able to access the SMP information when
>> graphing BusyBox top batch output with topplot
> ..
>> +//usage: IF_FEATURE_TOP_SMP_CPU(
>> +//usage: "\n"" -c Same as '1' key"
>> +//usage: )
>
> Better to just say 'One line for each cpu'.
I agree the "Same as" formulation isn't great, but I was following the (equally
opaque) precedent:
-m Same as 's' key
So I've now got:
-c CPU info for each core
> ...
>> +#if ENABLE_FEATURE_TOP_SMP_CPU
>> + if (col & OPT_c) {
>> + cpu_jif = cpu_prev_jif = NULL;
>> + num_cpus = 0;
>
> Whitespace manged...
Arggh! Thanks.
>
>> + smp_cpu_info = !smp_cpu_info;
>> + get_jiffy_counts();
>> + }
>> +#endif
>
> Is this block needed - I suspect the main loop can be made to DTRT.
Turns out: not all of it. The remaining initialization doesn't require changes
to the main loop.
> You also probably want the 'IRIX mode' patches I posted a few months back.
> Otherwise on a system with a lot of cpu the per-process cpu time is
> always very small.
>
> They may have got lost....
Sounds good. Can you resurrect them?
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic