Better max for relayed data

This commit is contained in:
Adrien Bourmault 2021-02-01 12:25:32 +01:00 committed by root
parent d4d966ab19
commit 3e3c2753aa

View File

@ -138,7 +138,7 @@ get_total_TLS_turn_relayed_data() {
}
get_max_UDP_turn_relayed_data() {
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "UDP" | cut -d" " -f6-6 | sort | tail -n 1)
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "UDP" | cut -d" " -f6-6 | sort -g | tail -n 1)
if [ -z $n ]; then
echo 0
else
@ -147,7 +147,7 @@ get_max_UDP_turn_relayed_data() {
}
get_max_TCP_turn_relayed_data() {
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "TCP" | cut -d" " -f6-6 | sort | tail -n 1)
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "TCP" | cut -d" " -f6-6 | sort -g | tail -n 1)
if [ -z $n ]; then
echo 0
else
@ -156,7 +156,7 @@ get_max_TCP_turn_relayed_data() {
}
get_max_TLS_turn_relayed_data() {
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "TLS" | cut -d" " -f6-6 | sort | tail -n 1)
n=$(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Relayed" | grep "TLS" | cut -d" " -f6-6 | sort -g | tail -n 1)
if [ -z $n ]; then
echo 0
else