scaling corrected
This commit is contained in:
parent
c17b4a01fb
commit
090aba2e63
4
essai.c
4
essai.c
@ -53,11 +53,11 @@ while ((opt = getopt(argc, argv, "v")) != -1) {
|
|||||||
foo = get_loadavg(loads);
|
foo = get_loadavg(loads);
|
||||||
if (foo) fprintf(stderr, "get loadavg -> %d\n", foo);
|
if (foo) fprintf(stderr, "get loadavg -> %d\n", foo);
|
||||||
for (foo=0; foo<3; foo++) {
|
for (foo=0; foo<3; foo++) {
|
||||||
il[foo] = ((int)(loads[foo] * 900.0)) & 0x3ff;
|
il[foo] = ((int)(loads[foo] * 90.0)) & 0x3ff;
|
||||||
fprintf(stderr, "%f -> %d\n", loads[foo], il[foo]);
|
fprintf(stderr, "%f -> %d\n", loads[foo], il[foo]);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("T %ld %d %d %d %d\n", time(NULL), getpid()%1024, il[0], il[1], il[2]);
|
printf("%ld %d %d %d %d\n", time(NULL), getpid()%84, il[0], il[1], il[2]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user