mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Telegraf - Track Oldest PCAP
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Get the data
|
# Get the data
|
||||||
OLDPCAP=$(find /nsm/pcap -type f -printf '%Cs %p\n' | sort | head -n 1 | awk {'print $1'})
|
OLDPCAP=$(find /host/nsm/pcap -type f -exec stat -c'%n %Z' {} + | sort | grep -v "\." | head -n 1 | awk {'print $2'})
|
||||||
DATE=$(date +%s)
|
DATE=$(date +%s)
|
||||||
AGE=$(($DATE - $OLDPCAP))
|
AGE=$(($DATE - $OLDPCAP))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user