----- Original Message -----




On Thu, Feb 3, 2011 at 19:16, Tomas Edwardsson < [email protected] > wrote: 

<blockquote>


This patch introduces a new module, cpu.py and includes fixes for disk.py and 
service.py. 

cpu.py exposes cpu information. It has two methods: 
* cpu_sample_percentage - gets the average cpu usage, returns per cpu 
percentage for user, nice, system, idle, iowait and irq. 
* jiffies - fetches cpu statistics from /proc/stat and returns them 

disk.py modifications 
* Add filesystem type returned by disk.usage() 

service.py modifications 
* chkconfig and /sbin/service now run with environment variable LANG=C, tools 
were returning internationalized strings which wouldn't parse correctly. 
* Rewrote get_running(), now lists scripts from /etc/init.d and runs status 
itself instead of running /sbin/service --status-all. /sbin/service was 
returning internationalized strings and ignoring LANG variable. 






Tomas, 

so i'm testing these for inclusion right now. I'm curious how you feel about 
the concept of adjusting the "cpu_sample_percentage" method to a bit more cli 
friendly name like "usage" or "sample". I'm more inclined towards 'usage' 
myself, but am open to suggestion. I realize "cpu sample percentage" is more 
descriptive, but documentation should cover that, such as the description in 
register and the ModulesList/CPUModule page (you gonna make one?). 

The primary issue with this, as skvidal pointed out, is if you are already 
using this extensively in in house scripts, ecspecially if anyone else is also 
using it. 

thoughts? 

xaeth 
</blockquote>

Main reason for not using something like 'usage' is the thought of having a 
better way of implementing this in the future. The minion internally storing 
something like 1/5/15 minute averages and storing them in mem is one idea. So, 
to boil down, not to have conflict with the "better" implemented function in 
the future which would then be named 'usage'. 

There is no inconvenience for me to update my scripts to use 'usage' instead of 
'cpu_sample_percentage'. 

Sure, I'll put together the CPUModule page. 

-- 
Tommi 
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list

Reply via email to