Ciao Danilo,
this is currently not implemented but I think it would definitively be
nice to have (...and also top shows those stats).
I came up with the patch in attachment which adds a new
cpu_percent_per_time function:
>>> cpu_percent_per_time()
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)
I expect it to be available starting from next psutil release.
2013/4/7 Danilo Chilene <
bico...@gmail.com>:
> Hello,
>
> Is there a way to return the below command in percent format without using a
> external function or something else outside psutils?
>
> In [78]: psutil.cpu_times(percpu=False)
> Out[78]: cputimes(user=2169.85, nice=74.45, system=1625.38, idle=50340.71,
> iowait=509.16, irq=0.07, softirq=24.48)
>
> Best Regards,
>
> Danilo
>
> --
> --
> You received this message because you are subscribed to the "Python process
> utilities (psutil)" project group:
>
http://code.google.com/p/psutil
> To post to this group, send email to
psu...@googlegroups.com
> To unsubscribe from this group, send email to
>
psutil-un...@googlegroups.com
> For more options, visit this group at
http://groups.google.com/group/psutil
> ---
> You received this message because you are subscribed to the Google Groups
> "psutil" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
psutil+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>