Thread Pool Executor Monitoring Requirement

半腔热情 提交于 2019-12-21 23:46:46

问题


In our production environments, we are using Thread Pool Executor to execute runntable task. I need to develop a Thread pool Heartbeat a monitoring system for Thread pool Executor Service:

Every 60 seconds, the requirement is to collect following statistic about the Thread Pooled Executor:

1) size of the thread pool

2) length of queue waiting for a thread (a duration or time task waited in blocking queue before thread executed )

3) Average wait time in queue during the last heartbeat interval

4) Current active thread

5) Current non active threads.

I wanted to know is there any existing framework or Thread pool Executor Service which will provide above reporting requirements.

Thanks,

BMis13


回答1:


Are you using Spring? If I'm not mistaken Spring's implementation of ThreadPoolExecutor supports JMX.



来源:https://stackoverflow.com/questions/8198584/thread-pool-executor-monitoring-requirement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!