start()
{
running=`ssh -q $HOSTNAME "cat /home/bdsm/.df.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"` 2>/dev/null
status()
{
running=`ssh $HOSTNAME "cat /home/bdsm/.df.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"`
status()
{
running=`cat /home/bdsm/.processor.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l`
start()
{
running=`ssh -q $HOSTNAME "cat /home/bdsm/.sensors.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"` 2>/dev/null
status()
{
running=`ssh $HOSTNAME "cat /home/bdsm/.sensors.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"`
stop()
{
kill `cat /home/bdsm/.processor.pid`
- rm /home/bdsm/.file-logger.pid
+ rm /home/bdsm/.processor.pid
}
status()
start()
{
running=`ssh -q $HOSTNAME "cat /home/bdsm/.vmstat.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"` 2>/dev/null
status()
{
running=`ssh $HOSTNAME "cat /home/bdsm/.vmstat.pid 2>/dev/null | \
- xargs ps -T | \
+ xargs ps -p 2>/dev/null | \
grep -v PID | \
wc -l"`
- if [ -z "$running" ]; then
- running=0
- fi
if [ $running -eq 0 ]; then
echo "OFF"
else
#
# TODO:
# 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
+# 2) Fix stop -- doesn't stop df, doesn't stop remote sessions, doesn't stop processor
+#
# ) Plugins:
# o) disk utilization - iostat
# b) ram utilization - free or vmstat