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

Comments

Projects
None yet
5 participants
@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

This comment has been minimized.

Show comment
Hide comment
@DavorSaric

DavorSaric Feb 28, 2016

I confirm this.

DavorSaric commented Feb 28, 2016

I confirm this.

@orwah

This comment has been minimized.

Show comment
Hide comment
@orwah

orwah Feb 28, 2016

Contributor

Me too.

Contributor

orwah commented Feb 28, 2016

Me too.

@blare

This comment has been minimized.

Show comment
Hide comment
@blare

blare Feb 28, 2016

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

Aplying workaround @pschiffe describes is now working fine.

Thanks!

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

This comment has been minimized.

Show comment
Hide comment
@anton-reutov

anton-reutov Sep 7, 2016

Collaborator

Fixed

Collaborator

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