mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
fix for mem chart on rhel/centos 7
This commit is contained in:
parent
921f3b857f
commit
742eba74b0
1 changed files with 3 additions and 3 deletions
|
@ -61,9 +61,9 @@ fi
|
||||||
# Parsing data
|
# Parsing data
|
||||||
if [ "$period" = 'daily' ]; then
|
if [ "$period" = 'daily' ]; then
|
||||||
mem=$(free -m)
|
mem=$(free -m)
|
||||||
used=$(echo "$mem" |awk '{print $3}'|head -n3 |tail -n1)
|
used=$(echo "$mem" |grep Mem |awk '{print $3}')
|
||||||
free=$(echo "$mem" |awk '{print $4}'|head -n3 |tail -n1)
|
free=$(echo "$mem" |grep Mem |awk '{print $4}')
|
||||||
swap=$(echo "$mem" |awk '{print $3}'|tail -n1)
|
swap=$(echo "$mem" |grep Swap |awk '{print $3}')
|
||||||
|
|
||||||
# Updating rrd
|
# Updating rrd
|
||||||
rrdtool update $RRD/mem/mem.rrd N:$used:$swap:$free
|
rrdtool update $RRD/mem/mem.rrd N:$used:$swap:$free
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue