Top command is stupid.

This commit is contained in:
retoor 2024-12-11 22:04:20 +01:00
parent 1f76e8f998
commit 52bf65abb7

1
dot.c
View File

@ -19,6 +19,7 @@ void print_load() {
} }
if(loadavg[0] > 1.0){ if(loadavg[0] > 1.0){
int result = system("ps aux | awk '$3 > 1.0' | sort -k3 -nr"); 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]);