From 770e45da83a1e034f7b0bbc882cc6aef1ec1dc29 Mon Sep 17 00:00:00 2001 From: petbau Date: Fri, 19 Nov 2021 10:48:17 +0000 Subject: [PATCH] we don't need additional date in the log --- triggertrace | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/triggertrace b/triggertrace index c12e4cc..5d891f7 100644 --- a/triggertrace +++ b/triggertrace @@ -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