mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-15 12:50:38 +02:00
Added colors to the interface Added "show confirmations" for any tx Added feature sending messages to space with Satnode Added a permanent Logo Added System Information (CPU - Memory - Disk)
15 lines
798 B
Python
15 lines
798 B
Python
import psutil
|
|
|
|
|
|
def sysinfoDetail(): #Cpu and memory usage
|
|
try:
|
|
# gives a single float value
|
|
print(" \033[0;37;40m----------------------------")
|
|
print(" \033[3;33;40mCPU Usage: \033[1;32;40m" + str(psutil.cpu_percent()) + "\033[0;37;40m%")
|
|
print(" \033[3;33;40mMemory Usage: \033[1;32;40m" "{}\033[0;37;40m%".format(int(psutil.virtual_memory().percent)))
|
|
print(" \033[3;33;40mMemory Available: \033[1;32;40m" "{} \033[0;37;40mMB".format(int(psutil.virtual_memory().available / 1024 / 1024)))
|
|
print(" \033[3;33;40mDisk Usage: \033[1;32;40m" "{}%\033[0;37;40m%".format(psutil.disk_usage('/').percent))
|
|
print(" \033[0;37;40m----------------------------")
|
|
except (KeyboardInterrupt, SystemExit):
|
|
exit()
|
|
raise
|