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

Memory Usage probably calculated wrong #113

Open
citronalco opened this issue May 14, 2024 · 1 comment
Open

Memory Usage probably calculated wrong #113

citronalco opened this issue May 14, 2024 · 1 comment

Comments

@citronalco
Copy link

citronalco commented May 14, 2024

With this "free" information on an AP, Meshviewer currently reports 78% as Memory Usage (and 22% free):

# free -m
              total        used        free      shared  buff/cache   available
Mem:          57180       22720       15340          88       19120       12572
Swap:             0           0           0

This does not make sense to me. (Also not the value in "available". As far as I know, "available" should be always at least as big as "buff/cache" - and especially at least as big as "free").
I would expect Meshviewer to display (free + buff/cache) / total as available RAM.

@T0biii
Copy link

T0biii commented Aug 13, 2024

the bar gets the infos from node.memory_usage wich is i guess the infos from the meshviewer.json (memory_usage)

self.showRAM = function showRAM(node: Node) {
return showBar(Math.round(node.memory_usage * 100) + " %", node.memory_usage, node.memory_usage >= 0.8);
};

the real code is in yanic:
https://github.com/FreifunkBremen/yanic/blob/559cd5927a2115b9181e06a22e059b93e2785fd3/output/meshviewer-ffrgb/struct.go#L139-L153

see the mentioned issues of the Yanic code:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants