start()
{
- running=`ssh $HOSTNAME "cat /home/bdsm/.df.pid | \
+ running=`ssh -q $HOSTNAME "cat /home/bdsm/.df.pid | \
xargs ps -T | \
grep -v PID | \
wc -l"` 2>/dev/null
fi
ssh -q $HOSTNAME <<EOF
- while [ 1 ]; do
+ nohup stdbuf -oL while [ 1 ]; do
df=`df --output=pcent "$DRIVE" | tail -1 | sed 's/[^0-9]//g'`
ts=`date '+%s'`
echo "$ts|$HOSTNAME|DISK-$LABEL-USED|$df" >> $OUTPATH
start()
{
- running=`ssh $HOSTNAME "cat /home/bdsm/.sensors.pid | \
+ running=`ssh -q $HOSTNAME "cat /home/bdsm/.sensors.pid | \
xargs ps -T | \
grep -v PID | \
wc -l"` 2>/dev/null
fi
ssh -q $HOSTNAME <<EOF
- while [ 1 ]; do
+ nohup stdbuf -oL while [ 1 ]; do
ts=`date '+%s'`
sensors | \
sed 's/ */ /g' | \
# Bash Daemon for System Monitoring
#
# TODO:
-# 1) Continuing checks (confirm start/stop/config of all plugins)
+# 1) Continuing checks (confirm start/stop/status/config of all plugins)
# 2) Add 'logger' type and logger plugins
# Logger won't hold an SSH connection open
# A single host can be defined multiple times as different types
while [ $i -lt ${#hosts[@]} ]; do
type=`echo ${hosts[$i]} | cut -d':' -f1`
host=`echo ${hosts[$i]} | cut -d':' -f2-`
- info "Stopping $type monitors on $host..."
+ info "Checking status of $type monitors on $host..."
functions=`cat /home/bdsm/.bdsm.conf.tmp | grep "$type:$host" | sed 's/.*{\(.*\)}.*/\1/'`
j=0