SystemMonitor is a project to store metrics like CPU or network usage from a system like the Raspberry Pi. The script was written and tested in Python 3.
- Make sure to install Python and Pip correctly
- Set the execute flags:
chmod +x install.sh
chmod +x run.sh
chmod +x monitor.py
- Install all required pip package dependencies with:
pip install -r requirements.txt
-
Setup a MySQL database server and run the scripts
SetupProcedures.sql
andSetupTables.sql
inside the database. -
Adjust your settings in the monitor.py file:
databaseUser = 'default'
databasePassword = 'asdf'
databaseName = 'SystemMonitor'
hostAddress = '192.168.2.2'
databasePort = 3307
- Probably run this script in a cronjob:
sudo crontab -e
and add e.g. the line
* * * * * /usr/bin/python3 /home/SystemMonitor/monitor.py
to execute the script every minute.
See the Changelog.