rapport add nb of warning

This commit is contained in:
obitanz 2023-07-09 17:37:52 +02:00 committed by root
parent 81dec6b8aa
commit 17dc040959
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ generateReport()
accountTotalCount=$(su -c "psql -U postgres -d minetest-auth --tuples-only -c \"SELECT COUNT(*) FROM auth\"" postgres | xargs)
echo "Nombre de comptes total = $accountTotalCount"
warningCount=$(zgrep "WARNING" /var/log/minetest/30009-mineclone2.log-${month}* | wc -l)
echo "Nombre de warning = $warningCoung"
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"