diff options
Diffstat (limited to 'tools/boca-submit-log')
| -rw-r--r-- | tools/boca-submit-log | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/boca-submit-log b/tools/boca-submit-log index 286e5f6..d9cffa8 100644 --- a/tools/boca-submit-log +++ b/tools/boca-submit-log @@ -15,29 +15,33 @@ if [ "$BOCASERVER" == "" ]; then exit 1 fi -for zcount in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do +for zcount in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - grep -e sudo -e "password:session" /var/log/auth.log | tail -n 100 > /root/.logsession.tmp + grep -e sudo -e "password:session" /var/log/auth.log | tail -n 500 > /root/.logsession.tmp [ -f /root/.logsession ] || touch /root/.logsession diff /root/.logsession /root/.logsession.tmp > /root/.logsession.diff 2>/dev/null res=$? - journalctl | grep -i mount | grep -i -e "filesystem" -e "file system" | tail -n 100 > /root/.logfs.tmp + journalctl | grep -i mount | tail -n 500 > /root/.logfs.tmp [ -f /root/.logfs ] || touch /root/.logfs diff /root/.logfs /root/.logfs.tmp > /root/.logfs.diff 2>/dev/null resfs=$? + grep -i mount /var/log/kern.log | grep -i -e "filesystem" -e "file system" | tail -n 500 > /root/.logkfs.tmp + [ -f /root/.logkfs ] || touch /root/.logkfs + diff /root/.logkfs /root/.logkfs.tmp > /root/.logkfs.diff 2>/dev/null + reskfs=$? if [ "$zcount" == "1" ]; then - tail -n 1000 /var/log/logkeys.log > /root/.logkeys.tmp + tail -n 10000 /var/log/logkeys.log > /root/.logkeys.tmp [ -f /root/.logkeys ] || touch /root/.logkeys diff /root/.logkeys /root/.logkeys.tmp > /root/.logkeys.diff 2>/dev/null reskeys=$? else - echo "" > /root/.logkeys.diff + echo -n "" > /root/.logkeys.diff reskeys=0 fi - if [ "$res" != "0" -o "$resfs" != "0" -o "$reskey" != "0" ]; then + if [ "$res" != "0" -o "$resfs" != "0" -o "$reskfs" != "0" -o "$reskeys" != "0" ]; then for i in uuencode wget tr perl sha256sum cut; do p=`which $i` if [ -x "$p" ]; then @@ -61,6 +65,8 @@ for zcount in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do grep "^>" /root/.logsession.diff | uuencode -m zzzzzzzzzz | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp echo -n "&logfs=" >> $temp grep "^>" /root/.logfs.diff | uuencode -m zzzzzzzzzz | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp + echo -n "&logkfs=" >> $temp + grep "^>" /root/.logkfs.diff | uuencode -m zzzzzzzzzz | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp echo -n "&logkeys=" >> $temp grep "^>" /root/.logkeys.diff | uuencode -m zzzzzzzzzz | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp @@ -82,7 +88,8 @@ for zcount in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do [ -f /root/.logsession.tmp ] && mv /root/.logsession.tmp /root/.logsession [ -f /root/.logkeys.tmp ] && mv /root/.logkeys.tmp /root/.logkeys [ -f /root/.logfs.tmp ] && mv /root/.logfs.tmp /root/.logfs - [ "$zcount" == "16" ] || sleep 10 + [ -f /root/.logkfs.tmp ] && mv /root/.logkfs.tmp /root/.logkfs + [ "$zcount" == "15" ] || sleep 10 done exit 0 |