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

free: used miscalculation #36

Closed
Krysztal112233 opened this issue Mar 21, 2024 · 2 comments
Closed

free: used miscalculation #36

Krysztal112233 opened this issue Mar 21, 2024 · 2 comments

Comments

@Krysztal112233
Copy link
Collaborator

Here's procps free's outputs

               total        used        free      shared  buff/cache   available
Mem:        32273048     9797636    15312152      200600     7826228    22475412
Swap:              0           0           0

Here's uutils free's outputs

               total        used        free      shared  buff/cache   available
Mem:        32273048    16985112    15287936      199512     7825372    22451428
Swap:              0           0           0
@Krysztal112233
Copy link
Collaborator Author

Krysztal112233 commented Mar 21, 2024

Infomation from man free

used
Used or unavailable memory (calculated as total - available)

For used memory, it should be mem_info.total - mem_info.available not mem_info.total - mem_info.free

I'll fix this issues in #35 .

@Krysztal112233
Copy link
Collaborator Author

Fixed.

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

1 participant