Top command is stupid.
This commit is contained in:
parent
1f76e8f998
commit
52bf65abb7
1
dot.c
1
dot.c
@ -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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user