Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1302

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- Running the application</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/snmp-4.22.1.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Simple Network Management Protocol (SNMP)</strong><br><strong>User's Guide</strong><br><small>Version 4.22.1</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p>
<ul class="flipMenu" imagepath="../../../../doc/js/flipmenu">
<li id="no" title="SNMP Introduction" expanded="false">SNMP Introduction<ul>
<li><a href="snmp_intro.html">
              Top of chapter
            </a></li>
<li title="Scope and Purpose"><a href="snmp_intro.html#id73205">Scope and Purpose</a></li>
<li title="Prerequisites"><a href="snmp_intro.html#id63280">Prerequisites</a></li>
<li title="Definitions"><a href="snmp_intro.html#id61217">Definitions</a></li>
<li title="About This Manual"><a href="snmp_intro.html#id66265">About This Manual</a></li>
<li title="Where to Find More Information"><a href="snmp_intro.html#id65242">Where to Find More Information</a></li>
</ul>
</li>
<li id="no" title="Agent Functional Description" expanded="false">Agent Functional Description<ul>
<li><a href="snmp_agent_funct_descr.html">
              Top of chapter
            </a></li>
<li title="Features"><a href="snmp_agent_funct_descr.html#id70043">Features</a></li>
<li title="SNMPv1, SNMPv2 and SNMPv3"><a href="snmp_agent_funct_descr.html#id69677">SNMPv1, SNMPv2 and SNMPv3</a></li>
<li title="Operation"><a href="snmp_agent_funct_descr.html#id71220">Operation</a></li>
<li title="Sub-agents and MIB Loading"><a href="snmp_agent_funct_descr.html#id75292">Sub-agents and MIB Loading</a></li>
<li title="Contexts and Communities"><a href="snmp_agent_funct_descr.html#id74241">Contexts and Communities</a></li>
<li title="Management of the Agent"><a href="snmp_agent_funct_descr.html#id74376">Management of the Agent</a></li>
<li title="Notifications"><a href="snmp_agent_funct_descr.html#id73838">Notifications</a></li>
<li title="Discovery"><a href="snmp_agent_funct_descr.html#id75718">Discovery</a></li>
</ul>
</li>
<li id="no" title="Manager Functional Description" expanded="false">Manager Functional Description<ul>
<li><a href="snmp_manager_funct_descr.html">
              Top of chapter
            </a></li>
<li title="Features"><a href="snmp_manager_funct_descr.html#id75862">Features</a></li>
<li title="Operation"><a href="snmp_manager_funct_descr.html#id76012">Operation</a></li>
<li title="MIB loading"><a href="snmp_manager_funct_descr.html#id76080">MIB loading</a></li>
</ul>
</li>
<li id="no" title="The MIB Compiler" expanded="false">The MIB Compiler<ul>
<li><a href="snmp_mib_compiler.html">
              Top of chapter
            </a></li>
<li title="Operation"><a href="snmp_mib_compiler.html#id76200">Operation</a></li>
<li title="Importing MIBs"><a href="snmp_mib_compiler.html#id76263">Importing MIBs</a></li>
<li title="MIB Consistency Checking"><a href="snmp_mib_compiler.html#id76334">MIB Consistency Checking</a></li>
<li title=".hrl File Generation"><a href="snmp_mib_compiler.html#id76371">.hrl File Generation</a></li>
<li title="Emacs Integration"><a href="snmp_mib_compiler.html#id76421">Emacs Integration</a></li>
<li title="Compiling from a Shell or a Makefile"><a href="snmp_mib_compiler.html#id76467">Compiling from a Shell or a Makefile</a></li>
<li title="Deviations from the Standard"><a href="snmp_mib_compiler.html#id76521">Deviations from the Standard</a></li>
</ul>
</li>
<li id="loadscrollpos" title="Running the application" expanded="true">Running the application<ul>
<li><a href="snmp_config.html">
              Top of chapter
            </a></li>
<li title="Configuring the application"><a href="snmp_config.html#id76778">Configuring the application</a></li>
<li title="Modifying the Configuration Files"><a href="snmp_config.html#id79236">Modifying the Configuration Files</a></li>
<li title="Starting the application"><a href="snmp_config.html#id79327">Starting the application</a></li>
<li title="Debugging the application"><a href="snmp_config.html#id79377">Debugging the application</a></li>
</ul>
</li>
<li id="no" title="Definition of Agent Configuration Files" expanded="false">Definition of Agent Configuration Files<ul>
<li><a href="snmp_agent_config_files.html">
              Top of chapter
            </a></li>
<li title="Agent Information"><a href="snmp_agent_config_files.html#id79867">Agent Information</a></li>
<li title="Contexts"><a href="snmp_agent_config_files.html#id79944">Contexts</a></li>
<li title="System Information"><a href="snmp_agent_config_files.html#id79997">System Information</a></li>
<li title="Communities"><a href="snmp_agent_config_files.html#id80066">Communities</a></li>
<li title="MIB Views for VACM"><a href="snmp_agent_config_files.html#id80148">MIB Views for VACM</a></li>
<li title="Security data for USM"><a href="snmp_agent_config_files.html#id80387">Security data for USM</a></li>
<li title="Notify Definitions"><a href="snmp_agent_config_files.html#id80603">Notify Definitions</a></li>
<li title="Target Address Definitions"><a href="snmp_agent_config_files.html#id80684">Target Address Definitions</a></li>
<li title="Target Parameters Definitions"><a href="snmp_agent_config_files.html#id80890">Target Parameters Definitions</a></li>
</ul>
</li>
<li id="no" title="Definition of Manager Configuration Files" expanded="false">Definition of Manager Configuration Files<ul>
<li><a href="snmp_manager_config_files.html">
              Top of chapter
            </a></li>
<li title="Manager Information"><a href="snmp_manager_config_files.html#id81118">Manager Information</a></li>
<li title="Users"><a href="snmp_manager_config_files.html#id81260">Users</a></li>
<li title="Agents"><a href="snmp_manager_config_files.html#id81361">Agents</a></li>
<li title="Security data for USM"><a href="snmp_manager_config_files.html#id81544">Security data for USM</a></li>
</ul>
</li>
<li id="no" title="Agent Implementation Example" expanded="false">Agent Implementation Example<ul>
<li><a href="snmp_impl_example_agent.html">
              Top of chapter
            </a></li>
<li title="MIB"><a href="snmp_impl_example_agent.html#id81793">MIB</a></li>
<li title="Default Implementation"><a href="snmp_impl_example_agent.html#id81833">Default Implementation</a></li>
<li title="Manual Implementation"><a href="snmp_impl_example_agent.html#id81912">Manual Implementation</a></li>
</ul>
</li>
<li id="no" title="Manager Implementation Example" expanded="false">Manager Implementation Example<ul>
<li><a href="snmp_impl_example_manager.html">
              Top of chapter
            </a></li>
<li title="The example manager"><a href="snmp_impl_example_manager.html#id82242">The example manager</a></li>
<li title="A simple standard test"><a href="snmp_impl_example_manager.html#id82333">A simple standard test</a></li>
</ul>
</li>
<li id="no" title="Instrumentation Functions" expanded="false">Instrumentation Functions<ul>
<li><a href="snmp_instr_functions.html">
              Top of chapter
            </a></li>
<li title="Instrumentation Functions"><a href="snmp_instr_functions.html#id82473">Instrumentation Functions</a></li>
<li title="Using the ExtraArgument"><a href="snmp_instr_functions.html#id83088">Using the ExtraArgument</a></li>
<li title="Default Instrumentation"><a href="snmp_instr_functions.html#id83196">Default Instrumentation</a></li>
<li title="Atomic Set"><a href="snmp_instr_functions.html#id83301">Atomic Set</a></li>
</ul>
</li>
<li id="no" title="Definition of Instrumentation Functions" expanded="false">Definition of Instrumentation Functions<ul>
<li><a href="snmp_def_instr_functions.html">
              Top of chapter
            </a></li>
<li title="Variable Instrumentation"><a href="snmp_def_instr_functions.html#id83474">Variable Instrumentation</a></li>
<li title="Table Instrumentation"><a href="snmp_def_instr_functions.html#id83849">Table Instrumentation</a></li>
</ul>
</li>
<li id="no" title="Definition of Agent Net if" expanded="false">Definition of Agent Net if<ul>
<li><a href="snmp_agent_netif.html">
              Top of chapter
            </a></li>
<li title="Mandatory Functions"><a href="snmp_agent_netif.html#id84750">Mandatory Functions</a></li>
<li title="Messages"><a href="snmp_agent_netif.html#id84772">Messages</a></li>
</ul>
</li>
<li id="no" title="Definition of Manager Net if" expanded="false">Definition of Manager Net if<ul>
<li><a href="snmp_manager_netif.html">
              Top of chapter
            </a></li>
<li title="Mandatory Functions"><a href="snmp_manager_netif.html#id85574">Mandatory Functions</a></li>
<li title="Messages"><a href="snmp_manager_netif.html#id85591">Messages</a></li>
</ul>
</li>
<li id="no" title="Audit Trail Log" expanded="false">Audit Trail Log<ul>
<li><a href="snmp_audit_trail_log.html">
              Top of chapter
            </a></li>
<li title="Agent Logging"><a href="snmp_audit_trail_log.html#id85997">Agent Logging</a></li>
<li title="Manager Logging"><a href="snmp_audit_trail_log.html#id86040">Manager Logging</a></li>
</ul>
</li>
<li id="no" title="Advanced Agent Topics" expanded="false">Advanced Agent Topics<ul>
<li><a href="snmp_advanced_agent.html">
              Top of chapter
            </a></li>
<li title="When to use a Sub-agent"><a href="snmp_advanced_agent.html#id86186">When to use a Sub-agent</a></li>
<li title="Agent Semantics"><a href="snmp_advanced_agent.html#id86296">Agent Semantics</a></li>
<li title="Sub-agents and Dependencies "><a href="snmp_advanced_agent.html#id86360">Sub-agents and Dependencies </a></li>
<li title="Distributed Tables"><a href="snmp_advanced_agent.html#id86378">Distributed Tables</a></li>
<li title="Fault Tolerance"><a href="snmp_advanced_agent.html#id86434">Fault Tolerance</a></li>
<li title="Using Mnesia Tables as SNMP Tables"><a href="snmp_advanced_agent.html#id86508">Using Mnesia Tables as SNMP Tables</a></li>
<li title="Deviations from the Standard"><a href="snmp_advanced_agent.html#id86786">Deviations from the Standard</a></li>
</ul>
</li>
<li id="no" title="SNMP Appendix A" expanded="false">SNMP Appendix A<ul>
<li><a href="snmp_app_a.html">
              Top of chapter
            </a></li>
<li title="Appendix A"><a href="snmp_app_a.html#id86932">Appendix A</a></li>
</ul>
</li>
<li id="no" title="SNMP Appendix B" expanded="false">SNMP Appendix B<ul>
<li><a href="snmp_app_b.html">
              Top of chapter
            </a></li>
<li title="Appendix B"><a href="snmp_app_b.html#id87320">Appendix B</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<h1>5 Running the application</h1>
  
  <p>The chapter <strong>Running the application</strong> describes how the 
    application is configured and started.
    The topics include:</p>
  <ul>
    <li>configuration directories and parameters</li>
    <li>modifying the configuration files</li>
    <li>starting the application (agent and/or manager)</li>
    <li>debugging the application (agent and/or manager)</li>
  </ul>

  <p>Refer also to the chapter(s) 
    <span class="bold_code"><a href="snmp_agent_config_files.html">Definition of Agent  Configuration Files</a></span> and  
    <span class="bold_code"><a href="snmp_manager_config_files.html">Definition of Manager  Configuration Files</a></span> which contains more detailed information 
    about the agent and manager configuration files.</p>

  <h3><a name="id76778">5.1 
        Configuring the application</a></h3>
    <a name="configuration_params"></a>
    
    <p>The following two directories must exist in the system
      to run the agent:</p>
    <ul>
      <li>
        <p>the <strong>configuration directory</strong> stores all
          configuration files used by the agent (refer to the chapter 
          <span class="bold_code"><a href="snmp_agent_config_files.html">Definition of Agent Configuration Files</a></span> for more information). </p>
      </li>
      <li>the <strong>database directory</strong> stores the internal
       database files.</li>
    </ul>
    <p>The following directory must exist in the system
      to run the manager:</p>
    <ul>
      <li>
        <p>the <strong>configuration directory</strong> stores all
          configuration files used by the manager (refer to the chapter 
          <span class="bold_code"><a href="snmp_manager_config_files.html">Definition of Manager  Configuration Files</a></span> for more information). </p>
      </li>
      <li>
         <p>the <strong>database directory</strong> stores the internal
           database files. </p>
      </li>
    </ul>


    

    <p>The agent and manager uses (application) configuration parameters to 
      find out where these directories are located. The parameters should be
      defined in an Erlang system configuration file. The following
      configuration parameters are defined for the SNMP application:</p>

    <div class="example"><pre>
      agent_options() = [agent_option()]
      agent_option() = {restart_type,     restart_type()}     | 
                       {agent_type,       agent_type()}       |  
                       {agent_verbosity,  verbosity()}        |  
                       {versions,         versions()}         |  
                       {discovery,        agent_discovery()}  |  
                       {gb_max_vbs,       gb_max_vbs()}       |  
                       {priority,         priority()}         |  
                       {multi_threaded,   multi_threaded()}   |  
                       {db_dir,           db_dir()}           |  
                       {db_init_error,    db_init_error()}    |  
                       {local_db,         local_db()}         |  
                       {net_if,           agent_net_if()}     |  
                       {mibs,             mibs()}             |  
                       {mib_storage,      mib_storage()}      |  
                       {mib_server,       mib_server()}       |  
                       {audit_trail_log,  audit_trail_log()}  |  
                       {error_report_mod, error_report_mod()} |  
                       {note_store,       note_store()}       |  
                       {symbolic_store,   symbolic_store()}   |  
                       {target_cache,     target_cache()}     |  
                       {config,           agent_config()}
      manager_options() = [manager_option()]
      manager_option() = {restart_type,             restart_type()}    | 
                         {net_if,                   manager_net_if()}  |  
                         {server,                   server()}          | 
                         {note_store,               note_store()}      | 
                         {config,                   manager_config()}  |  
                         {inform_request_behaviour, manager_irb()}     | 
                         {mibs,                     manager_mibs()}    | 
                         {priority,                 priority()}        |  
                         {audit_trail_log,          audit_trail_log()} | 
                         {versions,                 versions()}        | 
                         {def_user_mod,             def_user_module()  | 
                         {def_user_data,            def_user_data()}
    </pre></div>

    <a name="agent_opts_and_types"></a>
    <p>Agent specific config options and types:</p>
    <dl>
      <a name="agent_type"></a>
      <dt><strong><span class="code">agent_type() = master | sub &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If <span class="code">master</span>, one master agent is
          started. Otherwise, no agents are started. </p>
        <p>Default is <span class="code">master</span>.</p>
      </dd>

      <a name="agent_disco"></a>
      <dt><strong><span class="code">agent_discovery() = [agent_discovery_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_discovery_opt() = 
          {terminating, agent_terminating_discovery_opts()} | 
          {originating, agent_originating_discovery_opts()}</span></p>
        <p>The <span class="code">terminating</span> options effects discovery initiated by 
          a manager. </p>
        <p>The <span class="code">originating</span> options effects discovery initiated 
          by this agent. </p>
        <p>For defaults see the options in <span class="code">agent_discovery_opt()</span>.</p>
      </dd>

      <a name="agent_term_disco_opts"></a>
      <dt><strong><span class="code">agent_terminating_discovery_opts() = [agent_terminating_discovery_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_terminating_discovery_opt() = 
          {enable, boolean()} | 
          {stage2, discovery | plain} | 
          {trigger_username, string()}</span></p>
        <p>These are options effecting discovery <span class="code">terminating</span> in this
          agent (i.e. initiated by a manager). </p>
        <p>The default values for the <span class="code">terminating</span> 
          discovery options are: </p>
        <ul>
          <li>enable: <span class="code">true</span>
</li>
          <li>stage2: <span class="code">discovery</span>
</li>
          <li>trigger_username: <span class="code">""</span>
</li>
        </ul>
      </dd>

      <a name="agent_orig_disco_opts"></a>
      <dt><strong><span class="code">agent_originating_discovery_opts() = [agent_originating_discovery_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_originating_discovery_opt() = 
          {enable, boolean()}</span></p>
        <p>These are options effecting discovery <span class="code">originating</span> in this
          agent. </p>
        <p>The default values for the <span class="code">originating</span> 
          discovery options are: </p>
        <ul>
          <li>enable: <span class="code">true</span>
</li>
        </ul>
      </dd>

      <a name="agent_mt"></a>
      <dt><strong><span class="code">multi_threaded() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If <span class="code">true</span>, the agent is multi-threaded, with one
          thread for each get request. </p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>

      <a name="agent_data_dir"></a>
      <dt><strong><span class="code">db_dir() = string() &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Defines where the SNMP agent internal db files are stored.</p>
      </dd>

      <a name="agent_gb_max_vbs"></a>
      <dt><strong><span class="code">gb_max_vbs() = pos_integer() | infinity &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines the maximum number of varbinds allowed 
	in a Get-BULK response.</p>
        <p>Default is <span class="code">1000</span>.</p>
      </dd>

      <a name="agent_local_db"></a>
      <dt><strong><span class="code">local_db() = [local_db_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">local_db_opt() = {repair, agent_repair()} | {auto_save, agent_auto_save()} |   {verbosity, verbosity()}</span></p>
        <p>Defines options specific for the SNMP agent local database.</p>
        <p>For defaults see the options in <span class="code">local_db_opt()</span>.</p>
      </dd>

      <a name="agent_ldb_repair"></a>
      <dt><strong><span class="code">agent_repair() = false | true | force &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>When starting snmpa_local_db it always tries to open an
          existing database. If <span class="code">false</span>, and some errors occur, a new
          database is created instead. If <span class="code">true</span>, an existing file
          will be repaired. If <span class="code">force</span>, the table will be repaired
          even if it was properly closed. </p>
        <p>Default is <span class="code">true</span>.</p>
      </dd>

      <a name="agent_ldb_auto_save"></a>
      <dt><strong><span class="code">agent_auto_save() = integer() | infinity &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>The auto save interval. The table is flushed to disk
          whenever not accessed for this amount of time.</p>
        <p>Default is <span class="code">5000</span>.</p>
      </dd>

      <a name="agent_net_if"></a>
      <dt><strong><span class="code">agent_net_if() = [agent_net_if_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_net_if_option() = {module, agent_net_if_module()} | 
            {verbosity, verbosity()} | 
            {options, agent_net_if_options()}</span></p>
        <p>Defines options specific for the SNMP agent network interface 
          entity. </p>
        <p>For defaults see the options in <span class="code">agent_net_if_opt()</span>.</p>
      </dd>

      <a name="agent_ni_module"></a>
      <dt><strong><span class="code">agent_net_if_module() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Module which handles the network interface part for the
          SNMP agent. Must implement the 
          <span class="bold_code"><a href="snmpa_network_interface.html">snmpa_network_interface</a></span> behaviour.</p>
        <p>Default is <span class="code">snmpa_net_if</span>.</p>
      </dd>

      <a name="agent_ni_opts"></a>
      <dt><strong><span class="code">agent_net_if_options() = [agent_net_if_option()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_net_if_option() = {bind_to, bind_to()} |  
            {sndbuf, sndbuf()} |  
            {recbuf, recbuf()} |  
            {no_reuse, no_reuse()} | 
	    {req_limit, req_limit()} |
            {filter, agent_net_if_filter_options()}</span></p>
        <p>These options are actually specific to the used module.
          The ones shown here are applicable to the default 
          <span class="code">agent_net_if_module()</span>.</p>
        <p>For defaults see the options in <span class="code">agent_net_if_option()</span>.</p>
      </dd>

      <a name="agent_ni_req_limit"></a>
      <dt><strong><span class="code">req_limit() = integer() | infinity &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Max number of simultaneous requests handled by the agent.</p>
        <p>Default is <span class="code">infinity</span>.</p>
      </dd>

      <a name="agent_ni_filter_opts"></a>
      <dt><strong><span class="code">agent_net_if_filter_options() = [agent_net_if_filter_option()] &lt;optional&gt;</span></strong></dt>
      <dd>
	<p><span class="code">agent_net_if_filter_option() = {module, agent_net_if_filter_module()}</span></p>
	<p>These options are actually specific to the used module.
	  The ones shown here are applicable to the default 
	  <span class="code">agent_net_if_filter_module()</span>.</p>
	<p>For defaults see the options in <span class="code">agent_net_if_filter_option()</span>.</p>
      </dd>

      <a name="agent_ni_filter_module"></a>
      <dt><strong><span class="code">agent_net_if_filter_module() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
	<p>Module which handles the network interface filter part for the
	  SNMP agent. Must implement the 
	  <span class="bold_code"><a href="snmpa_network_interface_filter.html">snmpa_network_interface_filter
	    </a></span> behaviour.</p>
	<p>Default is <span class="code">snmpa_net_if_filter</span>.</p>
      </dd>

      <a name="agent_mibs"></a>
      <dt><strong><span class="code">agent_mibs() = [string()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies a list of MIBs (including path) that defines which MIBs
          are initially loaded into the SNMP master agent. </p>
        <p>Note that the following will always be loaded:</p>
        <ul>
          <li>version v1: <span class="code">STANDARD-MIB</span>
</li>
          <li>version v2: <span class="code">SNMPv2</span>
</li>
          <li>version v3: <span class="code">SNMPv2</span>, <span class="code">SNMP-FRAMEWORK-MIB</span> 
           and <span class="code">SNMP-MPD-MIB</span>
</li>
        </ul>
        <p>Default is <span class="code">[]</span>.</p>
      </dd>

      <a name="agent_mib_storage"></a>
      <dt><strong><span class="code">mib_storage() = ets | {ets, Dir} | {ets, Dir, Action} | dets | {dets, Dir} | {dets, Dir, Action} | mnesia | {mnesia, Nodes} | {mnesia, Nodes, Action} &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies how info retrieved from the mibs will be stored.</p>
        <p>If <span class="code">mib_storage</span> is <span class="code">{ets, Dir}</span>, the table will also be 
          stored on file. If <span class="code">Dir</span> is <span class="code">default</span>, then <span class="code">db_dir</span> 
          will be used.</p>
        <p>If <span class="code">mib_storage</span> is <span class="code">dets</span> or if <span class="code">Dir</span> is 
          <span class="code">default</span>, then <span class="code">db_dir</span> will be used for <span class="code">Dir</span>.</p>
        <p>If <span class="code">mib_storage</span> is <span class="code">mnesia</span> then <span class="code">erlang:nodes()</span>
          will be used for <span class="code">Nodes</span>.</p>
        <p>Default is <span class="code">ets</span>. </p>
        <p><span class="code">Dir = default | string()</span>. Dir is the directory where the 
          files will be stored. If <span class="code">default</span>, then <span class="code">db_dir</span> will be 
          used.</p>
        <p><span class="code">Nodes = visible | connected | [node()]</span>. 
          <span class="code">Nodes = visible</span> is translated to 
          <span class="code">erlang:nodes(visible)</span>. 
          <span class="code">Nodes = connected</span> is translated to 
          <span class="code">erlang:nodes(connected)</span>. 
          If <span class="code">Nodes = []</span> then the own node is assumed.</p>
        <p><span class="code">Action = clear | keep</span>. Default is <span class="code">keep</span>.
          <span class="code">Action</span> is used to specify what shall be done if the 
          mnesia/dets table already exist.</p>
      </dd>

      <a name="agent_mib_server"></a>
      <dt><strong><span class="code">mib_server() = [mib_server_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">mib_server_opt() = {mibentry_override, mibentry_override()} |  {trapentry_override, trapentry_override()} |  {verbosity, verbosity()} | {cache, mibs_cache()}</span></p>
        <p>Defines options specific for the SNMP agent mib server. </p>
        <p>For defaults see the options in <span class="code">mib_server_opt()</span>.</p>
      </dd>

      <a name="agent_ms_meo"></a>
      <dt><strong><span class="code">mibentry_override() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If this value is false, then when loading a mib each mib-
          entry is checked prior to installation of the mib. 
          The purpose of the check is to prevent that the same symbolic 
          mibentry name is used for different oid's.</p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>

      <a name="agent_ms_teo"></a>
      <dt><strong><span class="code">trapentry_override() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If this value is false, then when loading a mib each trap
          is checked prior to installation of the mib. 
          The purpose of the check is to prevent that the same symbolic 
          trap name is used for different trap's.</p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>

      <a name="agent_ms_cache"></a>
      <dt><strong><span class="code">mibs_cache() = bool() | mibs_cache_opts() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Shall the agent utilize the mib server lookup cache or not.</p>
        <p>Default is <span class="code">true</span> (in which case the <span class="code">mibs_cache_opts()</span> 
          default values apply).</p>
      </dd>

      <a name="agent_ms_cache_opts"></a>
      <dt><strong><span class="code">mibs_cache_opts() = [mibs_cache_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">mibs_cache_opt() = {autogc, mibs_cache_autogc()} | {gclimit, mibs_cache_gclimit()} | {age, mibs_cache_age()}</span></p>
        <p>Defines options specific for the SNMP agent mib server cache. </p>
        <p>For defaults see the options in <span class="code">mibs_cache_opt()</span>.</p>
      </dd>

      <a name="agent_ms_cache_autogc"></a>
      <dt><strong><span class="code">mibs_cache_autogc() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines if the mib server shall perform cache gc automatically or 
          leave it to the user (see 
          <span class="bold_code"><a href="snmpa.html#gc_mibs_cache">gc_mibs_cache/0,1,2,3</a></span>). </p>
        <p>Default is <span class="code">true</span>.</p>
      </dd>

      <a name="agent_ms_cache_age"></a>
      <dt><strong><span class="code">mibs_cache_age() = integer() &gt; 0 &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines how old the entries in the cache will be allowed before 
          they are GC'ed (assuming GC is performed). Each entry in the 
          cache is "touched" whenever it is accessed. </p>
        <p>The age is defined in milliseconds. </p>
        <p>Default is <span class="code">10 timutes</span>.</p>
      </dd>

      <a name="agent_ms_cache_gclimit"></a>
      <dt><strong><span class="code">mibs_cache_gclimit() = integer() &gt; 0 | infinity &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>When performing a GC, this is the max number of cache entries 
          that will be deleted from the cache. </p>
        <p>The reason for having this limit is that if the cache is 
          large, the GC can potentially take a long time, during which 
          the agent is locked. </p>
        <p>Default is <span class="code">100</span>.</p>
      </dd>

      <a name="agent_error_report_mod"></a>
      <dt><strong><span class="code">error_report_mod() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines an error report module, implementing the 
          <span class="bold_code"><a href="snmpa_error_report.html">snmpa_error_report</a></span> 
          behaviour. Two modules are provided with the toolkit: 
          <span class="code">snmpa_error_logger</span> and <span class="code">snmpa_error_io</span>.</p>
        <p>Default is <span class="code">snmpa_error_logger</span>.</p>
      </dd>

      <a name="agent_symbolic_store"></a>
      <dt><strong><span class="code">symbolic_store() = [symbolic_store_opt()]</span></strong></dt>
      <dd>
        <p><span class="code">symbolic_store_opt() = {verbosity, verbosity()}</span></p>
        <p>Defines options specific for the SNMP agent symbolic store. </p>
        <p>For defaults see the options in <span class="code">symbolic_store_opt()</span>.</p>
      </dd>

      <a name="agent_target_cache"></a>
      <dt><strong><span class="code">target_cache() = [target_cache_opt()]</span></strong></dt>
      <dd>
        <p><span class="code">target_cache_opt() = {verbosity, verbosity()}</span></p>
        <p>Defines options specific for the SNMP agent target cache. </p>
        <p>For defaults see the options in <span class="code">target_cache_opt()</span>.</p>
      </dd>

      <a name="agent_config"></a>
      <dt><strong><span class="code">agent_config() = [agent_config_opt()] &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p><span class="code">agent_config_opt() = {dir, agent_config_dir()} |  {force_load, force_load()} | {verbosity, verbosity()}</span></p>
        <p>Defines specific config related options for the SNMP agent. </p>
        <p>For defaults see the options in <span class="code">agent_config_opt()</span>.</p>
      </dd>

      <a name="agent_config_dir"></a>
      <dt><strong><span class="code">agent_config_dir = dir() &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Defines where the SNMP agent configuration files are stored.</p>
      </dd>

      <a name="agent_force_load"></a>
      <dt><strong><span class="code">force_load() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If <span class="code">true</span> the configuration files are re-read
          during start-up, and the contents of the configuration 
          database ignored.  Thus, if <span class="code">true</span>, changes to 
          the configuration database are lost upon reboot of the 
          agent. </p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>
    </dl>

    <a name="manager_opts_and_types"></a>
    <p>Manager specific config options and types:</p>
    <dl>
      <a name="manager_server"></a>
      <dt><strong><span class="code">server() = [server_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">server_opt() = {timeout, server_timeout()} |  {verbosity, verbosity()}</span></p>
        <p>Specifies the options for the manager server process.</p>
        <p>Default is <span class="code">silence</span>.</p>
      </dd>

      <a name="manager_server_timeout"></a>
      <dt><strong><span class="code">server_timeout() = integer() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Asynchroneous request cleanup time. For every requests, 
          some info is stored internally, in order to be able to 
          deliver the reply (when it arrives) to the proper destination.
          If the reply arrives, this info will be deleted. But if
          there is no reply (in time), the info has to be deleted
          after the <strong>best before</strong> time has been passed.
          This cleanup will be performed at regular intervals, defined 
          by the <span class="code">server_timeout()</span> time.
          The information will have a <strong>best before</strong> time,
          defined by the <span class="code">Expire</span> time given when calling the
          request function (see 
          <span class="bold_code"><a href="snmpm.html#async_get">async_get</a></span>,
          <span class="bold_code"><a href="snmpm.html#async_get_next">async_get_next</a></span> and 
          <span class="bold_code"><a href="snmpm.html#async_set">async_set</a></span>).</p>
        <p>Time in milli-seconds.</p>
        <p>Default is <span class="code">30000</span>.</p>
      </dd>

      <a name="manager_config"></a>
      <dt><strong><span class="code">manager_config() = [manager_config_opt()] &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p><span class="code">manager_config_opt() = {dir, manager_config_dir()} |  {db_dir, manager_db_dir()} |  {db_init_error, db_init_error()} |  {repair, manager_repair()} |  {auto_save, manager_auto_save()} |  {verbosity, verbosity()}</span></p>
        <p>Defines specific config related options for the SNMP manager. </p>
        <p>For defaults see the options in <span class="code">manager_config_opt()</span>.</p>
      </dd>

      <a name="manager_config_dir"></a>
      <dt><strong><span class="code">manager_config_dir = dir() &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Defines where the SNMP manager configuration files are stored.</p>
      </dd>

      <a name="manager_config_db_dir"></a>
      <dt><strong><span class="code">manager_db_dir = dir() &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Defines where the SNMP manager store persistent data.</p>
      </dd>

      <a name="manager_config_repair"></a>
      <dt><strong><span class="code">manager_repair() = false | true | force &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines the repair option for the persistent database (if 
          and how the table is repaired when opened). </p>
        <p>Default is <span class="code">true</span>.</p>
      </dd>

      <a name="manager_config_auto_save"></a>
      <dt><strong><span class="code">manager_auto_save() = integer() | infinity &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>The auto save interval. The table is flushed to disk
          whenever not accessed for this amount of time.</p>
        <p>Default is <span class="code">5000</span>.</p>
      </dd>

      <a name="manager_irb"></a>
      <dt><strong><span class="code">manager_irb() = auto | user | {user, integer()} &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>This option defines how the manager will handle the sending of 
          response (acknowledgment) to received inform-requests. </p>
        <ul>
          <li>
            <p><span class="code">auto</span> - The manager will autonomously send response
              (acknowledgment&gt; to inform-request messages.</p>
          </li>
          <li>
            <p><span class="code">{user, integer()}</span> - The manager will send response
              (acknowledgment) to inform-request messages when the 
              <span class="bold_code"><a href="snmpm_user.html#handle_inform">handle_inform</a></span> 
              function completes. The integer is the time, in milli-seconds, 
              that the manager will consider the stored inform-request info 
              valid.</p>
          </li>
          <li>
            <p><span class="code">user</span> - Same as <span class="code">{user, integer()}</span>, except that 
              the default time, 15000 milli-seconds, is used.</p>
          </li>
        </ul>
        <p>See 
          <span class="bold_code"><a href="snmpm_network_interface.html">snmpm_network_interface</a></span>, 
          <span class="bold_code"><a href="snmpm_user.html">handle_inform</a></span> and 
          <span class="bold_code"><a href="snmp_manager_netif.html">definition of the manager net if</a></span> for more info.</p>
        <p>Default is <span class="code">auto</span>.</p>
      </dd>

      <a name="manager_mibs"></a>
      <dt><strong><span class="code">manager_mibs() = [string()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies a list of MIBs (including path) and defines which MIBs
          are initially loaded into the SNMP manager. </p>
        <p>Default is <span class="code">[]</span>.</p>
      </dd>

      <a name="manager_net_if"></a>
      <dt><strong><span class="code">manager_net_if() = [manager_net_if_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">manager_net_if_opt() = {module, manager_net_if_module()} | 
          {verbosity, verbosity()} | 
          {options, manager_net_if_options()}</span></p>
        <p>Defines options specific for the SNMP manager network interface 
          entity. </p>
        <p>For defaults see the options in <span class="code">manager_net_if_opt()</span>.</p>
      </dd>

      <a name="manager_ni_opts"></a>
      <dt><strong><span class="code">manager_net_if_options() = [manager_net_if_option()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">manager_net_if_option() = {bind_to, bind_to()} | 
          {sndbuf, sndbuf()} | 
          {recbuf, recbuf()} | 
          {no_reuse, no_reuse()} |
          {filter, manager_net_if_filter_options()}</span></p>
        <p>These options are actually specific to the used module.
	The ones shown here are applicable to the default 
	<span class="code">manager_net_if_module()</span>. </p>
        <p>For defaults see the options in <span class="code">manager_net_if_option()</span>.</p>
      </dd>

      <a name="manager_ni_module"></a>
      <dt><strong><span class="code">manager_net_if_module() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>The module which handles the network interface part for the
	SNMP manager. It must implement the 
	<span class="bold_code"><a href="snmpm_network_interface.html">snmpm_network_interface</a></span> behaviour. </p>
        <p>Default is <span class="code">snmpm_net_if</span>. </p>
      </dd>

      <a name="manager_ni_filter_opts"></a>
      <dt><strong><span class="code">manager_net_if_filter_options() = [manager_net_if_filter_option()] &lt;optional&gt;</span></strong></dt>
      <dd>
	<p><span class="code">manager_net_if_filter_option() = {module, manager_net_if_filter_module()}</span></p>
	<p>These options are actually specific to the used module.
	  The ones shown here are applicable to the default 
	  <span class="code">manager_net_if_filter_module()</span>.</p>
	<p>For defaults see the options in 
          <span class="code">manager_net_if_filter_option()</span>.</p>
      </dd>

      <a name="manager_ni_filter_module"></a>
      <dt><strong><span class="code">manager_net_if_filter_module() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
	<p>Module which handles the network interface filter part for the
	  SNMP manager. Must implement the 
	  <span class="bold_code"><a href="snmpm_network_interface_filter.html">snmpm_network_interface_filter</a></span> behaviour.</p>
	<p>Default is <span class="code">snmpm_net_if_filter</span>.</p>
      </dd>

      <a name="manager_def_user_module"></a>
      <dt><strong><span class="code">def_user_module() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>The module implementing the default user. See the 
          <span class="bold_code"><a href="snmpm_user.html">snmpm_user</a></span> behaviour.</p>
        <p>Default is <span class="code">snmpm_user_default</span>.</p>
      </dd>

      <a name="manager_def_user_data"></a>
      <dt><strong><span class="code">def_user_data() = term() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Data for the default user. Passed to the user when calling 
          the callback functions.</p>
        <p>Default is <span class="code">undefined</span>.</p>
      </dd>
    </dl>

    <a name="common_types"></a>
    <p>Common config types:</p>
    <dl>
      <a name="restart_type"></a>
      <dt><strong><span class="code">restart_type() = permanent | transient | temporary</span></strong></dt>
      <dd>
        <p>See <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','supervisor.html#child_spec');">supervisor</a></span> 
          documentation for more info.</p>
        <p>Default is <span class="code">permanent</span> for the agent and <span class="code">transient</span>
          for the manager.</p>
      </dd>

      <a name="db_init_error"></a>
      <dt><strong><span class="code">db_init_error() = terminate | create</span></strong></dt>
      <dd>
        <p>Defines what to do if the agent is unable to open an
          existing database file. <span class="code">terminate</span> means that the
          agent/manager will terminate and <span class="code">create</span> means that the 
          agent/manager will remove the faulty file(s) and create new ones.</p>
        <p>Default is <span class="code">terminate</span>.</p>
      </dd>

      <a name="prio"></a>
      <dt><strong><span class="code">priority() = atom() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Defines the Erlang priority for all SNMP processes.</p>
        <p>Default is <span class="code">normal</span>.</p>
      </dd>

      <a name="versions"></a>
      <dt><strong><span class="code">versions() = [version()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">version() = v1 | v2 | v3</span></p>
        <p>Which SNMP versions shall be accepted/used.</p>
        <p>Default is <span class="code">[v1,v2,v3]</span>.</p>
      </dd>

      <a name="verbosity"></a>
      <dt><strong><span class="code">verbosity() = silence | info | log | debug | trace &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Verbosity for a SNMP process. This specifies now much debug info
          is printed.</p>
        <p>Default is <span class="code">silence</span>.</p>
      </dd>

      <a name="bind_to"></a>
      <dt><strong><span class="code">bind_to() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If <span class="code">true</span>, net_if binds to the IP address.
          If <span class="code">false</span>, net_if listens on any IP address on the host
          where it is running. </p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>

      <a name="no_reuse"></a>
      <dt><strong><span class="code">no_reuse() = bool() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>If <span class="code">true</span>, net_if does not specify that the IP
          and port address should be reusable. If <span class="code">false</span>, 
          the address is set to reusable. </p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>

      <a name="recbuf"></a>
      <dt><strong><span class="code">recbuf() = integer() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Receive buffer size. </p>
        <p>Default value is defined by <span class="code">gen_udp</span>.</p>
      </dd>

      <a name="sndbuf"></a>
      <dt><strong><span class="code">sndbuf() = integer() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Send buffer size. </p>
        <p>Default value is defined by <span class="code">gen_udp</span>.</p>
      </dd>

      <a name="note_store"></a>
      <dt><strong><span class="code">note_store() = [note_store_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">note_store_opt() = {timeout, note_store_timeout()} |  {verbosity, verbosity()}</span></p>
        <p>Specifies the options for the SNMP note store.</p>
        <p>For defaults see the options in <span class="code">note_store_opt()</span>.</p>
      </dd>

      <a name="ns_timeout"></a>
      <dt><strong><span class="code">note_store_timeout() = integer() &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Note cleanup time. When storing a note in the note store,
          each note is given lifetime. Every <span class="code">timeout</span> the note_store
          process performs a GC to remove the expired note's. Time in
          milli-seconds.</p>
        <p>Default is <span class="code">30000</span>.</p>
      </dd>

      <a name="audit_trail_log"></a>
      <dt><strong><span class="code">audit_trail_log() [audit_trail_log_opt()] &lt;optional&gt;</span></strong></dt>
      <dd>
        <p><span class="code">audit_trail_log_opt() = {type, atl_type()} | {dir, atl_dir()} |  {size, atl_size()} |  {repair, atl_repair()} | {seqno, atl_seqno()}</span></p>
        <p>If present, this option specifies the options for the 
          <strong>audit trail logging</strong>. The <span class="code">disk_log</span> module is used 
          to maintain a wrap log. If present, the <span class="code">dir</span> and 
          <span class="code">size</span> options are mandatory.</p>
        <p>If not present, audit trail logging is not used.</p>
      </dd>

      <a name="atl_type"></a>
      <dt><strong><span class="code">atl_type() = read | write | read_write &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies what type of an audit trail log should be used. 
          The effect of the type is actually different for the the agent
          and the manager. </p>
        <p>For the agent:</p>
        <ul>
          <li>If <span class="code">write</span> is specified, only set requests are logged.  </li>
          <li>If <span class="code">read</span> is specified, only get requests are logged.  </li>
          <li>If <span class="code">read_write</span>, all requests are logged.  </li>
        </ul>
        <p>For the manager:</p>
        <ul>
          <li>If <span class="code">write</span> is specified, only sent messages are logged.  </li>
          <li>If <span class="code">read</span> is specified, only received messages are logged.  </li>
          <li>If <span class="code">read_write</span>, both outgoing and incoming messages are 
           logged.  </li>
        </ul>
        <p>Default is <span class="code">read_write</span>.</p>
      </dd>

      <a name="atl_dir"></a>
      <dt><strong><span class="code">atl_dir = dir() &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Specifies where the audit trail log should be stored.</p>
        <p>If <span class="code">audit_trail_log</span> specifies that logging should take
          place, this parameter <strong>must</strong> be defined.</p>
      </dd>

      <a name="atl_size"></a>
      <dt><strong><span class="code">atl_size() = {integer(), integer()} &lt;mandatory&gt;</span></strong></dt>
      <dd>
        <p>Specifies the size of the audit
          trail log.  This parameter is sent to <span class="code">disk_log</span>.  </p>
        <p>If <span class="code">audit_trail_log</span> specifies that logging should 
          take place, this parameter <strong>must</strong> be defined.</p>
      </dd>

      <a name="atl_repair"></a>
      <dt><strong><span class="code">atl_repair() = true | false | truncate | snmp_repair &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies if and how the audit trail log shall be repaired
          when opened. Unless this parameter has the value <span class="code">snmp_repair</span>
          it is sent to <span class="code">disk_log</span>. If, on the other hand, the value is
          <span class="code">snmp_repair</span>, snmp attempts to handle certain faults on its
          own. And even if it cannot repair the file, it does not truncate it 
          directly, but instead <strong>moves it aside</strong> for later off-line 
          analysis.</p>
        <p>Default is <span class="code">true</span>.</p>
      </dd>

      <a name="atl_seqno"></a>
      <dt><strong><span class="code">atl_seqno() = true | false &lt;optional&gt;</span></strong></dt>
      <dd>
        <p>Specifies if the audit trail log entries will be (sequence)
          numbered or not. The range of the sequence numbers are according
          to RFC 5424, i.e. 1 through 2147483647. </p>
        <p>Default is <span class="code">false</span>.</p>
      </dd>
    </dl>
  

  <h3><a name="id79236">5.2 
        Modifying the Configuration Files</a></h3>
    
    <p>To to start the application (agent and/or manager), the 
      configuration files must be modified and there are two ways 
      of doing this. Either edit the files manually, or run the 
      configuration tool as follows.</p>
    <p>If authentication or encryption is used (SNMPv3 only), start
      the <span class="code">crypto</span> application.</p>
    <div class="example"><pre>
1&gt; snmp:config().

Simple SNMP configuration tool (version 4.0)
------------------------------------------------
Note: Non-trivial configurations still has to be
      done manually. IP addresses may be entered 
      as dront.ericsson.se (UNIX only) or
      123.12.13.23
------------------------------------------------

Configure an agent (y/n)? [y] 

Agent system config: 
--------------------
1. Agent process priority (low/normal/high) [normal] 
2. What SNMP version(s) should be used (1,2,3,1&amp;2,1&amp;2&amp;3,2&amp;3)? [3] 1&amp;2&amp;3
3. Configuration directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/agent/conf
4. Config verbosity (silence/info/log/debug/trace)? [silence] 
5. Database directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/agent/db
6. Mib storage type (ets/dets/mnesia)? [ets] 
7. Target cache verbosity (silence/info/log/debug/trace)? [silence] 
8. Symbolic store verbosity (silence/info/log/debug/trace)? [silence] 
9. Local DB verbosity (silence/info/log/debug/trace)? [silence] 
10. Local DB repair (true/false/force)? [true] 
11. Local DB auto save (infinity/milli seconds)? [5000] 
12. Error report module? [snmpa_error_logger] 
13. Agent type (master/sub)? [master] 
14. Master-agent verbosity (silence/info/log/debug/trace)? [silence] log
15. Shall the agent re-read the configuration files during startup 
    (and ignore the configuration database) (true/false)? [true] 
16. Multi threaded agent (true/false)? [false] true
17. Check for duplicate mib entries when installing a mib (true/false)? [false] 
18. Check for duplicate trap names when installing a mib (true/false)? [false] 
19. Mib server verbosity (silence/info/log/debug/trace)? [silence] 
20. Mib server cache (true/false)? [true]
21. Note store verbosity (silence/info/log/debug/trace)? [silence] 
22. Note store GC timeout? [30000] 
23. Shall the agent use an audit trail log (y/n)? [n] y
23b. Audit trail log type (write/read_write)? [read_write] 
23c. Where to store the audit trail log? [/ldisk/snmp] /ldisk/snmp/agent/log
23d. Max number of files? [10] 
23e. Max size (in bytes) of each file? [10240] 
23f. Audit trail log repair (true/false/truncate)? [true] 
24. Which network interface module shall be used? [snmpa_net_if] 
25. Network interface verbosity (silence/info/log/debug/trace)? [silence] log
25a. Bind the agent IP address (true/false)? [false] 
25b. Shall the agents IP address and port be not reusable (true/false)? [false] 
25c. Agent request limit (used for flow control) (infinity/pos integer)? [infinity] 32
25d. Receive buffer size of the agent (in bytes) (default/pos integer)? [default] 
25e. Send buffer size of the agent (in bytes) (default/pos integer)? [default]
25f. Do you wish to specify a network interface filter module (or use default) [default] 

Agent snmp config: 
------------------
1. System name (sysName standard variable) [bmk's agent] 
2. Engine ID (snmpEngineID standard variable) [bmk's engine] 
3. Max message size? [484] 
4. The UDP port the agent listens to. (standard 161) [4000] 
5. IP address for the agent (only used as id 
   when sending traps) [127.0.0.1] 
6. IP address for the manager (only this manager 
   will have access to the agent, traps are sent 
   to this one) [127.0.0.1] 
7. To what UDP port at the manager should traps 
   be sent (standard 162)? [5000] 
8. Do you want a none- minimum- or semi-secure configuration? 
   Note that if you chose v1 or v2, you won't get any security for these
   requests (none, minimum, semi_des, semi_aes) [minimum] 
making sure crypto server is started...
8b. Give a password of at least length 8. It is used to generate 
    private keys for the configuration:  kalle-anka
9. Current configuration files will now be overwritten. Ok (y/n)? [y] 

- - - - - - - - - - - - -
Info: 1. SecurityName "initial" has noAuthNoPriv read access
         and authenticated write access to the "restricted"
         subtree.
      2. SecurityName "all-rights" has noAuthNoPriv read/write
         access to the "internet" subtree.
      3. Standard traps are sent to the manager.
      4. Community "public" is mapped to security name "initial".
      5. Community "all-rights" is mapped to security name "all-rights".
The following agent files were written: agent.conf, community.conf,
standard.conf, target_addr.conf, target_params.conf, 
notify.conf, vacm.conf and usm.conf
- - - - - - - - - - - - -

Configure a manager (y/n)? [y] 

Manager system config: 
----------------------
1. Manager process priority (low/normal/high) [normal] 
2. What SNMP version(s) should be used (1,2,3,1&amp;2,1&amp;2&amp;3,2&amp;3)? [3] 1&amp;2&amp;3
3. Configuration directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/manager/conf
4. Config verbosity (silence/info/log/debug/trace)? [silence] log
5. Database directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/manager/db
6. Database repair (true/false/force)? [true] 
7. Database auto save (infinity/milli seconds)? [5000] 
8. Inform request behaviour (auto/user)? [auto] 
9. Server verbosity (silence/info/log/debug/trace)? [silence] log
10. Server GC timeout? [30000] 
11. Note store verbosity (silence/info/log/debug/trace)? [silence] 
12. Note store GC timeout? [30000] 
13. Which network interface module shall be used? [snmpm_net_if] 
14. Network interface verbosity (silence/info/log/debug/trace)? [silence] log
15. Bind the manager IP address (true/false)? [false] 
16. Shall the manager IP address and port be not reusable (true/false)? [false] 
17. Receive buffer size of the manager (in bytes) (default/pos integer)? [default] 
18. Send buffer size of the manager (in bytes) (default/pos integer)? [default] 
19. Shall the manager use an audit trail log (y/n)? [n] y
19b. Where to store the audit trail log? [/ldisk/snmp] /ldisk/snmp/manager/log
19c. Max number of files? [10] 
19d. Max size (in bytes) of each file? [10240] 
19e. Audit trail log repair (true/false/truncate)? [true] 
20. Do you wish to assign a default user [yes] or use
    the default settings [no] (y/n)? [n] 

Manager snmp config: 
--------------------
1. Engine ID (snmpEngineID standard variable) [bmk's engine] 
2. Max message size? [484] 
3. IP address for the manager (only used as id 
   when sending requests) [127.0.0.1] 
4. Port number (standard 162)? [5000] 
5. Configure a user of this manager (y/n)? [y] 
5b. User id? kalle
5c. User callback module? snmpm_user_default
5d. User (callback) data? [undefined] 
5. Configure a user of this manager (y/n)? [y] n
6. Configure an agent handled by this manager (y/n)? [y] 
6b. User id? kalle
6c. Target name? [bmk's agent] 
6d. Version (1/2/3)? [1] 3
6e. Community string ? [public] 
6f. Engine ID (snmpEngineID standard variable) [bmk's engine] 
6g. IP address for the agent [127.0.0.1] 
6h. The UDP port the agent listens to. (standard 161) [4000] 
6i. Retransmission timeout (infinity/pos integer)? [infinity] 
6j. Max message size? [484] 
6k. Security model (any/v1/v2c/usm)? [any] usm
6l. Security name? ["initial"] 
6m. Security level (noAuthNoPriv/authNoPriv/authPriv)? [noAuthNoPriv] authPriv
6. Configure an agent handled by this manager (y/n)? [y] n
7. Configure an usm user handled by this manager (y/n)? [y] 
7a. Engine ID [bmk's engine] 
7b. User name? hobbes
7c. Security name? [hobbes] 
7d. Authentication protocol (no/sha/md5)? [no] sha
7e  Authentication [sha] key (length 0 or 20)? [""] [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \
    17,18,19,20]
7d. Priv protocol (no/des/aes)? [no] des
7f  Priv [des] key (length 0 or 16)? [""] 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
7. Configure an usm user handled by this manager (y/n)? [y] n
8. Current configuration files will now be overwritten. Ok (y/n)? [y] 

- - - - - - - - - - - - -
The following manager files were written: manager.conf, agents.conf , users.conf and usm.conf
- - - - - - - - - - - - -

--------------------
Configuration directory for system file (absolute path)? [/ldisk/snmp] 
ok
    </pre></div>
  

  <h3><a name="id79327">5.3 
        Starting the application</a></h3>
    
    <p>Start Erlang with the command:</p>
    <div class="example"><pre>
erl -config /tmp/snmp/sys
    </pre></div>
    <p>If authentication or encryption is used (SNMPv3 only), start
      the <span class="code">crypto</span> application.  If this step is forgotten, the
      agent will not start, but report a
      <span class="code">{config_error,{unsupported_crypto,_}}</span> error.</p>
    <div class="example"><pre>
1&gt; <span class="bold_code">application:start(crypto).</span>
ok
    </pre></div>
    <div class="example"><pre>
2&gt; <span class="bold_code">application:start(snmp).</span>
ok
    </pre></div>
  

  <h3><a name="id79377">5.4 
        Debugging the application</a></h3>
    <a name="verbosity"></a>
    
    <p>It is possible to debug every (non-supervisor) process of the 
      application (both agent and manager), possibly with the exception 
      of the net_if module(s), which could be supplied by a user of the 
      application). This is done by calling the 
      <span class="code">snmpa:verbosity/2</span> and <span class="code">snmpm:verbosity/2</span> function(s) 
      and/or using 
      <span class="bold_code"><a href="#configuration_params">configuration parameters</a></span>.
      The verbosity itself has several <strong>levels</strong>: <span class="code">silence | info |  log | debug | trace</span>. For the lowest verbosity <span class="code">silence</span>, 
      nothing is printed. The higher the verbosity, the more is printed.
      Default value is always <span class="code">silence</span>.</p>
    <div class="example"><pre>
3&gt; <span class="bold_code">snmpa:verbosity(master_agent, log).</span>
ok
5&gt; <span class="bold_code">snmpa:verbosity(net_if, log).</span>
ok
6&gt; 
%% Example of output from the agent when a get-next-request arrives:
** SNMP NET-IF LOG: 
   got packet from {147,12,12,12}:5000

** SNMP NET-IF MPD LOG: 
   v1, community: all-rights

** SNMP NET-IF LOG: 
   got pdu from {147,12,12,12}:5000 {pdu, 'get-next-request',
                                          62612569,noError,0,
                                          [{varbind,[1,1],'NULL','NULL',1}]}

** SNMP MASTER-AGENT LOG: 
   apply: snmp_generic,variable_func,[get,{sysDescr,persistent}]

** SNMP MASTER-AGENT LOG: 
   returned: {value,"Erlang SNMP agent"}

** SNMP NET-IF LOG: 
   reply pdu: {pdu,'get-response',62612569,noError,0,
                   [{varbind,[1,3,6,1,2,1,1,1,0],
                             'OCTET STRING',
                             "Erlang SNMP agent",1}]}

** SNMP NET-IF INFO: time in agent: 19711 mysec
    </pre></div>

    <p>Other useful function(s) for debugging the agent are: </p>
    <dl>
      <dt><strong><span class="code">snmpa:info/0,1</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#info">info</a></span> is used to retrieve a list of miscellaneous agent information.</p>
      </dd>

      <dt><strong><span class="code">snmpa:which_aliasnames/0</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#which_aliasnames">which_aliasnames</a></span> is used to retrieve a list of all alias-names known to the agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa:which_tables/0</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#which_tables">which_tables</a></span> is used to retrieve a list of all (MIB) tables known to the agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa:which_variables/0</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#which_variables">which_variables</a></span> is used to retrieve a list of all (MIB) variables known to the agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa:which_notifications/0</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#which_notifications">which_notifications</a></span> is used to retrieve a list of all (MIB) notifications/traps known to the agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa:restart_worker/0,1</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#restart_worker">restart_worker</a></span> is used to restart the worker process of a multi-threaded agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa:restart_set_worker/0,1</span></strong></dt>
      <dd>
        <p><span class="bold_code"><a href="snmpa.html#restart_set_worker">restart_set_worker</a></span> is used to restart the set-worker process of a multi-threaded agent. </p>
      </dd>

      <dt><strong><span class="code">snmpa_local_db:print/0,1,2</span></strong></dt>
      <dd>
        <p>For example, this function can show the counters 
          <span class="code">snmpInPkts</span> and <span class="code">snmpOutPkts</span>.</p>
      </dd>
    </dl>

    <p>Another usefull way to debug the agent is to pretty-print the content of 
    all the tables and/or variables handled directly by the agent. 
    This can be done by simply calling: </p>
    <p><span class="code">snmpa:print_mib_info()</span></p>
    <p>See 
    <span class="bold_code"><a href="snmpa.html#print_mib_info">print_mib_info/0</a></span>, 
    <span class="bold_code"><a href="snmpa.html#print_mib_tables">print_mib_tables/0</a></span>
    or
    <span class="bold_code"><a href="snmpa.html#print_mib_variables">print_mib_variables/0</a></span> 
    for more info. </p>
      
  
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>