From 45923a32846dce76bd84208b0673346831426ed5 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Wed, 1 May 2013 17:05:04 +0200 Subject: [PATCH] sorted by cipher, then by count --- tls_stats.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tls_stats.sh b/tls_stats.sh index 1f40f83..c548edf 100755 --- a/tls_stats.sh +++ b/tls_stats.sh @@ -8,5 +8,4 @@ MIN_MAILS=2 echo -e "Count\tCipher used\tSending domain" echo "--------------------------------------" -zgrep 'Anonymous TLS connection established from' /var/log/mail.log* | sed -r 's/\[[0-9.]*\]://g' | awk {'print $15,$11'} | sort | uniq -c -i | while read line; do [[ $(grep -oE '^\s*[0-9]+' <<< $line) -gt $MIN_MAILS ]] && echo $line | tr -s ' ' '\t'; done -#fskfjsj +zgrep 'Anonymous TLS connection established from' /var/log/mail.log* | sed -r 's/\[[0-9.]*\]://g' | awk {'print $15,$11'} | sort | uniq -c -i | while read line; do [[ $(grep -oE '^\s*[0-9]+' <<< $line) -gt $MIN_MAILS ]] && echo $line | tr -s ' ' '\t'; done | sort -k 2,2 -k 1,1rn