https://augustpinch.com/qnd7d2fhd?key=ed5dbed8ecdd9af92e2b54e652945382
8
Monday, June 9, 2025
SYSTEM INFORMATION CHECKER TOOL full python
import platform
import socket
import psutil
import datetime
import shutil
import os
def get_size(bytes, suffix="B"):
"""Scale bytes to proper format e.g. KB, MB, GB"""
factor = 1024
for unit in ["", "K", "M", "G", "T", "P"]:
if bytes < factor:
return f"{bytes:.2f} {unit}{suffix}"
bytes /= factor
def system_info():
print("="*40, "System Information", "="*40)
print(f"System: {platform.system()}")
print(f"Node Name: {platform.node()}")
print(f"Release: {platform.release()}")
print(f"Version: {platform.version()}")
print(f"Machine: {platform.machine()}")
print(f"Processor: {platform.processor()}")
print(f"Architecture: {' '.join(platform.architecture())}")
print("="*100)
def cpu_info():
print("="*40, "CPU Info", "="*40)
print(f"Physical cores: {psutil.cpu_count(logical=False)}")
print(f"Total cores: {psutil.cpu_count(logical=True)}")
print(f"Max Frequency: {psutil.cpu_freq().max:.2f} Mhz")
print(f"Min Frequency: {psutil.cpu_freq().min:.2f} Mhz")
print(f"Current Frequency: {psutil.cpu_freq().current:.2f} Mhz")
print("="*100)
def memory_info():
print("="*40, "Memory Info", "="*40)
svmem = psutil.virtual_memory()
print(f"Total: {get_size(svmem.total)}")
print(f"Available: {get_size(svmem.available)}")
print(f"Used: {get_size(svmem.used)}")
print(f"Percentage: {svmem.percent}%")
print("="*100)
def disk_info():
print("="*40, "Disk Info", "="*40)
total, used, free = shutil.disk_usage("/")
print(f"Total: {get_size(total)}")
print(f"Used: {get_size(used)}")
print(f"Free: {get_size(free)}")
print("="*100)
def network_info():
print("="*40, "Network Info", "="*40)
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Hostname: {hostname}")
print(f"IP Address: {ip_address}")
print("="*100)
def uptime_info():
print("="*40, "Uptime", "="*40)
boot_time_timestamp = psutil.boot_time()
bt = datetime.datetime.fromtimestamp(boot_time_timestamp)
print(f"Boot Time: {bt.strftime('%Y-%m-%d %H:%M:%S')}")
uptime = datetime.datetime.now() - bt
print(f"Uptime: {str(uptime).split('.')[0]}")
print("="*100)
if __name__ == "__main__":
os.system('cls' if os.name == 'nt' else 'clear')
system_info()
cpu_info()
memory_info()
disk_info()
network_info()
uptime_info()
Subscribe to:
Post Comments (Atom)
SMART AFFILIATE LINK GENERATOR
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
*Online Stock Photography: Sell Your Snaps* Are you a budding photographer with a penchant for snapping stunning images? Look no further! O...
-
AI Story Writing Tool AI Story Writing Tool Moral Educational Historical ...
No comments:
Post a Comment