Compare commits

..
10 Commits
2 changed files with 3 additions and 2 deletions
BIN
View File
Binary file not shown.
+3 -2
View File
@@ -17,8 +17,9 @@ void print_load() {
perror("getloadavg failed"); perror("getloadavg failed");
return; return;
} }
if(loadavg[0] > 2.0){ if(loadavg[0] > 1.0){
int result = system("ps aux"); int result = system("ps aux | awk '$3 > 1.0' | sort -k3 -nr");
// 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]);