mirror of
https://github.com/cmur2/munin-postfix.git
synced 2025-06-29 10:30:29 +02:00
Add doc and helper scripts
This commit is contained in:
15
syslog5mins
Executable file
15
syslog5mins
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "No file given!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for (( i = 4; i >= 0; i-- )) ; do
|
||||
# In %_d the underscore is important since it demands `date`
|
||||
# to pad with spaces (like syslog for e.g. "Jan 1" to "Jan 9")
|
||||
# instead of zeros.
|
||||
dstring=`LANG=C date -d "-$i min" +"%b %_d %R"`
|
||||
#echo "Entries for '$dstring':"
|
||||
grep "^$dstring:.. " $1
|
||||
done
|
Reference in New Issue
Block a user