initial version

This commit is contained in:
Iñigo Etxaniz
2026-11-07 08:13:05 +00:00
parent 5802220575
commit 66bb1d686e
4 changed files with 125 additions and 2 deletions
+6 -2
View File
@@ -1,3 +1,7 @@
# host_session
# host-session
host session table relateed scripts
Stores one row per finished session of the host in the custom table `host_session` (schema 0.0.1): start and end time, duration, mean and max of CPU, RAM and disk percentage, and coverage (share of the session's minutes with a CPU sample). The hub adds the gateway as `spoke_id`.
Runs every minute. The current boot comes from `/proc/uptime`. The previous session is found in the history of the uptime signal (63) before that boot: its last sample is the end, end minus that sample's uptime is the start. A session already stored (start within two minutes) is skipped, so repeated runs write nothing twice. The first row appears after the first reboot that follows the uptime signal's creation (2026-11-06 18:38).
Signal ids are deb13-kde's in the home core. Needs only `requests` in the image.