feat: add system monitoring RPC endpoints (system.stats, system.processes, system.temperature)

Read real metrics from /proc/stat, /proc/meminfo, /proc/uptime, /proc/loadavg,
df, ps, and /sys/class/thermal/. CPU usage computed via dual-sample jiffies.
Deployed and verified on live server — all three endpoints return real data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-11 00:22:57 +00:00
co-authored by Claude Opus 4.6
parent 5dbc29d19c
commit e12a50f938
3 changed files with 275 additions and 1 deletions
+6
View File
@@ -15,6 +15,7 @@ mod peers;
mod router;
mod tor;
mod totp;
mod system;
mod update;
mod wallet;
@@ -319,6 +320,11 @@ impl RpcHandler {
"dwn.status" => self.handle_dwn_status().await,
"dwn.sync" => self.handle_dwn_sync().await,
// System monitoring
"system.stats" => self.handle_system_stats().await,
"system.processes" => self.handle_system_processes().await,
"system.temperature" => self.handle_system_temperature().await,
// System updates
"update.check" => self.handle_update_check().await,
"update.status" => self.handle_update_status().await,