Skip to content

Commit

Permalink
mxqdctl-hostconfig: Add debug commands
Browse files Browse the repository at this point in the history
Add commands

    killall quitall reloadall reloadall (=restartall)
    dumpall setdebugall setinfoall (=setnodebugall)
  • Loading branch information
donald committed Jul 6, 2017
1 parent 3fe7c3d commit adbe312
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions mxqdctl-hostconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,49 @@ case "${BASH_ARGV[0]}" in
reload|restart)
reload_all_started
;;

stopall)
killall -u "${USER}" "${mxqd}"
env kill mxqd
;;
killall)
env kill -int mxqd
;;
quitall)
env kill -quit mxqd
;;
reloadall|restartall)
env kill -usr1 mxqd
;;
stateall)
env kill -usr2 -q 10 mxqd
;;
setinfoall|setnodebugall)
env kill -usr2 -q 20 mxqd
;;
setdebugall)
env kill -usr2 -q 21 mxqd
;;

*)
echo "usage $0 CMD"
echo ""
echo "to mxqd configured by hostconfig:"
echo ""
echo " start : start mxqd (if configured by hostconfig)"
echo " stop : tell mxqd to stop accepting new jobs, wait for running jobs, exit"
echo " kill : tell mxqd to stop accepting new jobs, kill and wait for running jobs, exit"
echo " quit : tell mxqd to exit (leave jobs running)"
echo " reload|restart : tell mxqd to re-exec itself, leave jobs running"
echo " stopall : as 'stop', but to any mxqd owned by calling user"
echo ""
echo "to all mxqd owned by calling user:"
echo ""
echo " stopall : tell mxqd to stop accepting new jobs, wait for running jobs, exit"
echo " killall : tell mxqd to stop accepting new jobs, kill and wait for running jobs, exit"
echo " quitall : tell mxqd to exit (leave jobs running)"
echo " reloadall|restartall : tell mxqd to re-exec itself, leave jobs running"
echo ""
echo " stateall : tell mxqd to dump state"
echo " setdebugall : tell to set loglevel to debug"
echo " setinfoall|setnodebugall : tell mxqd to set loglevel to info"
;;
esac

0 comments on commit adbe312

Please sign in to comment.