df usage not calculated correctly with logical volumes
Status: Beta
Brought to you by:
bamm
Logical volumes break the df calculation on line 157 of
log_packets.sh. This is because vg's span more than one
line, and the awk print $5 doesn't print out the
correct column. The following is a recommended fix
which goes right after the CURR_USE=`` line 157:
if [ -z "`echo ${CUR_USE}|grep '[0-9]'`" ]; then
echo "Cannot determine disk usage. Please edit
the following line"
cat $0|grep -n "CURR_USE="|grep -v cat
echo "We recomend: "
echo "CURR_USE=\`df /snort_data/ | grep -v -i
filesystem | awk '{print $4}'|tr -d % |grep '[0-9]'\`"
exit 127
fi