Minor optimization
This commit is contained in:
parent
ebda9e97df
commit
27ed344758
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user