Skip to content

Instantly share code, notes, and snippets.

@conorbranagan
Created February 6, 2014 17:48
Show Gist options
  • Save conorbranagan/8849112 to your computer and use it in GitHub Desktop.
Save conorbranagan/8849112 to your computer and use it in GitHub Desktop.
Show disk metrics
Open PowerShell or cmd.exe
C:\ ... > cd C:\Program Files (x86)\Datadog\Datadog Agent\files
C:\ ... > ./shell.exe
Datadog Agent v4.1.0 - Python Shell
>>> import wmi; w = wmi.WMI()
>>> disk = w.Win32_LogicalDisk()
>>> print [{'Name': d.Name, 'Type': d.DriveType, 'Size': d.Size, 'Free': d.FreeSpace} for d in disk]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment