Created
July 4, 2020 22:44
-
-
Save sobuildit/bb15874f930f6db9eaa496c315bf3120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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