Open will-huang9531 opened 1 month ago
You can use telnet to enter gateway's shell and run top
command to find out problem application.
You can use telnet to enter gateway's shell and run
top
command to find out problem application.
thx for reply This is what the top command displays. ‘mha_master --log-level 6 --background’ Do you have any ideas about it?
This is main gateway's application. I'll check my gateway when I have time.
This is main gateway's application. I'll check my gateway when I have time.
I appreciate! I asked several friends who have the same device, and this seems to be a common situation. If you have time to fix it, we would greatly appreciate it.
Maybe it's default behaviour. Better to check situation when integration haven't make any changes with gateway after reboot. Only open telnet.
Maybe it's default behaviour. Better to check situation when integration haven't make any changes with gateway after reboot. Only open telnet.
Does this mean that I need to enter the gateway by telnet to use top command without starting the home assistant? That‘s a bit difficult for me to do that. However, I tried to enter Multimode Gateway 1 by telnet, and use the TOP command, but ‘mha_master --log-level 6 --background’ did not occur. Does this indicate that this is a unique issue of Multimode Gateway 2?
It can be unique issue only for model 2.
This is my gateway:
firmware: 1.0.7_0021
model: lumi.gateway.mcn001
free_mem: 42060
load_avg: 8.16|8.38|8.48|1/134|867
uptime: 22d14h30m7s
mha_master - 0% load
50%cpu too
version 1.0.3_0028
The issue is simple to fix: turn off z3 support in the openmiio_agent and make sure that mZ3GatewayHost_MQTT is never running. This is a bug in openmiio_agent that always tries to restart the mZ3GatewayHost_MQTT if the z3 integration is set up even if mZ3GatewayHost_MQTT cannot possibly start up due to an incompatible zigbee firmware version.
Remove the string "z3" from here: https://github.com/AlexxIT/XiaomiGateway3/blob/master/custom_components/xiaomi_gateway3/core/shell/const.py#L2
mZ3GatewayHost_MQTT
Thank you for your solution, but 'mZ3GatewayHost_MQTT' only consumes a small amount of CPU load ,and the ‘mha_master --log-level 6 --background’ consumes a lot of CPU load. Are you sure there is a correlation between them?
I'm also don't see any correlation.
Previous gateway has similar bug. It was because integration restarts MQTT on public port. And sometime main app starts consume a lot of CPU after that. The solution was - restart this main app. I thought this gateway model not affected. mha_master is main app
ration restarts MQTT on public port. And sometime main app starts consume a lot of CPU after that. The solution was - restart this main app. I thought this gateway model not affected. mha_master is main app
Try it, mha_master is what goes haywire if the mZ3GatewayHost_MQTT is always restarting. Ever since I fixed this, there is no excessive CPU usage on my gateway.
ration restarts MQTT on public port. And sometime main app starts consume a lot of CPU after that. The solution was - restart this main app. I thought this gateway model not affected. mha_master is main app
Try it, mha_master is what goes haywire if the mZ3GatewayHost_MQTT is always restarting. Ever since I fixed this, there is no excessive CPU usage on my gateway.
If possible, could you please provide your Gateway model, Gateway firmware version, Gateway3 version, and the CPU load? I will try it when I have time.
After upgrading the Multimode Gateway 1 to Multimode Gateway 2, during a routine inspection, it was found that the CPU load_avg of Multimode Gateway 2 was abnormally high: 9.29|9.15|9.17|2/130|1796 (according to the document, this value should be less than 3). And this gateway has only 25 sub devices. However, this device did not show any unnormal operation and there were no error logs.
Multimode Gateway 2 Firmwares: 1.0.7_0021 (I have the key) Gateway3 version: v4.0.5 Home Assistant Core: 2023.12.3
PS: It's interesting that I have a Multimode Gateway 1 in another house, but its load is within the normal range.(2.84|2.73|2.74|1/102|29388)