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 graph not working on CentOS 7 #498

Closed
pschiffe opened this issue Nov 22, 2015 · 4 comments
Closed

Memory graph not working on CentOS 7 #498

pschiffe opened this issue Nov 22, 2015 · 4 comments

Comments

@pschiffe
Copy link

@pschiffe pschiffe commented Nov 22, 2015

Hello,

CentOS 7 has different output of free -m command than CentOS 6:
CentOS 6:

# free -m
             total       used       free     shared    buffers     cached
Mem:          1877       1610        267          1        123        710
-/+ buffers/cache:        775       1101 
Swap:            0          0          0

CentOS 7:

# free -m
              total        used        free      shared  buff/cache   available
Mem:           1840         205         559          13        1076        1472
Swap:             0           0           0

And because vesta is parsing this output as (in v-update-sys-rrd-mem):

    mem=$(free -m)
    used=$(echo "$mem" |awk '{print $3}'|head -n3 |tail -n1)
    free=$(echo "$mem" |awk '{print $4}'|head -n3 |tail -n1)
    swap=$(echo "$mem" |awk '{print $3}'|tail -n1)

It always shows zero. Head command needs to be head -n 2.

@DavorSaric
Copy link

@DavorSaric DavorSaric commented Feb 28, 2016

I confirm this.

@orwah
Copy link
Contributor

@orwah orwah commented Feb 28, 2016

Me too.

@blare
Copy link

@blare blare commented Feb 28, 2016

I didn't noticed, but I can confirm this too.

Aplying workaround @pschiffe describes is now working fine.

Thanks!

@anton-reutov
Copy link
Collaborator

@anton-reutov anton-reutov commented Sep 7, 2016

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants