Skip to content

Instantly share code, notes, and snippets.

@carlashley
Last active November 14, 2016 10:48
Show Gist options
  • Save carlashley/e05c125d50597b8d8bb3f72095379ead to your computer and use it in GitHub Desktop.
Save carlashley/e05c125d50597b8d8bb3f72095379ead to your computer and use it in GitHub Desktop.
Detailed system load
#!/usr/bin/python
# A dictionary of system load information.
from SystemConfiguration import (
SCDynamicStoreCreate,
SCDynamicStoreCopyValue,
)
ds = SCDynamicStoreCreate(None, 'power', None, None)
result = SCDynamicStoreCopyValue(ds, 'State:/IOKit/PowerManagement/SystemLoad/Detailed')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment