17 lines
259 B
C
17 lines
259 B
C
#include <stdio.h>
|
|
|
|
int main (void)
|
|
{
|
|
float loadavg;
|
|
FILE *fp;
|
|
fp = fopen("/proc/loadavg","r");
|
|
fscanf(fp,"%f",&loadavg);
|
|
fclose(fp);
|
|
printf("%.2f",loadavg);
|
|
if ( loadavg > 2.0 )
|
|
{
|
|
printf("\a");
|
|
}
|
|
return(0);
|
|
}
|