System Monitor is a background service that collects system information and sends it to a server using a POST request.
The data is sent in JSON format.
Settings can be updated in the app.
Interval is the amount of time in seconds the app will wait before checking and sending.
- System Monitor
action: str
system_id: str
url: str
interval: int
epoch: int
stats: object
cpu: object
count: int
frequency: int
percent_used: float
memory: object
total: int
available: int
percent_used: float
used: int
free: int
processes: array of objects
pid: int
name: str
username: str
disks: object
<device>: object
file_system: str
mount_point: str
total: int
used: int
free: int
network: object
<network name>: object
ip: str
netmask: str
bytes_sent: int
bytes_recv: int
Download the setup exe in inno\Output\system_monitor_setup.exe and run it or click here:
Restart the computer after installation for the background service to start.
Go to the settings > apps > System Monitor > uninstall
NOTE: pyinstaller is required to build the exe, the exe is only built in a Windows environment.
NOTE: Inno Setup is required to build the installer.
Ensure you have python 3.10+ installed.
Navigate to the project directory.
Create virtual environment
python -m venv venvThis will create a virtual environment in the project directory, like so:
ProjectDir/
...
README.md
venv/
Activate virtual environment
.\venv\Scripts\activateInstall dependencies
pip install -r .\requirements\main.txtflask --app .\server.py run --debugpython .\src\system_monitor.pypython .\src\system_monitor.py backgroundpyinstaller .\src\system_monitor.py -w -D --noconsole- Install Inno Setup (https://www.jrsoftware.org/isdl.php)
- Open the script
inno\system_monitor_setup.issin Inno Compiler - Click on the Run button
Ensure you have python 3.10+ installed.
Navigate to the project directory.
Create virtual environment
python3 -m venv venvThis will create a virtual environment in the project directory, like so:
ProjectDir/
...
README.md
venv/
Activate virtual environment
source venv/bin/activateInstall dependencies
pip install -r requirements/main.txtflask --app server.py run --debugpython3 src/system_monitor.pypython3 src/system_monitor.py backgroundShow stats > cpu
python3 src/system_monitor.py cpuShow stats > memory
python3 src/system_monitor.py memoryShow stats > processes
python3 src/system_monitor.py processesShow stats > disks
python3 src/system_monitor.py disksShow stats > network
python3 src/system_monitor.py networkGenerate system id
python3 src/system_monitor.py generate_system_idRun the background service
python3 src/system_monitor.py backgroundThe example server is Flask, but this can be any server that can accept POST requests and send the appropriate responses.
The system monitor reports its action when sending data to the server.
This is included in the JSON data sent to the server.
{
"action": <action here>,
...
}These actions are:
check_url- The system monitor is checking the server URL.check_system_id- The system monitor is checking if the system ID is available.send_stats- The system monitor is sending stats to the server.
The server is expected to use HTTP status codes to respond to the system monitor.
For check_url:
A response of 202 is expected to pass the check.
Any other response will be considered a connection error.
For check_system_id:
A response of 200 is expected to let the system
monitor know that the username exists on the system.
A response of 204 is expected to let the system monitor
know that the connection is fine and that the username does
not exist on the system.
Any other response will be considered a connection error.
For send_stats:
A response of 200 is expected to let the system monitor know
that the stats were received successfully.
