we don't need additional date in the log
This commit is contained in:
parent
a535ec9a5b
commit
770e45da83
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue