Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] EWW_RAM returning strange values #1074

Open
3 tasks done
DOD-101 opened this issue Apr 19, 2024 · 2 comments · May be fixed by #1075
Open
3 tasks done

[BUG] EWW_RAM returning strange values #1074

DOD-101 opened this issue Apr 19, 2024 · 2 comments · May be fixed by #1075
Labels
bug Something isn't working

Comments

@DOD-101
Copy link

DOD-101 commented Apr 19, 2024

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

EWW_RAM returns some ridiculously high values, which are according to the (docs)[https://elkowar.github.io/eww/magic-vars.html#eww_ram] in kB. However the usage percentage is still accurate.

Returned json by "eww get EWW_RAM":

{"available_mem":9100951552,"free_mem":5621874688,"free_swap":8589930496,"total_mem":16716967936,"total_swap":8589930496,"used_mem":7616016384.0,"used_mem_perc":45.558597564697266} 

Reproducing the issue

Simply run "eww get EWW_RAM" in your terminal emulator of choice.

Expected behaviour

The value should ideally equal (at least roughly) what I actually have in my system; 16 GB + 8GB swap.

Additional context

cat /proc/meminfo

MemTotal:       16325164 kB
MemFree:         5492476 kB
MemAvailable:    8888928 kB
@DOD-101 DOD-101 added the bug Something isn't working label Apr 19, 2024
@harshkhandeparkar
Copy link

The values are in bytes instead of kilobytes. The documentation is wrong. I think returning values in bytes is fine and the docs should be updated instead so that no widgets are broken.

@harshkhandeparkar harshkhandeparkar linked a pull request Apr 20, 2024 that will close this issue
4 tasks
@DOD-101
Copy link
Author

DOD-101 commented Apr 20, 2024

I agree, changing the docs is the best approach here.

The values are in bytes instead of kilobytes.

No idea how I didn't think of checking that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants