Last active
February 14, 2025 17:04
-
-
Save rishabhsahilll/6912cb5b4cef41c70ff8478f2b8a747a to your computer and use it in GitHub Desktop.
SystemInfo.py is a Python script that monitors CPU usage, RAM usage, and battery level using the psutil library, providing real-time system performance insights.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psutil | |
system_info = f''' | |
Initializing system check... | |
Checking CPU Usage... | |
Checking RAM Usage... | |
Checking Battery Level... | |
CPU Usage: {psutil.cpu_percent(interval=1)}% | |
RAM Usage: {psutil.virtual_memory().percent}% | |
Battery Level: {psutil.sensors_battery().percent if psutil.sensors_battery() else "Not Available"}% | |
All systems are running normally! | |
''' | |
print(system_info) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment