kdaalley.blogg.se

Linux process monitor restart
Linux process monitor restart










linux process monitor restart

I have tried "daemon -user appuser nohup $MYAPP &" and I am immediately returned to the prompt without any indication and when I do a ps, I still see that the init is hung. When I run /sbin/service myapp start the script starts but hangs the console. I took the /etc/init.d/crond script and replaced the crond binary with my script but it hangs on startup. I can run this with "nohup restart_script.sh &" and it will run all day long without issue. Until java -Xms256m -Xmx768m -jar MyApp.jar doĮcho "MyApp crashed with exit code $?. Using the answer here I have a script that will restart when the java application dies. This process monitoring script can be used to monitor just one process, or multiple processes. If the server reboots, restart it - simple enough. ProcMonUX is a simple shell script that will monitor Linux process availability, send you an email when a process is not running, and automatically restart the process for you.












Linux process monitor restart