SystemMonitoringTool
This is a Python-based system monitoring tool that periodically checks and displays the usage of system resources like CPU, memory, and disk in a user-friendly format. It uses psutil and matplotlib libraries and can be run as a service in Linux with systemd. The repository contains source code and instructions for installation and execution.
Install / Use
/learn @swapnilmukherjee/SystemMonitoringToolREADME
System Monitoring Tool The system monitoring tool project is a Python program that periodically monitors the system's resources such as CPU usage, memory usage, and disk usage, and displays the data in a user-friendly way on the terminal. It also logs the data to a file for future reference.
The program uses various Python libraries such as psutil, which provides an easy-to-use interface to retrieve information on system utilization (CPU, memory, disks, network, sensors) in a portable way, and prettytable, which allows you to display the data in a well-formatted table.
Moreover, this project provides a way to run the program as a service using systemd in Linux. This ensures that the program is automatically started when the system boots up and is always running in the background.
Installation and Execution:
-
Download the project code from the GitHub repository.
-
Make sure you have Python installed in your environment, if not visit the official Python website at https://www.python.org/downloads/, download and run the installer for your operating system, and follow the instructions in the installer to complete the installation.
-
To insall PSUTIL, open the termial and type:
pip install psutil -
To insall MATPLOTLIB, open the termial and type:
pip install matplotlib -
Open a terminal and navigate to the directory where you downloaded the code.
-
Create a new systemd service file using the following command:
sudo nano /etc/systemd/system/system_monitor.service
7.Copy and paste the following code into the file:
[Unit]
Description=System Monitor
[Service]
ExecStart=/usr/bin/python3 /path/to/system_monitor.py
Restart=always
User=<your_username_here>
[Install]
WantedBy=multi-user.target
Replace /path/to/system_monitor.py with the path to your system_monitor.py script, and replace <your_username_here> with your username.
-
Save and close the file.
-
Start the service using the following command:
sudo systemctl start system_monitor.service -
Check that the service is running:
sudo systemctl status system_monitor.service -
Execute the following command to start the script:
python3 system_monitor.py -
To stop the systemd service, execute the following command:
sudo systemctl stop system_monitor.service -
To stop the application press Ctrl + C on the terminal.
Related Skills
tmux
349.0kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
claude-opus-4-5-migration
109.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
349.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
diffs
349.0kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
