quicksysmon 1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
quicksysmon/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import psutil
|
|
2
|
+
import time
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def main():
|
|
7
|
+
print(f"\nStart time:", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
|
8
|
+
|
|
9
|
+
psutil.cpu_percent()
|
|
10
|
+
disk_before = psutil.disk_io_counters()
|
|
11
|
+
|
|
12
|
+
result = {}
|
|
13
|
+
boot_time = datetime.fromtimestamp(psutil.boot_time()).strftime("%d.%m.%Y %H:%M:%S")
|
|
14
|
+
|
|
15
|
+
print("\nMeasuring the system, please wait 3 seconds:\n")
|
|
16
|
+
|
|
17
|
+
for i in range(3, 0, -1):
|
|
18
|
+
print(f"{i}...", end=" ", flush=True)
|
|
19
|
+
time.sleep(1)
|
|
20
|
+
|
|
21
|
+
disk_after = psutil.disk_io_counters()
|
|
22
|
+
|
|
23
|
+
read_speed_bytes = (disk_after.read_bytes - disk_before.read_bytes) / 3
|
|
24
|
+
write_speed_bytes = (disk_after.write_bytes - disk_before.write_bytes) / 3
|
|
25
|
+
|
|
26
|
+
read_speed_mb = read_speed_bytes / (1024 ** 2)
|
|
27
|
+
write_speed_mb = write_speed_bytes / (1024 ** 2)
|
|
28
|
+
|
|
29
|
+
print("\n\nDone! Reading the data...")
|
|
30
|
+
|
|
31
|
+
sys_info = {
|
|
32
|
+
"cpu": {
|
|
33
|
+
"cpu_usage": psutil.cpu_percent(),
|
|
34
|
+
"cpu_cores": psutil.cpu_count(logical=False),
|
|
35
|
+
"cpu_threads": psutil.cpu_count(logical=True)
|
|
36
|
+
},
|
|
37
|
+
"ram": psutil.virtual_memory(),
|
|
38
|
+
"disk": psutil.disk_usage("/"),
|
|
39
|
+
"temperature": psutil.sensors_temperatures()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
print("-" * 25)
|
|
43
|
+
|
|
44
|
+
for user in psutil.users():
|
|
45
|
+
login_time = datetime.fromtimestamp(user.started).strftime("%Y-%m-%d %H:%M:%S")
|
|
46
|
+
print(f"""
|
|
47
|
+
Name: {user.name}
|
|
48
|
+
Terminal: {user.terminal}
|
|
49
|
+
Host: {user.host}
|
|
50
|
+
Login time: {login_time}
|
|
51
|
+
PID: {user.pid}
|
|
52
|
+
""")
|
|
53
|
+
|
|
54
|
+
print(f"System startup time: {boot_time}")
|
|
55
|
+
|
|
56
|
+
print("-" * 25)
|
|
57
|
+
|
|
58
|
+
print(f"""
|
|
59
|
+
CPU Information:\n
|
|
60
|
+
CPU Load: {sys_info["cpu"]["cpu_usage"]}%
|
|
61
|
+
CPU Temperature: {sys_info['temperature']['k10temp'][0].current:.1f}°C
|
|
62
|
+
CPU Cores: {sys_info["cpu"]["cpu_cores"]}
|
|
63
|
+
CPU Threads: {sys_info["cpu"]["cpu_threads"]}
|
|
64
|
+
""")
|
|
65
|
+
|
|
66
|
+
print("-" * 25)
|
|
67
|
+
|
|
68
|
+
print(f"""
|
|
69
|
+
RAM information:\n
|
|
70
|
+
Total: {sys_info["ram"].total / 1024 ** 3:.2f} GB
|
|
71
|
+
Available: {sys_info["ram"].available / 1024 ** 3:.2f} GB
|
|
72
|
+
Used: {sys_info["ram"].used / 1024 ** 3:.2f} GB
|
|
73
|
+
Percent: {sys_info["ram"].percent}%
|
|
74
|
+
""")
|
|
75
|
+
|
|
76
|
+
print("-" * 25)
|
|
77
|
+
|
|
78
|
+
print(f"""
|
|
79
|
+
Disk information:\n
|
|
80
|
+
Total: {sys_info["disk"].total / 1024 ** 3:.2f} GB
|
|
81
|
+
Available: {sys_info["disk"].free / 1024 ** 3:.2f} GB
|
|
82
|
+
Used: {sys_info["disk"].used / 1024 ** 3:.2f} GB
|
|
83
|
+
Percent: {sys_info["disk"].percent}%
|
|
84
|
+
Disk read speed: {read_speed_mb:.2f} MB/s
|
|
85
|
+
Disk write speed: {write_speed_mb:.2f} MB/s
|
|
86
|
+
""")
|
|
87
|
+
|
|
88
|
+
print("-" * 25)
|
|
89
|
+
|
|
90
|
+
print(f"GPU Temperature: {sys_info['temperature']['amdgpu'][0].current:.1f}°C")
|
|
91
|
+
|
|
92
|
+
print("-" * 25)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
main()
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
quicksysmon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
quicksysmon/quicksysmon.py,sha256=oRBmysEDdJvUQcsQS5f9tZ2N-N_sAPp4VZ81gMgon-A,2622
|
|
3
|
+
quicksysmon-1.0.dist-info/METADATA,sha256=pvjLIpvjWDPHT3xnuiSRMhlSbAhS0GW3S6p_T_3nL8c,150
|
|
4
|
+
quicksysmon-1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
5
|
+
quicksysmon-1.0.dist-info/entry_points.txt,sha256=fH6uZDlsMNeTVuBgmguacyp4DuN0Wax9lRCdu_LG_AY,61
|
|
6
|
+
quicksysmon-1.0.dist-info/RECORD,,
|