Skip to content

Instantly share code, notes, and snippets.

@oyiptong
Forked from carlashley/cpu_power.py
Created February 3, 2021 01:01
Show Gist options
  • Save oyiptong/8c516540a8be7ffdcadaf106b8f81d16 to your computer and use it in GitHub Desktop.
Save oyiptong/8c516540a8be7ffdcadaf106b8f81d16 to your computer and use it in GitHub Desktop.
CPU Power
#!/usr/bin/python
# A dictionary of available CPU's, COU scheduler limit, and CPU speed limit
from SystemConfiguration import (
SCDynamicStoreCreate,
SCDynamicStoreCopyValue,
)
ds = SCDynamicStoreCreate(None, 'power', None, None)
result = SCDynamicStoreCopyValue(ds, 'State:/IOKit/Power/CPUPower')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment