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

9 lines
191 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=$(($DATE - $OLDPCAP))
echo "pcapage seconds=$AGE"