Dump core when killing buildmanager from monit

This commit is contained in:
Brad Ison 2016-11-16 16:41:14 -08:00
parent c4a1c3cfa7
commit ebf80bdd13
3 changed files with 10 additions and 1 deletions

6
conf/kill-buildmanager.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
PID=$(cat /etc/service/buildmanager/supervise/pid)
gcore -o /tmp/buildman.core $PID
/usr/bin/sv kill /etc/service/buildmanager

View file

@ -7,7 +7,7 @@ set httpd port 2812 and
check host buildmanager with address localhost
start program = "/usr/bin/sv start /etc/service/buildmanager" with timeout 10 seconds
stop program = "/usr/bin/sv kill /etc/service/buildmanager"
stop program = "/usr/local/bin/kill-buildmanager.sh"
if failed port 8787 protocol http
request "/"
status = 405