ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
737 stars 48 forks source link

bug: Displaying wrong usage of RAM (WAM) #178

Closed kristiyanivanovx closed 2 years ago

kristiyanivanovx commented 2 years ago

I think the RAM / WAM usage is calculated incorrectly, compared to other fetch solutions. You may want to take a look at this issue and the pull request:

https://github.com/dylanaraps/neofetch/pull/391 https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716

On my machine, uwufetch displays WAM 3067 MiB/7654 MiB, while neofetch displays Memory: 4189MiB / 7654MiB.

Excuse me if this particular issue is already addressed and you have chosen to calculate it differently. Cheers.

ad-oliviero commented 2 years ago

After looking for ram usage in some programs: The screenshot I thought that a proper way to get ram usage on linux does not exist. I will try to push an update that gets ram usage without free (reading /proc/meminfo as the comment that you linked says, because it should be faster than using an external program, I think), and if no one complains about that, it will be the "final" way to get ram.

LukeHuckman commented 2 years ago

GNOME's system monitor measures RAM usage in MB/GB, not MiB/GiB which is how most other CLI based system monitors, including free measures data by default. This might explain why the values are significantly different.

ad-oliviero commented 2 years ago

Changing the unit in the preferences of gnome system monitor makes no difference: it still shows ~600MiB more than the others.

ad-oliviero commented 2 years ago

After an inactivity period of 76 days, I am pretty sure that a solution to this problem does not exist: there are lots of different ways to get memory usage on linux, but every one of them has a different result. So how can we decide which one is right? Well, that's simple: we don't. They are all valid.

Maybe in future I'll add a way to configure what values to include in the memory calculations.

At the moment I'm closing this issue, but if someone finds a document about a "standard"/"official" way to get mem usage, I'll be happy to reimplement it here.

Edit: The issue will stay pinned.