Li, Aubrey wrote:
> Rafael Vanoni wrote:
> 
>> Pat picked up a bug in the previous patch, here's a better one.
>>
>> Rafael
>>
>> Rafael Vanoni wrote:
>>> Here's a patch for
>>>
>>> # RFE to have PowerTOP have an option to specify number of iterations
>>>
>>> This functionality is useful for users who'd like to include the
>>> output of PowerTOP in automated scripts. It's basically an extension
>>> of the -d mode that causes the tool to dump output for a specified
>>> number of iterations. 
>>>
>>> For instance,
>>>
>>> powertop 3
>>>
>>> powertop -t 1 3
>>>
>>> powertop 3 -t 1
>>>
>>> are all valid PowerTOP options with this patch.
>>>
>>> Let me know what you think.
>>>
> 
> I like this idea, it makes more sense to dump the report into a file.
> PowerTOP now supports UI mode and dump mode.
> But the new option looks a bit confused. How about user want to iterate
> 3 times
> and exit in UI mode?(Although it's not supported now and may not be
> reasonable).
> The idea actually put PowerTOP iteration into dump mode. So, my idea is:
> 
> #./powertop --help
> usage: powertop [OPTION...]
>     -d, --dump [count]                Read wakeups count times and print list
> of top offenders
>     -t,  --time double                Default time to gather data in seconds
> [1 - 100s]
>     -v, --verbose             Verbose mode, reports kernel cyclic
> activity
>     -h, --help                        Show this help message
> #./powertop -d 3
> 
> Thoughts?

I agree. Is the rest of the implementation okay ?

thanks
Rafael

Reply via email to