ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
460 stars 64 forks source link

CPU - "load_1min_prcnt": 419 #67

Open pickonedev opened 2 years ago

pickonedev commented 2 years ago

Hi!

My CPU percent shows me this "load_1min_prcnt": 419 How can I make it show the proper percent?

I use a RPi 4 Model B r1.4 model

It is real that MotionEye it is keeping my CPU to 100%, but still... How can I see this real value?

Thank you in advance!

cmrenus commented 1 year ago

+1 Except Mine shows 1300% :) htop load averages show around 60 so not sure what is going on. I will say, I moved from a 3B+ to a 4, and I wonder if that had any issues to do with it. Reasons I say, is it kept reporting to the topic that was for the 3b+ even though the hostname had changed

ironsheep commented 1 year ago

Hmmm... looking into this... does it accidentally sum all 4 CPUs? Who knows... checking

ironsheep commented 1 year ago

Can you both send me the output from your daemon?

Also,

@cmrenus when you moved from 3B+ to 4 did you remove the 3B+ names from Home Assistant? Some of the daemon output is persistent so would hang around after the device is gone from the network!

pickonedev commented 1 year ago

For me it is ok

But if you are kind, can you please tell me how can I modify the interval_in_minutes to seconds or to report when values are changed?

{
  "info": {
    "timestamp": "2023-02-19T18:05:15+02:00",
    "rpi_model": "RPi 4 Model B r1.4",
    "ifaces": "e,w,b",
    "host_name": "motioneye",
    "fqdn": "motioneye",
    "ux_release": "bullseye",
    "ux_version": "5.15.61-v8+",
    "up_time": "24 min",
    "last_update": "2023-02-19T18:06:56+02:00",
    "fs_total_gb": 512,
    "fs_free_prcnt": 99,
    "fs_used_prcnt": 1,
    "networking": {
      "eth0": {
        "IP": "192.168.0.52",
      },
      "wlan0": {
      }
    },
    "drives": {
      "root": {
        "size_gb": 512,
        "used_prcnt": 1,
        "device": "/dev/root",
        "mount_pt": "/"
      }
    },
    "memory": {
      "size_mb": 7811,
      "free_mb": 7186
    },
    "mem_used_prcnt": 8,
    "cpu": {
      "hardware": "BCM2835",
      "model": "",
      "number_cores": 4,
      "bogo_mips": "432.00",
      "load_1min_prcnt": 17.2,
      "load_5min_prcnt": 25.2,
      "load_15min_prcnt": 18
    },
    "throttle": [
      "throttled = 0x0",
      "Not throttled"
    ],
    "temperature_c": 58.4,
    "temp_gpu_c": 58.4,
    "temp_cpu_c": 58.4,
    "reporter": "ISP-RPi-mqtt-daemon v1.7.4",
    "reporter_releases": "v1.7.4,v1.6.2,v1.7.2,v1.7.3",
    "report_interval": 1
  }
}
ironsheep commented 1 year ago

Thanks for this. I would like to get some bad-looking numbers from one or more of you, too

Meanwhile, I'll take a look at the code to see if I see a way to get more than 100%