Re: [SNMP4J] How to completely exit from agent?
Hi Frank, Now we want to use the subagent org.snmp4j.agent.agentx.subagent.AgentXSubagent.java, and the same problem happens again and this time calling WorkerPool.stop() can't solve it. For example, I tried subagent.close(session, AgentXProtocol.REASON_SHUTDOWN); subagent.getWorkerPool().stop(); or workerPool = ThreadPool.create(AgentXSubAgent, 3); subagent.setThreadPool(workerPool); ... subagent.close(session, AgentXProtocol.REASON_SHUTDOWN); workerPool.stop(); Could you advise please? Thanks, Jesse -Original Message- From: snmp4j-boun...@agentpp.org [mailto:snmp4j-boun...@agentpp.org] On Behalf Of Frank Fock Sent: 17 January 2012 00:37 To: snmp4j@agentpp.org Subject: Re: [SNMP4J] How to completely exit from agent? Hi Jesse, After calling AgentConfigManager.shutdown() you should also call WorkerPool.stop() on the WorkerPool you provided in the constructor of the AgentConfigManager. This, of course, only applies to thread pools that are under your control and stoppable. Best regards, Frank Am 16.01.2012 15:27, schrieb Jesse Woo: Hi Guys, I have created a SNMP Agent based on org.snmp4j.agent.example. SampleAgent.java. This agent is running as part of my system, and I want to completely exit the agent before I can shut the whole system down. I tried shutdown() method from AgentConfigManager.java, and it did close the session but seems it left the thread in memory. How can I exit the agent completely? Much appreciated for your help. Regards, Jesse ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
Re: [SNMP4J] How to completely exit from agent?
Hi Jesse, Probably you have also to call AgentXSubAgent.setPingDelay(0); to cancel the ping timer that runs in the background by default every 30 seconds. Best regards, Frank Am 22.02.2012 12:01, schrieb Jesse Woo: Hi Frank, Now we want to use the subagent org.snmp4j.agent.agentx.subagent.AgentXSubagent.java, and the same problem happens again and this time calling WorkerPool.stop() can't solve it. For example, I tried subagent.close(session, AgentXProtocol.REASON_SHUTDOWN); subagent.getWorkerPool().stop(); or workerPool = ThreadPool.create(AgentXSubAgent, 3); subagent.setThreadPool(workerPool); ... subagent.close(session, AgentXProtocol.REASON_SHUTDOWN); workerPool.stop(); Could you advise please? Thanks, Jesse -Original Message- From: snmp4j-boun...@agentpp.org [mailto:snmp4j-boun...@agentpp.org] On Behalf Of Frank Fock Sent: 17 January 2012 00:37 To: snmp4j@agentpp.org Subject: Re: [SNMP4J] How to completely exit from agent? Hi Jesse, After calling AgentConfigManager.shutdown() you should also call WorkerPool.stop() on the WorkerPool you provided in the constructor of the AgentConfigManager. This, of course, only applies to thread pools that are under your control and stoppable. Best regards, Frank Am 16.01.2012 15:27, schrieb Jesse Woo: Hi Guys, I have created a SNMP Agent based on org.snmp4j.agent.example. SampleAgent.java. This agent is running as part of my system, and I want to completely exit the agent before I can shut the whole system down. I tried shutdown() method from AgentConfigManager.java, and it did close the session but seems it left the thread in memory. How can I exit the agent completely? Much appreciated for your help. Regards, Jesse ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
Re: [SNMP4J] How to completely exit from agent?
Hi Frank, The WorkerPool.stop() works and now I can properly shutdown my system. Thanks a lot for your help. Regards, Jesse -Original Message- From: snmp4j-boun...@agentpp.org [mailto:snmp4j-boun...@agentpp.org] On Behalf Of Frank Fock Sent: 17 January 2012 00:37 To: snmp4j@agentpp.org Subject: Re: [SNMP4J] How to completely exit from agent? Hi Jesse, After calling AgentConfigManager.shutdown() you should also call WorkerPool.stop() on the WorkerPool you provided in the constructor of the AgentConfigManager. This, of course, only applies to thread pools that are under your control and stoppable. Best regards, Frank Am 16.01.2012 15:27, schrieb Jesse Woo: Hi Guys, I have created a SNMP Agent based on org.snmp4j.agent.example. SampleAgent.java. This agent is running as part of my system, and I want to completely exit the agent before I can shut the whole system down. I tried shutdown() method from AgentConfigManager.java, and it did close the session but seems it left the thread in memory. How can I exit the agent completely? Much appreciated for your help. Regards, Jesse ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
[SNMP4J] How to completely exit from agent?
Hi Guys, I have created a SNMP Agent based on org.snmp4j.agent.example. SampleAgent.java. This agent is running as part of my system, and I want to completely exit the agent before I can shut the whole system down. I tried shutdown() method from AgentConfigManager.java, and it did close the session but seems it left the thread in memory. How can I exit the agent completely? Much appreciated for your help. Regards, Jesse ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
Re: [SNMP4J] How to completely exit from agent?
Hi Jesse, After calling AgentConfigManager.shutdown() you should also call WorkerPool.stop() on the WorkerPool you provided in the constructor of the AgentConfigManager. This, of course, only applies to thread pools that are under your control and stoppable. Best regards, Frank Am 16.01.2012 15:27, schrieb Jesse Woo: Hi Guys, I have created a SNMP Agent based on org.snmp4j.agent.example. SampleAgent.java. This agent is running as part of my system, and I want to completely exit the agent before I can shut the whole system down. I tried shutdown() method from AgentConfigManager.java, and it did close the session but seems it left the thread in memory. How can I exit the agent completely? Much appreciated for your help. Regards, Jesse ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j