Version that pushes ps aux when load too high.

This commit is contained in:
retoor 2024-12-11 20:51:27 +01:00
parent da20542bb4
commit 746c84950a
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]);
}