Skip to content

Instantly share code, notes, and snippets.

@bunelr
Created August 22, 2014 20:32
Show Gist options
  • Save bunelr/64a4495586be5cbe3c04 to your computer and use it in GitHub Desktop.
Save bunelr/64a4495586be5cbe3c04 to your computer and use it in GitHub Desktop.
Debug Command

Try

> import wmi
> conn=wmi.WMI(None)
> res = conn.Win32_PerfFormattedData_PerfDisk_PhysicalDisk()
> print res[0]

If it doesn't work, try:

> import pythoncom
> pythoncom.CoInitialize()
> import wmi
> conn=wmi.WMI(None)
> res = conn.Win32_PerfFormattedData_PerfDisk_PhysicalDisk()
> print res[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment