Menu-Based System Health Check Script
Atif Inamdar
Kubernetes | Docker | Jenkins | CI/CD | Terraform | AWS Cloud | Security | Linux Enthusiast
What It Does:
This tool provides a menu-driven interface where users can choose from the following options:
? Check Disk Usage: See how much disk space is being used.
? Check Memory Usage: Monitor RAM utilization.
? Check CPU Usage: Track CPU performance.
? Monitor Top 20 Running Services: Display the top 20 running services.
? Send Email Report: Compile a detailed health report and send it via email.
? Exit: Close the program.
It’s a continuous process, so users can keep checking their system health without restarting the tool.
[Image 1: Menu Based Health check]
Why I Built It:
This project was part of a challenge shared by Sagar Utekar (thank you for the inspiration! ??). I wanted to create a tool that simplifies system monitoring and automates the process of sending health reports. It’s a great way to stay on top of system performance without manual checks.
Challenges I Faced:
1?? Email Automation: Gmail’s security restrictions initially blocked my script from sending emails. I solved this by generating an App Password.
2?? Error Handling: Ensuring the script handled errors gracefully (e.g., if a service failed or email sending failed).
3?? User-Friendly Interface: Creating a menu-driven interface so users can easily interact with the tool.
[Image 2: Health Check Output]
What I Learned:
Why This Matters:
This tool is a great example of how Python can be used for automation and system monitoring. It’s a practical solution that can be used in daily workflows to keep systems healthy and efficient.
[Image 3: Email Report]
?? GitHub Repository: https://github.com/AtifGit25/system-health-check
Feel free to check out the code, fork it, or suggest improvements! I’d love to hear your thoughts. ??
?? Hashnode Blog: https://menu-based-system-health-check-script.hashnode.dev/menu-based-system-health-check-script
A big shoutout to Sagar Utekar for sharing this challenge—it was a fantastic learning experience! ??
#Python #Automation #SystemMonitoring #OpenSource #LearningInPublic #CodingJourney #GetFitWithSagar #SRELife #DevOps