Reputation: 1017
I know this question has been asked many times over, but I am currently using snmp4j library and I am finding it very slow. It takes about six seconds for six queries even on my local system, and also I cannot get direct values such as particular disk usage, I have to manipulate several values since the MIB-II mib that I use doesn't have that many features built in. Is there any API that's fast and also permits direct retrieval of metrics such as disk usage, CPU usage, memory free, memory usage etc., There are many APIs available on the net but I don't have time to try out all, I would like answers from someone who have actually worked hands on with such APIs.
Upvotes: 2
Views: 3560
Reputation: 377
The performance problems you encounter are not related to SNMP4J. I would suspect some programming issues with your test case. SNMP4J perfectly is able to "directly" (using GET PDU) fetch metric values for any standard or custom MIB.
I am not aware of any "more advanced" API. SNMP4J fully implements all SNMP standards. So what are you missing?
Upvotes: 0
Reputation: 63173
You should analyze the performance down to a much lower level and then tell if it performs slow. Of course, you should clarify which part of snmp4j you are using (the manager or the agent).
Your requirements on what kind of data to be returned from SNMP queries are not suitable for a general SNMP libraries/agents such as snmp4j. To be general, they are designed according to IETF RFCs, where no OS specific API was documented.
If you do search for an OS specific agent, or you want this agent to have as many features as possible implemented, you may go to commercial ones. In that case, their presale guys can take your phone calls or mails and give you the answers you want.
Upvotes: 1