System Monitor is a Python-based tool that collects system performance metrics (CPU, memory, disk, battery, network, and processes) and visualizes them using bar and pie charts. It generates a JSON file with system data and produces graphical outputs for memory and process usage.
- Data Collection: Gathers system information using
psutilandplatformlibraries. - Data Storage: Saves metrics to a JSON file (
data.json) for persistence. - Visualizations:
- Bar chart for physical and virtual memory usage.
- Pie charts for CPU and memory usage by top 10 processes.
- Modular Design: Separated into
fetch.py(data collection),plot.py(visualization), andmain.py(orchestration).
- Python 3.6+
- Libraries:
psutil,matplotlib,pandas - Operating System: Windows or Unix-like (Linux, macOS)
- Clone the repository:
git clone https://github.com/leuwenhoek/Get-System-info.git
- Install dependencies:
pip install psutil matplotlib pandas
- Ensure the
Scripts/DataandScripts/IMAGEdirectories are writable for JSON and image outputs.
- Run the main script:
python main.py
- The script will:
- Collect system metrics and save them to
Scripts/Data/data.json. - Generate three plots saved in
Scripts/IMAGE:MemoryInformation.png: Bar chart of physical and virtual memory stats.CpuProcessInfo.png: Pie chart of CPU usage by top 10 processes.MemoryProcessInfo.png: Pie chart of memory usage by top 10 processes.
- Collect system metrics and save them to
fetch.py: Collects system metrics (OS, CPU, memory, disk, battery, network, processes) and saves to JSON.plot.py: Loads JSON data and generates visualizations usingmatplotlibandpandas.main.py: Orchestrates data collection and plotting.Scripts/Data/data.json: Output file for system metrics.Scripts/IMAGE/*.png: Output directory for generated plots.
- Error Handling: Minimal error handling is implemented. The code may fail if:
data.jsonis missing, corrupted, or inaccessible.- Hardware-specific features (e.g., battery) are unavailable.
- Disk or file permissions are restricted.
- Bugs: The
getDisk()function infetch.pyoverwrites disk I/O data, storing only the last disk's stats. - Platform Support: Assumes Windows (
C:\) or Unix-like (/) systems; may not work on other platforms. - Visualization: Plots are basic and may have overlapping labels for large datasets.
- Add comprehensive error handling for file operations and
psutilcalls. - Fix the disk I/O data overwrite bug in
getDisk(). - Enhance plot readability with dynamic sizing and better color schemes.
- Add support for more platforms and hardware
Point to be noted that project is under development phase.