pyblock/sysinf.py
curly60e c23ef44a8d
rc1v0.4.0
Reformed first start - Ask if node is remote or local (lnd - bitcoin-cli)
Added view onchain txs - Local & Remote
Added view invoices - Local & Remote
Added view channels - Local & Remote
Improved "getblockaininfo" 
Bug Fixes
2020-06-11 16:40:02 -03:00

19 lines
884 B
Python

#Developer: Curly60e
#PyBLOCK its a clock of the Bitcoin blockchain.
#Version: 0.4.0
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