ha-asusrouter
ha-asusrouter copied to clipboard
[Bug] Wrong CPU usage after upgrade
The problem
Wrong CPU usage reported, hoes above 100%
It shows also that router has 4 cores, but in real, it has only 3 cores
Your device model
DSL-AX82U
Firmware type
Stock
Firmware version
3.0.0.4.386_49607
Integration version with the issue
0.23.2
Method of the integration installation
HACS
What version and type of Home Assistant installation do you use
2023.10.5
Is there anything useful in the logs?
No response
Diagnostics information
No response
Additional information
No response
Sorry to hear you are experiencing issues with AsusRouter.
Do you mind turning on debug logging for the backend library asusrouter
to check for CPU information? Should look like this:
2023-11-05 15:21:47.589 DEBUG (MainThread) [asusrouter.asusrouter] Using cached data for
AsusData.CPU: {'total': {'total': 36175927.0, 'used': 1674728.0, 'usage': 4.07}, 1: {'total': 9035151, 'used': 781129, 'usage': 4.96}, 2: {'total': 9045202, 'used': 296599, 'usage': 3.31}, 3: {'total': 9047851, 'used': 303425, 'usage': 4.86}, 4: {'total': 9047723, 'used': 293575, 'usage': 3.12}}
It would be nice to get several of those lines. This will help to understand whether the data is received wrongly by the backend library or processed wrongly by the integration
To enable debug logging for the library you can add the following into your configuration.yaml
:
logger:
default: warning
logs:
asusrouter: debug
P.S. Please, keep in mind, that debug logging will produce a large amount of output in your log
Hello,
Adding lines:
Using cached data for
AsusData.CPU: {'total': {'total': 1678766.0, 'used': 33390.0}, 1: {'total': 419693, 'used': 9024}, 2: {'total': 419690, 'used': 17489}, 3: {'total': 419691, 'used': 6407}, 4: {'total': 419692, 'used': 470}}
2023-11-05 16:40:58.317 DEBUG (MainThread) [asusrouter.asusrouter] Using cached data for
AsusData.CPU: {'total': {'total': 1678766.0, 'used': 33390.0}, 1: {'total': 419693, 'used': 9024}, 2: {'total': 419690, 'used': 17489}, 3: {'total': 419691, 'used': 6407}, 4: {'total': 419692, 'used': 470}} 2023-11-05 16:40:58.317 DEBUG (MainThread) [asusrouter.modules.homeassistant] Converting data to the list of sensors by map: {'total': {'total': 1678766.0, 'used': 33390.0}, 1: {'total': 419693, 'used': 9024}, 2: {'total': 419690, 'used': 17489}, 3: {'total': 419691, 'used': 6407}, 4: {'total': 419692, 'used': 470}}
Thanks. So this comes from the backend. I will let you know if some more data is required from your side
Hello. Mind checking whether you still have this issue with the new version 0.24.0
?
Looks good now, thank you
I'm still seeing incorrect CPU usage data with 0.24.0 (RT-AC66U)
@ejpenney, the fix should have just solved the problem with usage above 100%. There are still other bugs possible. Do you mind opening a new issue? It's rather hard to track things which are comments. Please, include the update interval you have set for CPU sensor update (default is 30 s if you didn't change it). And HA sensor history for ~1 hour or so, so that it would be possible to see if this is noise in values or oscillations
@stskrp, good that for you it works better now. In case you are experiencing any other problem, please, open a new issue
Sorry for late response, but it looks that it started happening again :/