Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Incorrect memory

Open fadri14 opened this issue 2 years ago • 5 comments

Hello, I think I've encountered a bug. I would like to see the ram memory consumption of my pc, so I have this configuration here:

    "memory": {
        "interval": 5,
        "format": "{used:0.2f} ",
        "states": {
            "warning": 70,
            "critical": 90
        },
        "tooltip": false
    },

the problem is that the value doesn't seem to be correct, for example I get 2.20 whereas top gives me 1.74 and the next command: free -h | awk '/Mem:/ {print $3}' returns 1.7Gi.

Do you know what causes this difference?

fadri14 avatar Oct 14 '23 07:10 fadri14

Anyone ?

fadri14 avatar Oct 25 '23 16:10 fadri14

is the issue still open?, can you point where this part of the code is and if i should work on the script itself or write a small c program to get the cpu usage?

kavitheshAS avatar Nov 16 '24 10:11 kavitheshAS

no now it’s ok

fadri14 avatar Nov 18 '24 12:11 fadri14

Hello this is because of the difference between GB and GiB:

  • 1 GiB = 1024^3 bytes
  • 1 GB = 1000^3 bytes

FrChocolate avatar Apr 11 '25 16:04 FrChocolate

Is it possible to change GiB to MiB instead?

aljustiet avatar Nov 26 '25 14:11 aljustiet