we don't need additional date in the log

This commit is contained in:
Peter Baumann 2021-11-19 10:48:17 +00:00
parent a535ec9a5b
commit 770e45da83

View file

@ -83,12 +83,12 @@ main () {
pktafter=`grep $INTERFACE: /proc/net/dev | cut -d : -f2 | awk '{ print $2 }'`
pkts=$(( $pktafter - $pktbefore ))
log_output "`date` $pkts packets/s"
log_output "$pkts packets/s"
if [ $pkts -gt $THRESHOLD ]; then
log_output "`date` threshold over $THRESHOLD pps, capturing 2000 packets."
log_output "threshold over $THRESHOLD pps, capturing 2000 packets."
tcpdump -n -s0 -c 2000 -w $CAPDEST/trace-"$(date +"%Y_%m_%d_%H_%M")".cap
log_output "`date` Packets captured, sleeping $SLEEPTIME seconds..."
log_output "Packets captured, sleeping $SLEEPTIME seconds..."
sleep $SLEEPTIME
fi
done