Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import psutil
from vcgencmd import Vcgencmd
vcgm = Vcgencmd()
# Network stuff from psutil
net_if_addrs = psutil.net_if_addrs()['eth0'][0]
IP = net_if_addrs.address
netmask = net_if_addrs.netmask
# CPU stuff from psutil
clock = psutil.cpu_freq().current
cpu_usage = psutil.cpu_percent()
MemUsage = psutil.virtual_memory().percent
# Temp from vcgencmd
temp = vcgm.measure_temp()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment