2022-03-15 21:23:22 -03:00
|
|
|
#Developer: Curly60e
|
|
|
|
|
#PyBLOCK its a clock of the Bitcoin blockchain.
|
|
|
|
|
|
|
|
|
|
import os
|
2026-04-01 10:24:47 -03:00
|
|
|
import subprocess
|
2022-03-15 21:23:22 -03:00
|
|
|
import psutil
|
|
|
|
|
import time as t
|
2026-04-01 12:13:33 -03:00
|
|
|
from pblogo import blogo
|
2022-03-15 21:23:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def clear(): # clear the screen
|
2026-04-01 10:24:47 -03:00
|
|
|
subprocess.run(['clear'] if os.name != 'nt' else ['cls'], shell=(os.name == 'nt'))
|
2022-03-15 21:23:22 -03:00
|
|
|
|
|
|
|
|
def sysinfoDetail(): #Cpu and memory usage
|
|
|
|
|
# gives a single float value
|
|
|
|
|
while True:
|
|
|
|
|
try:
|
|
|
|
|
clear()
|
|
|
|
|
blogo()
|
|
|
|
|
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----------------------------")
|
|
|
|
|
t.sleep(1)
|
2026-04-01 10:24:47 -03:00
|
|
|
except Exception:
|
2022-03-15 21:23:22 -03:00
|
|
|
break
|