Files
securityonion/salt/common/telegraf/scripts/oldpcap.sh
2018-11-21 20:05:50 -05:00

9 lines
194 B
Bash

#!/bin/bash
# Get the data
OLDPCAP=$(find /nsm/pcap -type f -printf '%Cs %p\n' | sort | head -n 1 | awk {'print $1'})
DATE=$(date +%s)
AGE=$(expr $DATE - $OLDPCAP)
echo "pcapage seconds=$AGE"