LukeeSucks
Kazakhstan
 
 
Squad Community Bot FTW
Scuffed Bot Co
Právě je offline
Vybraný obrázek
Lukee
Vybraný obrázek
Lukee
main.py
import os
import platform
import psutil
from datetime import datetime
from colorama import Fore

#⠀Byte Convert
def get_size(bytes, suffix="B"):
⠀⠀factor = 1024
⠀⠀for unit in ["", "K", "M", "G", "T", "P"]:
⠀⠀⠀⠀if bytes < factor:
⠀⠀⠀⠀⠀return f"{bytes:.2f}{unit}{suffix}"
⠀⠀⠀⠀ bytes /= factor

#⠀System Info
def sysInfo():
⠀⠀uname = platform.uname()
⠀⠀boot_time_timestamp = psutil.boot_time()
⠀⠀bt = datetime.fromtimestamp(boot_time_timestamp)
⠀⠀cpufreq = psutil.cpu_freq()
⠀⠀svmem = psutil.virtual_memory()
⠀⠀partitions = psutil.disk_partitions()
⠀⠀disk_io = psutil.disk_io_counters()
⠀⠀if_addrs = psutil.net_if_addrs()
⠀⠀net_io = psutil.net_io_counters()
⠀⠀print(Fore.RED + "System Information\n" + Fore.RESET)
⠀⠀print(f"System: {uname.system}")
⠀⠀print(f"Boot Time: {bt.year}/{bt.month}/{bt.day}/{bt.hour}/{bt.minute}/{bt.second}/")
⠀⠀print(f"Node: {uname.node}")
⠀⠀print(f"Release: {uname.release}")
⠀⠀print(f"Version: {uname.version}")
⠀⠀print(f"Machine: {uname.machine}\n")

⠀⠀print(Fore.RED + "Processor Information:" + Fore.RESET)
⠀⠀print(f"Processor: {uname.processor}")
⠀⠀print("Physical Cores: ", psutil.cpu_count(logical=False))
⠀⠀print("Total Cores: ", psutil.cpu_count(logical=True))
⠀⠀print(f"Max Frequency: {cpufreq.max:.2f}Mhz")
⠀⠀print(f"Min Frequency: {cpufreq.min:.2f}Mhz")
⠀⠀print(f"Current Frequency: {cpufreq.current:.2f}Mhz\n")
⠀⠀print(Fore.RED + "CPU Usage per core: " + Fore.RESET)
⠀⠀for i, percentage in enumerate(psutil.cpu_percent(percpu=True, interval=1)):
⠀⠀⠀⠀print(f"Core {i}: {percentage}%")
⠀⠀print(f"Total CPU Usage: {psutil.cpu_percent()}%\n")

⠀⠀print(Fore.RED + "Memory Information:" + Fore.RESET)
⠀⠀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}%\n")

⠀⠀print(Fore.RED + "Disk Information:" + Fore.RESET)
⠀⠀for partition in partitions:
⠀⠀⠀⠀print(f"=== Device: {partition.device} ===")
⠀⠀⠀⠀print(f" Mountpoint: {partition.mountpoint}")
⠀⠀⠀⠀print(f" File system type: {partition.fstype}")
⠀⠀⠀⠀try:
⠀⠀⠀⠀⠀partition_usage = psutil.disk_usage(partition.mountpoint)
⠀⠀⠀⠀except PermissionError:
⠀⠀⠀⠀⠀continue
⠀⠀⠀print(f" Total Size: {get_size(partition_usage.total)}")
⠀⠀⠀print(f" Used: {get_size(partition_usage.used)}")
⠀⠀⠀print(f" Free: {get_size(partition_usage.free)}")
⠀⠀⠀print(f" Percentage: {partition_usage.percent}%")
⠀⠀print(f"Total read: {get_size(disk_io.read_bytes)}")
⠀⠀print(f"Total write: {get_size(disk_io.write_bytes)}\n")

⠀⠀print(Fore.RED + "Network Information:" + Fore.RESET)
⠀⠀for interface_name, interface_addresses in if_addrs.items():
⠀⠀⠀⠀for address in interface_addresses:
⠀⠀⠀⠀⠀⠀print(f"=== Interface: {interface_name} ===")
⠀⠀⠀⠀⠀⠀if str(address.family) == 'AddressFamily.AF_INET':
⠀⠀⠀⠀⠀⠀⠀⠀print(f" IP Address: {address.address}")
⠀⠀⠀⠀⠀⠀⠀⠀print(f" Netmask: {address.netmask}")
⠀⠀⠀⠀⠀⠀⠀⠀print(f" Broadcast IP: {address.broadcast}")
⠀⠀⠀⠀⠀⠀elif str(address.family) == 'AddressFamily.AF_PACKET':
⠀⠀⠀⠀⠀⠀⠀⠀print(f" MAC Address: {address.address}")
⠀⠀⠀⠀⠀⠀⠀⠀print(f" Netmask: {address.netmask}")
⠀⠀⠀⠀⠀⠀⠀⠀ print(f" Broadcast MAC: {address.broadcast}")
⠀⠀print(f"Total Bytes Sent: {get_size(net_io.bytes_sent)}")
⠀⠀print(f"Total Bytes Received: {get_size(net_io.bytes_recv)}\n\n")

⠀⠀input("Press ENTER to return.")
Nedávná aktivita
19 hodin celkem
Naposledy hráno 29. zář.
2,2 hodin celkem
Naposledy hráno 29. čvn.
75 hodin celkem
Naposledy hráno 1. dub.
go6lin 5. říj. v 7.07 
+Rep хорошо играет мэнчик
Moramar 2. říj. v 11.38 
we can try one more game if you want
Zulkiktilar 4. zář. v 8.53 
+rep plays with heart
76561199624604461 28. srp. v 10.29 
siemano
dodaj do znaj prosze, mam pytanie
nwm dlaczeg nie moge dodac z maina, to Maciek
Amiri 228 12. čvc. v 4.51 
+rep
_/﹋\_
(҂`_´)
Rexbrand 10. čvc. v 12.29 
Play today!