1
0
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:
cn
2012-01-09 21:07:28 +01:00
parent d020f29b34
commit 8f5d97e002
3 changed files with 45 additions and 2 deletions

15
syslog5mins Executable file
View 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