Problem
SystemMetricsSensor, that is calculating and returning value of SystemCpuLoad metric, is not returning the correct value. ENV Monitoring component is using this metric value as a part of environmental monitoring data-set.
Value should be calculated as follows:
.update(stats.getSystemCpuLoad() * SYSTEM_CPU_LOAD_MULTIPLIER);
Currently it is not calculated as stated above, implementation must be changed to obtain correct cpuload value. Note that getSystemCpuLoad returns values from 0.0 to 1.0. Multiplication with 100 makes this number a percent. It must be take notice that this value is not classical load average (from uptime) and to clarify this, it needs to be documented to avoid confusion. For example “this value returns CPU load percentage of the system”.
Additionally getSystemCpuLoad may return negative value when system recent cpu usage is not available. The new implementation must handle this situation and if negative value is detected, returned value has to set to 0.
Acceptance criteria
The value of SystemCpuLoad metric is calculated and returned correctly
Negative return values are handled properly
New implementation is tested by querying the ENV Monitoring and validating the correct value of SystemCpuLoad metric included into dataset.
Affected components: ENV Monitoring Affected documentation: ARC-ENVMON Estimated delivery: Q1 / 2018 External reference: https://jira.csc.fi/browse/PVAYLADEV-1042
Problem SystemMetricsSensor, that is calculating and returning value of SystemCpuLoad metric, is not returning the correct value. ENV Monitoring component is using this metric value as a part of environmental monitoring data-set.
Value should be calculated as follows: .update(stats.getSystemCpuLoad() * SYSTEM_CPU_LOAD_MULTIPLIER);
Currently it is not calculated as stated above, implementation must be changed to obtain correct cpuload value. Note that getSystemCpuLoad returns values from 0.0 to 1.0. Multiplication with 100 makes this number a percent. It must be take notice that this value is not classical load average (from uptime) and to clarify this, it needs to be documented to avoid confusion. For example “this value returns CPU load percentage of the system”.
Additionally getSystemCpuLoad may return negative value when system recent cpu usage is not available. The new implementation must handle this situation and if negative value is detected, returned value has to set to 0.
Acceptance criteria