How to determine precise Home Assistant instance processor use percentage?

I have dedicated 2 CPU cores to my VMWare Home Assistant VM

I would like to know how to get the general load in percent (to the 10th decimal place) for CPU utilization of the 2 CPU cores for my Home Assistant instance.

I tried using the sensor sensor.processor_use via the systemmonitor integration. However, it only shows an integer. I.E., 1, 2, 3, etc. The value doesn’t have decimal places. I’m not even sure if this is the sensor that will do what I want.

Do I need to use one of the below systemmonitor sensors instead? If so, which one will do what I want? I couldn’t find any documentation about these sensors.

sensor.load_1m
sensor.load_5m
sensor,load_15m

PS: I already have a CPU utilization sensor for my VMWare server process on my Windows PC Host using Glances for Windows. However, that sensor includes the general CPU utilization of other VMs too on the host; which I don’t want.

Any sensor you can pull from inside HA will only include the usage of the CPU on the virtual hardware and not the usage used to emulate that hardware.
If you want the usage for the entire VM including hardware emulation, then you need to find a sensor on the hypervisors hostOS.

Yes I’m interested in a existing sensor from the virtual hardware. I just dont know from where.and what to do specifically.

You have to see what the hypervisor provides of data.
Sometimes they provide data iver SNMP, which can be easily picked up by HA.
This is a hypervisor specific issue and not really one that is tied to HA.

What hypervisor?

Hypervisor is the program that makes the VMs possible, like Proxmox, VirtualPC, VirtualBox,WMWare, Hyper-V and so on.

Thanks; but, I would prefer just to get general CPU utilization from within Home Assistant via systemmonitor or something similar. I just didn’t understand which one to use (sensor.load_1m, sensor.load_5m, sensor,load_15m, CPU utilization). I just wasn’t sure which one would be the closest to what I’m looking for in my first post. I’m still not sure how to take advantage of sensor.load_1m, sensor.load_5m, sensor,load_15m since I couldn’t find any documentation for those sensors.

It is probably the same as the Linux command, top.

Those sensors will just show you the usage of the virtual CPU.
The actual CPU usage of the VM might be a lot higher.

Thanks. But, I’m still not sure which one of those sensors to use in systemmonitor.

They are all showing the average CPU load,but over different time periods.

1 Like

I didn’t realize that I already have access to this info via Glances which runs on my Host OS. I was able to identify the HA VM by looking at the respective “command-line” for this process in Windows Task Manager/Glances API response: Specifically:

"C:\Program Files (x86)\VMware\VMware Player\x64\vmware-vmx.exe" -s "vmx.noUIBuildNumberCheck=TRUE" -# "product=4;name=VMware Player;version=17.0.1;buildnumber=21139696;licensename=VMware Player;licenseversion=17.0;" -@ "pipe=\\.\pipe\vmx55defce9cfb53d59;msgs=ui" "C:\Users\MKANET\VMware VMs\HA\HA.vmx"

The card I made below recently is comprised of several different Glances sensors for each process’s CPU utilization, physical Mem, and Virtual Mem:
HA