Skip to content

Commit

Permalink
quiet mode for rrd updater
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Oct 5, 2013
1 parent 602adf4 commit 82a7469
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions bin/v-update-sys-rrd
Original file line number Diff line number Diff line change
Expand Up @@ -96,37 +96,38 @@ fi
# Updateing system stats
for period in $periods; do

$BIN/v-update-sys-rrd-la $period
$BIN/v-update-sys-rrd-net $period
$BIN/v-update-sys-rrd-mem $period
$BIN/v-update-sys-rrd-ssh $period
$BIN/v-update-sys-rrd-la $period >/dev/null 2>&1
$BIN/v-update-sys-rrd-net $period >/dev/null 2>&1
$BIN/v-update-sys-rrd-mem $period >/dev/null 2>&1
$BIN/v-update-sys-rrd-ssh $period >/dev/null 2>&1

# Updating web stats
if [ ! -z "$WEB_SYSTEM" ]; then
$BIN/v-update-sys-rrd-$WEB_SYSTEM $period
$BIN/v-update-sys-rrd-$WEB_SYSTEM $period >/dev/null 2>&1
fi

if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-update-sys-rrd-$PROXY_SYSTEM $period
$BIN/v-update-sys-rrd-$PROXY_SYSTEM $period >/dev/null 2>&1
fi

# Updating ftp stats
if [ ! -z "$FTP_SYSTEM" ] && [ "$FTP_SYSTEM" != 'no' ]; then
$BIN/v-update-sys-rrd-ftp $period
$BIN/v-update-sys-rrd-ftp $period >/dev/null 2>&1
fi

# Updating db stats
if [ ! -z "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'no' ]; then
for type in ${DB_SYSTEM//,/ }; do
# Switching on db type
case $type in
mysql) $BIN/v-update-sys-rrd-mysql $period ;;
pgsql) $BIN/v-update-sys-rrd-pgsql $period ;;
mysql) $BIN/v-update-sys-rrd-mysql $period >/dev/null 2>&1 ;;
pgsql) $BIN/v-update-sys-rrd-pgsql $period >/dev/null 2>&1 ;;
esac
done
fi
done


#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
Expand Down

0 comments on commit 82a7469

Please sign in to comment.