![]() ![]() ![]() |
16.1 Overview
16.2 Compatible J2ME CDC Specifications
16.3 Developing the SNMP Agent
16.4 Porting the Agent in J2ME CDC environment
16.5 Testing the Agent
16.6 SNMP Agent Memory and CPU Requirement
The existing platforms and specifications are targeted at devices equipped with more memory, powerful networking capabilities, more capable user interfaces etc. When devices require less memory footprint, specific-purpose, limited-function applications, J2ME CDC can be preferred to address the needs. J2ME CDC is introduced to address consumer and embedded devices with the same network capabilities, user interfaces etc but with small memory space.
WebNMS Agent Toolkit SNMP agent is newly designed to be ported in the J2ME CDC environment that targets the device with less-memory and limited-resource requirement. The toolkit renders end-to-end development of the SNMP agent that can be easily deployed to manage the connected device. By this feature, WebNMS facilitates the customer to port the SNMP agent into such small memory devices for providing SNMP manageability. The document will further detail the steps involved in developing the SNMP agent and deploying it in the J2ME CDC environment.
16.2 Compatible J2ME CDC Specification
The SNMP agent is compatible with two implementation of J2ME CDC specification i.e the agent is developed, instrumented, ported, and tested under these implementations. They are
SUN J2ME CDC Implementation
IBM J2ME CDC Implementation
16.3 Developing the SNMP Agent
WebNMS provides combined features of developing an SNMP(v1/v2c) agent and with less memory footprint. When you have Management Information Base (MIB) of your device and need to manage the managed information through SNMP, you can develop an SNMP agent where you just require to instrument the generated stub files. Developing the agent is very simple using the GUI tools which is briefed below:
Steps to build an SNMP Agent using the toolkit:
Open the MIB Compiler and choose the project type as J2ME.
Load the MIB
Select Project->Settings
that opens the Settings dialog. Configure the agent settings. This includes
SNMPv1/v2c Compliance: Implements managed objects as per SNMP
(IETF) standards that expose the behavior of the SNMP entity.
AclTable: Provides authentication to users to access the agent
based on community. The table stores the details of management applications
for particular community.
v1/v2cTrapForwardingTable: The table stores information of the
traps, which gets generated due to some undesirable events in the agent,
and its target.
|
Note:
|
Generate the agent, which generates the stub files.
Instrument the agent stub files and compile them. While compiling the agent, use JDK 1.3.1 as per the J2ME CDC specifications.
16.4 Porting the Agent in J2ME CDC Environment
Once the SNMP agent is developed, it is ready to be deployed in the device. The agent can be generated and compiled in any operating system and then the compiled class files are ported in the J2ME CDC environment. As mentioned under "Compatible J2ME CDC Specifications", let us go through the steps involved in porting the SNMP agent in each implementation.
16.4.1 Sun Implementation of J2ME CDC Environment
Before porting the SNMP agent, the user must have the Sun implementation libraries in the device.
The following are the steps required to port the SNMP agent:
Set the Java Home to the cdc home directory, i.e. the location where the J2ME CDC library files are available.
Once the Sun specification libraries are placed in the classpath, add WebNMS's generated stub files to the classpath with AdventNetLogging.jar and AdventNetJ2meSnmpAgent.jar.
Then to run the application, C Virtual Machine
which comes with Sun package is used, i.e. to invoke the application,
the command used is
cvm -Xbootclasspath/a:<generated stub>:AdventNetJ2meSnmpAgent.jar
:AdventNetLogging.jar |
16.4.2 IBM Implementation of J2ME CDC Environment
Before porting the SNMP agent, the user must have the IBM WSDD implementation libraries in the device.
The following are the steps required to port the SNMP agent:
Set the Java Home to the cdc home directory, i.e. the location where the J2ME CDC library files are available.
Place the IBM libraries in the classpath along with WebNMS's implementation files, i.e. the generated stubs, AdventNetLogging.jar, and AdventNetJ2meSnmpAgent.jar.
To invoke the application, use the following command:
j9 -Xbootclasspth:<IBM libraries>:<generated
stub>:AdventNetJ2meSnmpAgent.jar:AdventNetLogging.jar -jcl:foun10 |
After developing and porting the agent in the J2ME CDC environment, start the SNMP agent in the J2ME CDC environment using the commands with respect to each implementation mentioned in the "Porting the SNMP Agent" section. The SNMP agent can be tested using MIB Browser to access the management information of the device. The agent can also be accessed through any standard SNMP manager. The following steps explain how to access the management information through MIB Browser:
Open the MIB Browser that is at <WebNMS/Javaagent>/bin directory.
Load the same MIB that is loaded in the agent.
Select a managed object and send GET/ GET-NEXT/ SET/ GET-BULK request.
The agent responds to the MIB Browser with the managed object name and its value. To know more about accessing the information through MIB Browser, refer "Testing the Agent" section of J2SE SNMP agent.
16.6 SNMP Agent Memory and CPU Requirement
Test Environment Details:
The performance test was conducted on a Linux machine. In Windows machine, the test has been performed using Foundation Profile packages and not with CDC environment packages.
OS: Linux
RAM: 505340 KB
Processor Speed: 2392.082
JDK version: 1.3
Agent Details:
A SNMP J2ME agent was developed, instrumented, and ported in IBM J2ME CDC environment. Then, the agent was started and the agent memory usage and CPU usage details were noted down as shown below:
By SNMP Agent |
By JVM | |
---|---|---|
Flash Memory Used |
350 KB |
- |
RAM Used |
3 MB |
3.8 MB |
![]() ![]() ![]() |