AstraExt/astra-monitor

Memory is reported in GBs, whereas it should in GiBs

Closed this issue · 1 comments

Description

I noticed that, in the new version, the various amounts of memory are reported in GBs (1000³).

This may be acceptable for Storage and Network, but for Memory I expect them to be in GiBs (1024³) and it was so in the previous versions.

There is currently no option in Memory Settings to switch between GB and GiB, i.e., something similar to Data Unit setting in Storage or Network.

Screenshots

image

My hardware has 24 GiBs of RAM, but it is reported 25 GB.

Environment

  • Astra Monitor Version: 12
  • GNOME Version: 45.2
  • Operating System and Version: Ubuntu 23.10
  • Other Relevant System Information: NA

Yeah, I noticed that. In the latest version I fixed some conversions but it turns out that linux provide data in a very confusing way:

While the file shows kilobytes (kB; 1 kB equals 1000 B), it is actually kibibytes (KiB; 1 KiB equals 1024 B). This imprecision in /proc/meminfo is known, but is not corrected due to legacy concerns - programs rely on /proc/meminfo to specify size with the "kB" string.

I'm gonna add also unit preferences for Memory, defaulting to KiB format.