Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#16 df usage not calculated correctly with logical volumes

open
nobody
None
5
2005-07-06
2005-07-06
EMR
No

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

Discussion