开发者

JMX - Monitor process existence

开发者 https://www.devze.com 2023-04-06 06:35 出处:网络
I want to be able to monitor a process\'s existence continuously and restart it if it had crashed or killed for any reason using JMX. Stopping and starting a process is not a probelm as the agent exec

I want to be able to monitor a process's existence continuously and restart it if it had crashed or killed for any reason using JMX. Stopping and starting a process is not a probelm as the agent executes a script for it. I can monitor process's existence by implementing heartbeats between the agent and the monitored process but I am looking for something using JMX itself, if s开发者_如何学Comething exists?


You can expose the component as a JMX managed resource.
Try to do the heartbeat.
If you get instanceNotFound from the managed bean server then it has crashed.

0

精彩评论

暂无评论...
验证码 换一张
取 消