PFZheng / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Per CPU times percentage #362

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Proposal
A function similar to psutil.cpu_percent() but which provides utilization 
percentages for each specific CPU time (user, system, idle, etc.), as per:
https://groups.google.com/forum/?fromgroups=#!topic/psutil/3u9Ylt-zHMA

On what platforms would this be available?
All

Proposed API

synopsis: cpu_times_percent(interval=0.1, percpu=False)

>>> import psutil
>>> psutil.cpu_times_percent()
cpupercent(user=4.8, nice=0.0, system=4.8, idle=90.5, iowait=0.0, irq=0.0, 
softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)

'interval' and 'percpu' arguments have the same meaning as in 
psutil.cpu_percent()

Original issue reported on code.google.com by g.rodola on 7 Apr 2013 at 9:40

GoogleCodeExporter commented 8 years ago
Fixed in revision e1d79a5533ef.

Original comment by g.rodola on 8 Apr 2013 at 12:45

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 8 Apr 2013 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 11 Apr 2013 at 9:17

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 12 Apr 2013 at 6:21