summaryrefslogtreecommitdiff
path: root/multiload/linux-proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'multiload/linux-proc.c')
-rw-r--r--multiload/linux-proc.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c
index 96754092..0e4624d6 100644
--- a/multiload/linux-proc.c
+++ b/multiload/linux-proc.c
@@ -373,26 +373,22 @@ GetNet (int Maximum, int data [4], LoadGraph *g)
int max;
int total = 0;
- for (i = 0; i < COUNT_TYPES; i++)
- {
- /* protect against weirdness */
- if (present[i] >= past[i])
- delta[i] = (present[i] - past[i]);
- else
- delta[i] = 0;
- total += delta[i];
- }
+ for (i = 0; i < COUNT_TYPES; i++)
+ {
+ /* protect against weirdness */
+ if (present[i] >= past[i])
+ delta[i] = (present[i] - past[i]);
+ else
+ delta[i] = 0;
+ total += delta[i];
+ }
- max = autoscaler_get_max(&scaler, total);
+ //max = autoscaler_get_max(&scaler, total);
- for (i = 0; i < COUNT_TYPES; i++)
- data[i] = rint (Maximum * (float)delta[i] / max);
- }
+ for (i = 0; i < COUNT_TYPES; i++)
+ data[i] = delta[i];
- //data[4] = Maximum - data[3] - data[2] - data[1] - data[0];
- data[COUNT_TYPES] = Maximum;
- for (i = 0; i < COUNT_TYPES; i++)
- data[COUNT_TYPES] -= data[i];
+ }
memcpy(past, present, sizeof past);
}