Skip to content

Instantly share code, notes, and snippets.

@carlashley
Last active August 25, 2021 05:05
Show Gist options
  • Save carlashley/da328b9fbc30093c5a305acca69838d8 to your computer and use it in GitHub Desktop.
Save carlashley/da328b9fbc30093c5a305acca69838d8 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') # returns nothing on Apple Silicon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment