From 090aba2e6355cd51dd7731ad7aeefc8dfa824a0e Mon Sep 17 00:00:00 2001 From: phyto Date: Fri, 18 Jan 2019 17:56:27 +0100 Subject: [PATCH] scaling corrected --- essai.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/essai.c b/essai.c index 33ab9fa..bd7bdb8 100644 --- a/essai.c +++ b/essai.c @@ -53,11 +53,11 @@ while ((opt = getopt(argc, argv, "v")) != -1) { foo = get_loadavg(loads); if (foo) fprintf(stderr, "get loadavg -> %d\n", 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]); } -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; }