SysMatrix is a command line tool that monitors Linux system resources and performs basic security audits. It collects CPU, memory, and disk usage metrics, stores them in a local SQLite database, and checks for privileged user activity.
The goal is to provide quick insight into system health without installing large monitoring stacks.
- Resource monitoring for CPU load, memory usage, and disk space
- History tracking through a local SQLite database
- Security auditing of sudo users and recent login history
- Simple command line interface
- Supports cron scheduling for automatic monitoring
Clone the repository:
git clone [https://github.com/azanw/sysmatrix.git](https://github.com/azanw/sysmatrix.git)
cd sysmatrixInstall the required Python libraries:
pip install -r requirements.txtThe tool is controlled through sysmatrix.py. A typical workflow is to collect data and later view it.
Captures the current system status and saves it into the database.
python3 sysmatrix.py collectShows the last recorded entries in a readable table. This helps track usage over time.
python3 sysmatrix.py viewDisplays sudo users and recent login activity.
python3 sysmatrix.py securityTo run the collector in the background every minute, open the crontab:
crontab -eThen add:
* * * * * cd /path/to/sysmatrix && /usr/bin/python3 sysmatrix.py collect >> sysmatrix.log 2>&1This keeps your history updated automatically.
sysmatrix.py Main entry point and CLI handler
collector.py Collects system metrics using psutil
storage.py Handles SQLite database logic
reports.py Produces security reports and formatted views
data/ Stores the SQLite database