diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-09-02 12:27:07 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-09-02 12:27:07 -0500 |
commit | 334a6fab05b5e51097010b1da41fca32df7b8959 (patch) | |
tree | b652db0c4ff3f8f7fcccb02a9a457d9cb95984d5 /scripts/vyatta-monitor | |
parent | 86584774d9a33cad75e6dac2b66ce48513fa84f1 (diff) | |
download | vyatta-op-334a6fab05b5e51097010b1da41fca32df7b8959.tar.gz vyatta-op-334a6fab05b5e51097010b1da41fca32df7b8959.zip |
Initial monitor vpn implementation. Other montior commands will be build on these scripts
Diffstat (limited to 'scripts/vyatta-monitor')
-rwxr-xr-x | scripts/vyatta-monitor | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/vyatta-monitor b/scripts/vyatta-monitor new file mode 100755 index 0000000..22867e8 --- /dev/null +++ b/scripts/vyatta-monitor @@ -0,0 +1,7 @@ +#!/bin/bash +declare awkmatch="$2" +for i in "${@:3}"; do + awkmatch+="|$i" +done +tail -f /var/log/messages \ + | awk "/$awkmatch/{ \$5=\" $1:\"; for (f=5; f<=NF; ++f) {printf(\"%s \", \$f);}; printf(\"\n\") }" |