mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 02:48:18 +00:00
WIFI-1907-CPU-Utilization
Made minor changes to improve the accuracy of cpu utilization metric Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
This commit is contained in:
committed by
Rick Sommerville
parent
e6bb6f7d4f
commit
cfba41d7cc
13
feeds/wlan-ap/opensync/patches/37-cpu-utilization.patch
Normal file
13
feeds/wlan-ap/opensync/patches/37-cpu-utilization.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Index: opensync-2.0.5.0/src/lib/target/src/target_linux.c
|
||||||
|
===================================================================
|
||||||
|
--- opensync-2.0.5.0.orig/src/lib/target/src/target_linux.c
|
||||||
|
+++ opensync-2.0.5.0/src/lib/target/src/target_linux.c
|
||||||
|
@@ -249,7 +249,7 @@ static bool linux_device_cpuutil_get(dpp
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate percentage and round */
|
||||||
|
- busy = (1.0 - ((double)diff.hz_idle / (double)hz_total_diff)) * 100.0;
|
||||||
|
+ busy = (100.0 - (((double)diff.hz_idle *100.0) / (double)hz_total_diff));
|
||||||
|
|
||||||
|
cpuutil->cpu_util = (uint32_t) (busy + 0.5);
|
||||||
|
|
||||||
Reference in New Issue
Block a user