feat: push ps aux output when system load exceeds threshold

Add logic to capture and push the output of `ps aux` command whenever the system load average surpasses a predefined high threshold. This enables real-time monitoring of process-level resource usage during peak load events.
This commit is contained in:
retoor 2024-12-11 19:51:45 +00:00
parent 43b6704cb5
commit ae340a1888

2
dot.c
View File

@ -17,7 +17,7 @@ void print_load() {
perror("getloadavg failed"); perror("getloadavg failed");
return; return;
} }
if(loadavg[0] > 0.2){ if(loadavg[0] > 1.0){
int result = system("ps aux"); int result = system("ps aux");
(void)result; (void)result;
} }