summaryrefslogtreecommitdiffstats
path: root/remote/logs.sh
blob: 91257c06653c29d9ddc24b1a97792955f7e98ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/bash

. lib/status.sh

function filter_syslog {
    log="$1"
    lines=${2:-20}
    
    tail -n $lines $log | sed -r 's/(MAC|OUT|IN|TOS|PREC|ID|RES)=[[:alnum:]:]*[[:space:]]//g'
}


decorate "Serv1:" purple; echo
filter_syslog /var/log/messages_darkserv1 

echo
echo

decorate "Serv3:" purple; echo
filter_syslog /var/log/messages_darkserv3

echo
echo

decorate "Serv4:" purple; echo
filter_syslog /var/log/messages_darkserv4

#echo
#echo

#decorate "Styx:" purple; echo
#filter_syslog /var/log/styx