Hi, I’m not familiar with the CLI and inner workings of the Home Assistant and I appreciate any help I can get.
My CPU is being locked at 100% by a process within the python3 (According to Glances) and I can’t figure out how and where to install the py-spy to help me identify which process is the culprit.
I’m running Hassio installed on the Virtualbox on Win 10 machine. I’m able to login using “root” into the Home Assistant CLI, and I can also type “login” to get access to the Host.
What I noticed during the sampling is that I was getting a message saying that sampling is behind and results may be inaccurate. I don’t know what to do to prevent that or if I got valid results.
Once the py-spy is installed your cursor should change to something like “bash-5.0# _”
Type top to display all the processes that are currently running. At the top of the list will be the process that is using most of the resources. Take a note of its PPID, in my case 236 (python3 -m homeassistant --config /config)
Press ctrl+c to exit the list and run this command to generate the flame graph:
py-spy record --pid <your_ppid_goes_here> --output /config/py-spy.svg --duration 120