Compare commits

..
6 Commits
Author SHA1 Message Date
retoor df74604bfa Raised minimum to 2.0. 2024-12-11 20:58:01 +01:00
retoor 2d4cae33f7 Version that pushes ps aux when load too high. 2024-12-11 20:51:59 +01:00
retoor 148968c235 Version that pushes ps aux when load too high. 2024-12-11 20:51:45 +01:00
retoor 746c84950a Version that pushes ps aux when load too high. 2024-12-11 20:51:27 +01:00
retoor da20542bb4 Update delay. 2024-12-01 04:58:35 +01:00
retoor fc1bba730f Initial commit. 2024-12-01 04:54:43 +01:00
2 changed files with 2 additions and 3 deletions
BIN
View File
Binary file not shown.
+2 -3
View File
@@ -17,9 +17,8 @@ void print_load() {
perror("getloadavg failed"); perror("getloadavg failed");
return; return;
} }
if(loadavg[0] > 1.0){ if(loadavg[0] > 2.0){
int result = system("ps aux | awk '$3 > 1.0' | sort -k3 -nr"); int result = system("ps aux");
// int result = system("top -n 1");
(void)result; (void)result;
} }
printf("%.2f %.2f %.2f", loadavg[0], loadavg[1], loadavg[2]); printf("%.2f %.2f %.2f", loadavg[0], loadavg[1], loadavg[2]);