fix typo and add error count

This commit is contained in:
obitanz 2023-07-16 08:56:31 +02:00 committed by root
parent 620da8b445
commit e3bb3df0ae
1 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,10 @@ generateReport()
echo "Nombre de comptes total = $accountTotalCount"
warningCount=$(zgrep "WARNING" /var/log/minetest/30009-mineclone2.log-${month}* | wc -l)
echo "Nombre de warning = $warningCoung"
echo "Nombre de warning = $warningCount"
errorCount=$(zgrep "ERROR" /var/log/minetest/30009-mineclone2.log-${month}* | wc -l)
echo "Nombre d'erreurs = $errorCount"
mcl2_databasesSize=$(su -c "psql -U postgres --tuples-only -c \"SELECT ROUND((CAST(SUM(pg_database_size(datname)) AS decimal) / 1024 / 1024)::numeric, 2) FROM pg_database WHERE datname LIKE 'minetest%mineclone2'\"" postgres | xargs)
echo "Taile des bases de données mineclone2 = $mcl2_databasesSize MB"