collect: Fix collect time on net-usage inventory.

Signed-off-by: 's avatarEdileuton Henrique de Oliveira <eho09@c3sl.ufpr.br>
parent bcde8c06
...@@ -84,6 +84,11 @@ function xml_data_generator() ...@@ -84,6 +84,11 @@ function xml_data_generator()
COUNT=$((${COUNT} + 1)) COUNT=$((${COUNT} + 1))
else else
INTERVALID=$(cut -d" " -f1 <<< $line) INTERVALID=$(cut -d" " -f1 <<< $line)
while test $COUNT -lt $INTERVALID -a $COUNT -lt 288; do
COUNT=$((${COUNT} + 1))
increment_time
done
if test $COUNT -lt 288; then if test $COUNT -lt 288; then
xml_print xml_print
...@@ -92,7 +97,7 @@ function xml_data_generator() ...@@ -92,7 +97,7 @@ function xml_data_generator()
fi fi
fi fi
done < $TRAFFIC done < $TRAFFIC
else else
# If date in TRAFFIC file is older than 15 days then remove the file. # If date in TRAFFIC file is older than 15 days then remove the file.
rm -f $TRAFFIC rm -f $TRAFFIC
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment