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

Issues with Ram/Swap #4

Open
Mte90 opened this issue Jan 15, 2018 · 1 comment
Open

Issues with Ram/Swap #4

Mte90 opened this issue Jan 15, 2018 · 1 comment

Comments

@Mte90
Copy link
Contributor

Mte90 commented Jan 15, 2018

I got Memory 0 with the script but is impossible.

So checking on the code I got:

[domain@machine ~]$ free -m                                                                                                                          
              total        used        free      shared  buff/cache   available                                                                      
Mem:         128817        8881        9009        5416      110926      112742                                                                      
Swap:         16383          13       16370
[domain@machine ~]$ free -m | awk 'NR==3{print $3}'
13

Seems that take the value from swap on the wrong line

@Mte90
Copy link
Contributor Author

Mte90 commented Jan 15, 2018

I patched using:
local USED_MEM=$( free -m | awk 'NR==2{print $3}' )

nevercast added a commit to nevercast/server-monitoring that referenced this issue Apr 21, 2020
nevercast added a commit to brushtechnology/server-monitoring that referenced this issue Apr 21, 2020
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