24
2
Fork 0

Minor optimization

This commit is contained in:
Anonymous Admin 2022-06-04 10:01:26 +02:00 committed by root
parent ebda9e97df
commit 27ed344758
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ ejabberdctl_stats() {
http_upload_disk_usage() {
subfolders_count=$(find ${HTTP_UPLOAD_DATADIR} -mindepth 1 -maxdepth 1 -type d | wc -l)
total_size=$(du -s ${HTTP_UPLOAD_DATADIR} | awk '{print $1}')
total_size=$(du --exclude=lost+found -s ${HTTP_UPLOAD_DATADIR} | awk '{print $1}')
avg=$(( ${total_size} / ${subfolders_count} ))
echo "PUTVAL \"${HOSTNAME}/xmpp_upload_data_total/count\" interval=$INTERVAL $(date +%s):${total_size}"
echo "PUTVAL \"${HOSTNAME}/xmpp_upload_data_avg/count\" interval=$INTERVAL $(date +%s):${avg}"