From 27ed3447583ccd52edee80cf87c62cae3b425b6e Mon Sep 17 00:00:00 2001 From: Anonymous Admin Date: Sat, 4 Jun 2022 10:01:26 +0200 Subject: [PATCH] Minor optimization --- metrology/collectd_exec_xmpp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrology/collectd_exec_xmpp.sh b/metrology/collectd_exec_xmpp.sh index 37c8153..2e6f549 100755 --- a/metrology/collectd_exec_xmpp.sh +++ b/metrology/collectd_exec_xmpp.sh @@ -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}"