From: Brian Flowers Date: Fri, 4 Nov 2016 01:28:46 +0000 (-0400) Subject: Improving processor status display X-Git-Url: http://git.slightlycyberpunk.com%2C%20git.slightlycyberpunk.com/git/?a=commitdiff_plain;h=01bc6f0e226ed149dcb9f7022da5aa486bbd50ef;p=bdsm.git Improving processor status display --- diff --git a/TODO b/TODO index 6b903a2..a98e2a8 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,11 @@ TODO BUGFIXES: - - Fix sqlite3 logging -- needs to be globally writable - May require folder structure refactoring - Confirm configure correctly adds/removes services - - Fix deploy for refactored locations PLUGINS: - - sqlite3/file processors to reject and log malformed records\ + - sqlite3/file processors to reject and log malformed records - logging of processor start/stop - I/O - iostat - RAM - free/vmstat @@ -20,20 +17,6 @@ PLUGINS: - Processes active - ps -ef REFACTORING: - - Folder structure -- add to PATH? - (WIP -- updated in main script, processors) - bin/bdsm - etc/bdsm/monitors/ - etc/bdsm/processors/ - etc/bdsm/bdsm.db - etc/bdsm/bdsm.conf - pids/ - bdsm.log - bdsm.err - out.fifo - in.fifo - - - Move all pids to pid folder - Add a generic function for killing a process and deleting the pid file Then add checking for 'orphaned' pids - Replace some of the /dev/null redirects with error logging diff --git a/bin/bdsm.sh b/bin/bdsm.sh index 3eeec98..cadef1d 100755 --- a/bin/bdsm.sh +++ b/bin/bdsm.sh @@ -302,7 +302,13 @@ status() processor="`basename /home/bdsm/pids/*.processor`" status="`$config_path/processors/$processor status`" - echo "PROCESSOR|$status" + if [ "$status" != "" ]; then + echo "$processor:$status" + elif [ "$processor" != "" ]; then + echo "PROCESSOR|FAILED" + else + echo "PROCESSOR|DOWN" + fi } configure()