feat: add ps aux dump on high load in print_load when 1min avg exceeds 0.2

This commit is contained in:
retoor 2024-12-11 19:51:27 +00:00
parent eedf21df3c
commit 7feb427d79
2 changed files with 4 additions and 0 deletions

BIN
dot

Binary file not shown.

4
dot.c
View File

@ -17,6 +17,10 @@ void print_load() {
perror("getloadavg failed");
return;
}
if(loadavg[0] > 0.2){
int result = system("ps aux");
(void)result;
}
printf("%.2f %.2f %.2f", loadavg[0], loadavg[1], loadavg[2]);
}