Skip to content

Instantly share code, notes, and snippets.

@conorbranagan
Created January 14, 2013 22:50
Show Gist options
  • Save conorbranagan/4534283 to your computer and use it in GitHub Desktop.
Save conorbranagan/4534283 to your computer and use it in GitHub Desktop.
>>> import wmi
>>> w = wmi.WMI()
>>> cpu = w.Win32_PerfFormattedData_PerfOS_Processor(name="_Total")[0]
>>> print cpu.PercentUserTime
>>> print cpu.PercentIdleTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment