Starting the SNMP Agent from Command Line

 



 

Overview

 

The command line SNMP Agent Simulator is purely NON-GUI and uses only character user interface for obtaining various inputs for the simulator. It can be invoked by executing the StartSnmpAgent.sh/.bat in

<Simulator_Home>/bin/cmdline directory. Starting the agent from command line is more faster as the non-GUI agent saves on memory.

 

Starting the SNMP Agent

 

To start the command line simulator, execute the StartSnmpAgent.sh /.bat file with the following options.

 

Configuration File Options : One of the below given options is mandatory

 

Options

Explanation

-m <MibFile>

The name of the MIB file to be loaded with absolute path. Multiple mib files separated by comma (,) can be given. If this option is specified, the agent will respond with simulated values in the MIB file.

-c <ConfigFile> 

The name of the configuration file to be loaded with absolute path.

 

PostgreSQL Options :

 

Options Explanation

- tn<tablename>

Name of the table to be created in the database if the simulator is started with specifying the -m <MibFile> option. This option is not applicable if the simulator is started with specifying the -c <ConfigFile> option.

 

 

Note:

The details of the Database server name , Port number , User name , Password and the Server path is stored in database_params.conf file in <Simulator_Home>/conf  directory.  You can make the required database settings in this file.

 

 

Initialize Services Option :  Optional

 

Options

Explanation

-T <trapstatus> [enabled/disabled]

To enable/disable the execution of traps configured in the simulator. By default, the trap service will be enabled. If the service is disabled, the agent will not check for trap configurations.

-I <Informstatus> [enabled/disabled]

To enable/disable the execution of informs configured in the simulator, By default, the inform service will be enabled. If the service is disabled, the agent will not check for inform configurations.

-B <Behaviorstatus> [enabled/disabled]

To enable/disable the execution of behavior scripts configured in the simulator. By default, the behavior service will be enabled. If the service is disabled, the agent will not check for script configurations.

 

Global Manager Settings to send traps : Optional

 

Options

Explanation

-tms <Trap Manager Settings>

To specify the global manager details, if you want all the traps to be sent to the same set of Managers, specified in this option. It should be in the following format - mgr1:port1:community1,mgr2:port2,community

 

Miscellaneous Options : Optional

 

Options

Explanation

-ip <ipaddress>

The Agent Address.

-p <Port Number>

The port at which the agent should start. By default, the agent will start at 8001.

-d[0 -6] <Debug Level>

The option to generate debug messages.

-v [v1,v2c,v3] <Version>

The agent version. The version is by default v2c.

-r <Read Community>

The community to be used while processing GET requests. Multiple values separated by comma (,) can also be given. By default, the read community is public.

-w <Write Community>

The community to be used while processing SET requests. Multiple values separated by comma (,) can also be given. By default, the write community is public.

-i <logInformResponse>

To log the response to Inform Requests. The response will be logged in a file named "informresponse" under the <installation/simulator/logs> directory.

 

Options to manage the Simulated SNMP Agent remotely using RMI : Optional

 

Options

Explanation

-rmi       

To manage SNMP Agent Simulator remotely.                                                                    

 

Examples

  1. To start the simulator with loading MIBs :
    StartSnmpAgent.sh -m mibs\RFC1213.MIB -p 8005  -tn <tableName>

  2. To start the simulator by loading configuration :
    StartSnmpAgent.sh -c  snmpagents\snmpconfig_main.xml -p 8005

Copyright © 2012, ZOHO Corp. All Rights Reserved.
Network Monitoring Software from ManageEngine