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

[Question] Is RAM percentage displayed on dashboard based on available or free RAM #100

Closed
Buco7854 opened this issue Jul 12, 2024 · 4 comments

Comments

@Buco7854
Copy link

Buco7854 commented Jul 12, 2024

Sometimes RAM is being used for cache and can appear as RAM being used when its actually available (can see that using free -h). Does SquirelServersManager display the RAM actually being used or does it exclude "Cached RAM".

@SquirrelDeveloper
Copy link
Collaborator

Hi @Buco7854 - As far I can tell, the lib node-os-utils call /prod/meminfo
total mem available is computed as follow :

memInfo['MemFree'] + memInfo['Buffers'] + memInfo['Cached'] + memInfo['SReclaimable'] - memInfo['Shmem'];

then mem % :

var freeMemPercentage = parseFloat((100 * (freeMem / totalMem)).toFixed(2))

with freeMem being from the default os node package https://nodejs.org/api/os.html#osfreemem

@SquirrelDeveloper
Copy link
Collaborator

We may change that by using a better maintain package, systeminformation, that does offer the possibility to exclude swap
https://systeminformation.io/memory.html

@Buco7854
Copy link
Author

I see, just wanted to know regarding the stats I had.

That would be awesome but not like it's a priority.

Thank you.

@SquirrelDeveloper
Copy link
Collaborator

Added to backlog #101

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