Java Dynamic Management Kit 5.1 Tutorial

16.4.1 Running the Standalone Agent Example

To Run the Standalone Agent Example
  1. Start the standalone agent with the following command:


    $ java -classpath classpath StandAloneSnmpAgent nbTraps
    
  2. If you have not copied the jdmk.acl file to the configuration directory, add the following property to your command line:


    -Djdmk.acl.file=examplesDir/current/Snmp/Agent/jdmk.acl
    

    You should see the same initialization messages as with the simple agent. Then, you should see the agent sending out a trap every two seconds. If you have an SNMP manager application, you can send requests to the agent and receive the traps. See “Developing an SNMP Manager” for example applications you can use.

    The only limitation of a standalone agent is that you cannot access or manage the SNMP adaptor and MIB MBeans in the dynamic management sense. However, the SNMP adaptor still relies on the InetAddressAcl file for access control and traps, unless you have customized the InetAddressAcl mechanism, and you can implement other security schemes as described in 19.2.1 Enabling User-Based Access Control.

  3. Press Control-C when you have finished running the standalone agent.