This simple API allows you to monitor the health and status of your Linux systems by providing essential metrics such as CPU temperature, usage, memory, and disk utilization. It integrates with the Minimal Device Stats tool to extend its capabilities.
- Clone the production branch of this repository
git clone -b production https://github.com/Finnomator/DeviceStats.git cd DeviceStats
- Install the required python modules in
requirements.txt
pip install -r requirements.txt
- Start the server
./start_server.sh
- Install Minimal Device Stats on every machine you would like to monitor with the web interface.
- Add the device to
DEVICE_IPS
insecrets.py
. The key specifies the name displayed in the interface and the value is the ip address of the device. - Restart the server
Open a browser and go to http://127.0.0.1:8923/.
You should see a website that shows the devices you configured in secrets.py
.
It shows whether the server is on- or offline, its ip, cpu usage, cpu temperature, memory and disk usage.
Click on a device to expand.
Make a GET request to http://127.0.0.1:8923/sysinfo
.
Format: HTML
Web interface. Access with a browser.
Format: JSON
Key | Unit | Type | Description |
---|---|---|---|
cpu_temp | °C | float | Cpu temperature. |
cpu_usage | % | float | Represents the current system-wide CPU utilization as a percentage. |
total_memory | Megabyte | int | Total physical memory available. |
used_memory | Megabyte | int | Memory used, calculated differently depending on the platform and designed for informational purposes only: - macOS: active + wired - BSD: active + wired + cached - Linux: total - free (free = memory not being used at all (zeroed) that is readily available) |
total_disk | Gigabyte | int | Total disk size of / . |
used_disk | Gigabyte | int | Used disk size. |
Example Response:
{
"cpu_temp": 39.0,
"cpu_usage": 28.6,
"total_memory": 429,
"used_memory": 63,
"total_disk": 15,
"used_disk": 2
}
- Ensure the server is running and accessible from your network.
- Modify the start_server.sh script if you need to change the default port or other configurations.