CPU usage.

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 9 19:40:22 EDT 2007


En Wed, 09 May 2007 02:58:45 -0300, Navid Parvini  
<parvini_navid at yahoo.com> escribió:

>  I want to get the CPU usage in my code.
>  Is there any module in Python to get it?
>   Also I want to get in on Windows and Linux.

On Windows you can use WMI; Tim Golden made an excellent library that  
let's you query WMI using Python:
http://tgolden.sc.sabren.com/python/wmi.html
Then you need to know *what* to query; google for "WMI CPU usage".

Since WMI is just Microsoft's own implementation of WBEM, you could find a  
Linux version, I don't know.

-- 
Gabriel Genellina




More information about the Python-list mailing list