summaryrefslogtreecommitdiff
path: root/lib/snmp/doc/src/snmp_config.xml
blob: 6daa3ced21df9b2cf5933adc7a04b42e3de827ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>1997</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>Running the application</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmp_config.xml</file>
  </header>
  <p>The chapter <em>Running the application</em> describes how the 
    application is configured and started.
    The topics include:</p>
  <list type="bulleted">
    <item>configuration directories and parameters</item>
    <item>modifying the configuration files</item>
    <item>starting the application (agent and/or manager)</item>
    <item>debugging the application (agent and/or manager)</item>
  </list>

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

  <section>
    <marker id="configuration_params"></marker>
    <title>Configuring the application</title>
    <p>The following two directories must exist in the system
      to run the agent:</p>
    <list type="bulleted">
      <item>
        <p>the <em>configuration directory</em> stores all
          configuration files used by the agent (refer to the chapter 
          <seealso marker="snmp_agent_config_files">Definition of Agent Configuration Files</seealso> for more information). </p>
      </item>
      <item>the <em>database directory</em> stores the internal
       database files.</item>
    </list>
    <p>The following directory must exist in the system
      to run the manager:</p>
    <list type="bulleted">
      <item>
        <p>the <em>configuration directory</em> stores all
          configuration files used by the manager (refer to the chapter 
          <seealso marker="snmp_manager_config_files">Definition of Manager  Configuration Files</seealso> for more information). </p>
      </item>
      <item>
         <p>the <em>database directory</em> stores the internal
           database files. </p>
      </item>
    </list>


    <!-- 
	 *****************************************************

	 The info below is also found in the snmp_app.xml file 

	 *****************************************************
    -->

    <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>

    <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>

    <marker id="agent_opts_and_types"></marker>
    <p>Agent specific config options and types:</p>
    <taglist>
      <tag><marker id="agent_type"></marker>
        <c><![CDATA[agent_type() = master | sub <optional>]]></c></tag>
      <item>
        <p>If <c>master</c>, one master agent is
          started. Otherwise, no agents are started. </p>
        <p>Default is <c>master</c>.</p>
      </item>

      <tag><marker id="agent_disco"></marker>
        <c><![CDATA[agent_discovery() = [agent_discovery_opt()] <optional>]]></c></tag>
      <item>
        <p><c>agent_discovery_opt() = 
          {terminating, agent_terminating_discovery_opts()} | 
          {originating, agent_originating_discovery_opts()}</c></p>
        <p>The <c>terminating</c> options effects discovery initiated by 
          a manager. </p>
        <p>The <c>originating</c> options effects discovery initiated 
          by this agent. </p>
        <p>For defaults see the options in <c>agent_discovery_opt()</c>.</p>
      </item>

      <tag><marker id="agent_term_disco_opts"></marker>
        <c><![CDATA[agent_terminating_discovery_opts() = [agent_terminating_discovery_opt()] <optional>]]></c></tag>
      <item>
        <p><c>agent_terminating_discovery_opt() = 
          {enable, boolean()} | 
          {stage2, discovery | plain} | 
          {trigger_username, string()}</c></p>
        <p>These are options effecting discovery <c>terminating</c> in this
          agent (i.e. initiated by a manager). </p>
        <p>The default values for the <c>terminating</c> 
          discovery options are: </p>
        <list type="bulleted">
          <item>enable: <c>true</c></item>
          <item>stage2: <c>discovery</c></item>
          <item>trigger_username: <c>""</c></item>
        </list>
      </item>

      <tag><marker id="agent_orig_disco_opts"></marker>
        <c><![CDATA[agent_originating_discovery_opts() = [agent_originating_discovery_opt()] <optional>]]></c></tag>
      <item>
        <p><c>agent_originating_discovery_opt() = 
          {enable, boolean()}</c></p>
        <p>These are options effecting discovery <c>originating</c> in this
          agent. </p>
        <p>The default values for the <c>originating</c> 
          discovery options are: </p>
        <list type="bulleted">
          <item>enable: <c>true</c></item>
        </list>
      </item>

      <tag><marker id="agent_mt"></marker>
        <c><![CDATA[multi_threaded() = bool() <optional>]]></c></tag>
      <item>
        <p>If <c>true</c>, the agent is multi-threaded, with one
          thread for each get request. </p>
        <p>Default is <c>false</c>.</p>
      </item>

      <tag><marker id="agent_data_dir"></marker>
        <c><![CDATA[db_dir() = string() <mandatory>]]></c></tag>
      <item>
        <p>Defines where the SNMP agent internal db files are stored.</p>
      </item>

      <tag><marker id="agent_gb_max_vbs"></marker>
        <c><![CDATA[gb_max_vbs() = pos_integer() | infinity <optional>]]></c></tag>
      <item>
        <p>Defines the maximum number of varbinds allowed 
	in a Get-BULK response.</p>
        <p>Default is <c>1000</c>.</p>
      </item>

      <tag><marker id="agent_local_db"></marker>
        <c><![CDATA[local_db() = [local_db_opt()] <optional>]]></c></tag>
      <item>
        <p><c>local_db_opt() = {repair, agent_repair()} | {auto_save, agent_auto_save()} |   {verbosity, verbosity()}</c></p>
        <p>Defines options specific for the SNMP agent local database.</p>
        <p>For defaults see the options in <c>local_db_opt()</c>.</p>
      </item>

      <tag><marker id="agent_ldb_repair"></marker>
        <c><![CDATA[agent_repair() = false | true | force <optional>]]></c></tag>
      <item>
        <p>When starting snmpa_local_db it always tries to open an
          existing database. If <c>false</c>, and some errors occur, a new
          database is created instead. If <c>true</c>, an existing file
          will be repaired. If <c>force</c>, the table will be repaired
          even if it was properly closed. </p>
        <p>Default is <c>true</c>.</p>
      </item>

      <tag><marker id="agent_ldb_auto_save"></marker>
        <c><![CDATA[agent_auto_save() = integer() | infinity <optional>]]></c></tag>
      <item>
        <p>The auto save interval. The table is flushed to disk
          whenever not accessed for this amount of time.</p>
        <p>Default is <c>5000</c>.</p>
      </item>

      <tag><marker id="agent_net_if"></marker>
        <c><![CDATA[agent_net_if() = [agent_net_if_opt()] <optional>]]></c></tag>
      <item>
        <p><c>agent_net_if_option() = {module, agent_net_if_module()} | 
            {verbosity, verbosity()} | 
            {options, agent_net_if_options()}</c></p>
        <p>Defines options specific for the SNMP agent network interface 
          entity. </p>
        <p>For defaults see the options in <c>agent_net_if_opt()</c>.</p>
      </item>

      <tag><marker id="agent_ni_module"></marker>
        <c><![CDATA[agent_net_if_module() = atom() <optional>]]></c></tag>
      <item>
        <p>Module which handles the network interface part for the
          SNMP agent. Must implement the 
          <seealso marker="snmpa_network_interface">snmpa_network_interface</seealso> behaviour.</p>
        <p>Default is <c>snmpa_net_if</c>.</p>
      </item>

      <tag><marker id="agent_ni_opts"></marker>
        <c><![CDATA[agent_net_if_options() = [agent_net_if_option()] <optional>]]></c></tag>
      <item>
        <p><c>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()}</c></p>
        <p>These options are actually specific to the used module.
          The ones shown here are applicable to the default 
          <c>agent_net_if_module()</c>.</p>
        <p>For defaults see the options in <c>agent_net_if_option()</c>.</p>
      </item>

      <tag><marker id="agent_ni_req_limit"></marker>
        <c><![CDATA[req_limit() = integer() | infinity <optional>]]></c></tag>
      <item>
        <p>Max number of simultaneous requests handled by the agent.</p>
        <p>Default is <c>infinity</c>.</p>
      </item>

      <tag><marker id="agent_ni_filter_opts"></marker>
        <c><![CDATA[agent_net_if_filter_options() = [agent_net_if_filter_option()] <optional>]]></c></tag>
      <item>
	<p><c><![CDATA[agent_net_if_filter_option() = {module, agent_net_if_filter_module()}]]></c></p>
	<p>These options are actually specific to the used module.
	  The ones shown here are applicable to the default 
	  <c>agent_net_if_filter_module()</c>.</p>
	<p>For defaults see the options in <c>agent_net_if_filter_option()</c>.</p>
      </item>

      <tag><marker id="agent_ni_filter_module"></marker>
        <c><![CDATA[agent_net_if_filter_module() = atom() <optional>]]></c></tag>
      <item>
	<p>Module which handles the network interface filter part for the
	  SNMP agent. Must implement the 
	  <seealso marker="snmpa_network_interface_filter">snmpa_network_interface_filter
	    </seealso> behaviour.</p>
	<p>Default is <c>snmpa_net_if_filter</c>.</p>
      </item>

      <tag><marker id="agent_mibs"></marker>
        <c><![CDATA[agent_mibs() = [string()] <optional>]]></c></tag>
      <item>
        <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>
        <list type="bulleted">
          <item>version v1: <c>STANDARD-MIB</c></item>
          <item>version v2: <c>SNMPv2</c></item>
          <item>version v3: <c>SNMPv2</c>, <c>SNMP-FRAMEWORK-MIB</c> 
           and <c>SNMP-MPD-MIB</c></item>
        </list>
        <p>Default is <c>[]</c>.</p>
      </item>

      <tag><marker id="agent_mib_storage"></marker>
        <c><![CDATA[mib_storage() = [mib_storage_opt()] <optional>]]></c></tag>
      <item>
        <p><c>mib_storage_opt() = {module, mib_storage_module()} |  {options, mib_storage_options()}</c></p>
        <p>This option specifies how basic mib data is stored. 
	This option is used by two parts of the snmp agent: 
	The mib-server and the symbolic-store. </p>
        <p>Default is <c>[{module, snmpa_mib_storage_ets}]</c>. </p>
      </item>

      <tag><marker id="agent_mst_module"></marker>
        <c><![CDATA[mib_storage_module() = snmpa_mib_data_ets | snmpa_mib_data_dets | snmpa_mib_data_mnesia | module()]]></c></tag>
      <item>
        <p>Defines the mib storage module of the SNMP agent as defined by the 
	<seealso marker="snmpa_mib_storage">snmpa_mib_storage</seealso> 
	behaviour. </p>
	<p>Several entities (<c>mib-server</c> via the its data module and 
	the <c>symbolic-store</c>) of the snmp agent uses this for storage 
	of miscelaneous mib related data dataretrieved while loading a mib. </p>
	<p>There are several implementations provided with the agent: 
	<c>snmpa_mib_storage_ets</c>, <c>snmpa_mib_storage_dets</c> and 
	<c>snmpa_mib_storage_mnesia</c>. </p>
        <p>Default module is <c>snmpa_mib_storage_ets</c>. </p>
      </item>

      <tag><marker id="agent_mst_options"></marker>
        <c><![CDATA[mib_storage_options() = list() <optional>]]></c></tag>
      <item>
        <p>This is implementattion depended. That is, it depends on the 
	module. For each module a specific set of options are valid. 
	For the module provided with the app, these options are supported: </p>
        <list type="bulleted">
          <item>
	    <p><c>snmpa_mib_storage_ets</c>: <c>{dir, filename()} | {action, keep | clear}, {checksum, boolean()}</c></p>
	    <list>
	      <item>
		<p><c>dir</c> - If present, points to a directory where a file 
		to which all data in the ets table is "synced". </p>
		<p>Also, when a table is opened this file is read, 
		if it exists. </p>
		<p>By default, this will <em>not</em> be used. </p> 
	      </item>
	      <item>
		<p><c>action</c> - Specifies the behaviour when a non-empty 
		file is found: Keep its content or clear it out. </p>
		<p>Default is <c>keep</c>. </p> 
	      </item>
	      <item>
		<p><c>checksum</c> - Defines if the file is checksummed 
		or not. </p>
		<p>Default is <c>false</c>. </p> 
	      </item>
	    </list>
	  </item>
          <item>
	    <p><c>snmpa_mib_storage_dets</c>: <c>{dir, filename()} | {action, keep | clear}, {auto_save, default | pos_integer()} | {repair, force | boolean()}</c></p>
	    <list>
	      <item>
		<p><c>dir</c> - This <em>mandatory</em> option points to a 
		directory where to place the file of a dets table. </p>
	      </item>
	      <item>
		<p><c>action</c> - Specifies the behaviour when a non-empty 
		file is found: Keep its content or clear it out. </p>
		<p>Default is <c>keep</c>. </p> 
	      </item>
	      <item>
		<p><c>auto_save</c> - Defines the dets auto-save frequency. </p>
		<p>Default is <c>default</c>. </p> 
	      </item>
	      <item>
		<p><c>repair</c> - Defines the dets repair behaviour. </p>
		<p>Default is <c>false</c>. </p> 
	      </item>
	    </list>
	  </item>
          <item>
	    <p><c>snmpa_mib_storage_mnesia</c>: <c>{action, keep | clear}, {nodes, [node()]}</c></p>
	    <list>
	      <item>
		<p><c>action</c> - Specifies the behaviour when a non-empty, 
		already existing, table: Keep its content or clear it out. </p>
		<p>Default is <c>keep</c>. </p>
	      </item>
	      <item>
		<p><c>nodes</c> - A list of node names (or an atom 
		describing a list of nodes) defining where to open the table. 
		Its up to the user to ensure that mnesia is actually running 
		on the specified nodes. </p>
		<p>The following distinct values are recognised: </p>
		<list>
		  <item>
		    <p><c>[]</c> - Translated into a list of the own node: <c>[node()]</c></p>
		  </item>
		  <item>
		    <p><c>all</c> - <c>erlang:nodes()</c></p>
		  </item>
		  <item>
		    <p><c>visible</c> - <c>erlang:nodes(visible)</c></p>
		  </item>
		  <item>
		    <p><c>connected</c> - <c>erlang:nodes(connected)</c></p>
		  </item>
		  <item>
		    <p><c>db_nodes</c> - <c>mnesia:system_info(db_nodes)</c></p>
		  </item>
		</list>
		
		<p>Default is the result of the call: <c>erlang:nodes()</c>. </p>
	      </item>
	    </list>
	  </item>
        </list>
      </item>

<!--

This is the old format which is "supported", but not documented, 
in so far as it will be converted to the new format if found. 

      <tag><marker id="agent_mib_storage"></marker>
        <c><![CDATA[mib_storage() = ets | {ets, Dir} | {ets, Dir, Action} | dets | {dets, Dir} | {dets, Dir, Action} | mnesia | {mnesia, Nodes} | {mnesia, Nodes, Action} <optional>]]></c></tag>
      <item>
        <p>Specifies how info retrieved from the mibs will be stored.</p>
        <p>If <c>mib_storage</c> is <c>{ets, Dir}</c>, the table will also be 
          stored on file. If <c>Dir</c> is <c>default</c>, then <c>db_dir</c> 
          will be used.</p>
        <p>If <c>mib_storage</c> is <c>dets</c> or if <c>Dir</c> is 
          <c>default</c>, then <c>db_dir</c> will be used for <c>Dir</c>.</p>
        <p>If <c>mib_storage</c> is <c>mnesia</c> then <c>erlang:nodes()</c>
          will be used for <c>Nodes</c>.</p>
        <p>Default is <c>ets</c>. </p>
        <p><c>Dir = default | string()</c>. Dir is the directory where the 
          files will be stored. If <c>default</c>, then <c>db_dir</c> will be 
          used.</p>
        <p><c>Nodes = visible | connected | [node()]</c>. 
          <c>Nodes = visible</c> is translated to 
          <c>erlang:nodes(visible)</c>. 
          <c>Nodes = connected</c> is translated to 
          <c>erlang:nodes(connected)</c>. 
          If <c>Nodes = []</c> then the own node is assumed.</p>
        <p><c>Action = clear | keep</c>. Default is <c>keep</c>.
          <c>Action</c> is used to specify what shall be done if the 
          mnesia/dets table already exist.</p>
      </item>
-->

      <tag><marker id="agent_mib_server"></marker>
        <c><![CDATA[mib_server() = [mib_server_opt()] <optional>]]></c></tag>
      <item>
        <p><c>mib_server_opt() = {mibentry_override, mibentry_override()} |  {trapentry_override, trapentry_override()} |  {verbosity, verbosity()} | {cache, mibs_cache()} | {data_module, mib_server_data_module()}</c></p>
        <p>Defines options specific for the SNMP agent mib server. </p>
        <p>For defaults see the options in <c>mib_server_opt()</c>.</p>
      </item>

      <tag><marker id="agent_ms_meo"></marker>
        <c><![CDATA[mibentry_override() = bool() <optional>]]></c></tag>
      <item>
        <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 <c>false</c>.</p>
      </item>

      <tag><marker id="agent_ms_teo"></marker>
        <c><![CDATA[trapentry_override() = bool() <optional>]]></c></tag>
      <item>
        <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 <c>false</c>.</p>
      </item>

      
<!--
      <tag><marker id="agent_ms_data_module"></marker>
        <c><![CDATA[mib_server_data_module() = snmpa_mib_data_tttn | snmpa_mib_data_ttln | module() <optional>]]></c></tag>
-->
      <tag><marker id="agent_ms_data_module"></marker>
        <c><![CDATA[mib_server_data_module() = snmpa_mib_data_tttn | module() <optional>]]></c></tag>
      <item>
        <p>Defines the backend data module of the SNMP agent mib-server as 
	defined by the 
	<seealso marker="snmpa_mib_data">snmpa_mib_data</seealso> 
	behaviour. </p>
	<p>At present only the default module is provided with the agent,  
	<c>snmpa_mib_data_tttn</c>. </p>
<!--
	<p>Two modules is provided with the agent 
	<c>snmpa_mib_data_tttn</c> (this is the old implementation) and 
	<c>snmpa_mib_data_ttln</c> (for a mib tree with many holes, 
	this algorithm can be more price efficient). </p>
-->
        <p>Default module is <c>snmpa_mib_data_tttn</c>. </p>
      </item>

      <tag><marker id="agent_ms_cache"></marker>
        <c><![CDATA[mibs_cache() = bool() | mibs_cache_opts() <optional>]]></c></tag>
      <item>
        <p>Shall the agent utilize the mib server lookup cache or not.</p>
        <p>Default is <c>true</c> (in which case the <c>mibs_cache_opts()</c> 
          default values apply).</p>
      </item>

      <tag><marker id="agent_ms_cache_opts"></marker>
        <c><![CDATA[mibs_cache_opts() = [mibs_cache_opt()] <optional>]]></c></tag>
      <item>
        <p><c>mibs_cache_opt() = {autogc, mibs_cache_autogc()} | {gclimit, mibs_cache_gclimit()} | {age, mibs_cache_age()}</c></p>
        <p>Defines options specific for the SNMP agent mib server cache. </p>
        <p>For defaults see the options in <c>mibs_cache_opt()</c>.</p>
      </item>

      <tag><marker id="agent_ms_cache_autogc"></marker>
        <c><![CDATA[mibs_cache_autogc() = bool() <optional>]]></c></tag>
      <item>
        <p>Defines if the mib server shall perform cache gc automatically or 
	leave it to the user (see 
	<seealso marker="snmpa#gc_mibs_cache">gc_mibs_cache/0,1,2,3</seealso>). </p>
	<p>Default is <c>true</c>.</p>
      </item>

      <tag><marker id="agent_ms_cache_age"></marker>
        <c><![CDATA[mibs_cache_age() = integer() > 0 <optional>]]></c></tag>
      <item>
        <p>Defines how old the entries in the cache will be allowed 
	to become 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 <c>10 timutes</c>.</p>
      </item>

      <tag><marker id="agent_ms_cache_gclimit"></marker>
        <c><![CDATA[mibs_cache_gclimit() = integer() > 0 | infinity <optional>]]></c></tag>
      <item>
        <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 <c>100</c>.</p>
      </item>

      <tag><marker id="agent_error_report_mod"></marker>
        <c><![CDATA[error_report_mod() = atom() <optional>]]></c></tag>
      <item>
        <p>Defines an error report module, implementing the 
          <seealso marker="snmpa_error_report">snmpa_error_report</seealso> 
          behaviour. Two modules are provided with the toolkit: 
          <c>snmpa_error_logger</c> and <c>snmpa_error_io</c>.</p>
        <p>Default is <c>snmpa_error_logger</c>.</p>
      </item>

      <tag><marker id="agent_symbolic_store"></marker>
        <c>symbolic_store() = [symbolic_store_opt()]</c></tag>
      <item>
        <p><c>symbolic_store_opt() = {verbosity, verbosity()}</c></p>
        <p>Defines options specific for the SNMP agent symbolic store. </p>
        <p>For defaults see the options in <c>symbolic_store_opt()</c>.</p>
      </item>

      <tag><marker id="agent_target_cache"></marker>
        <c>target_cache() = [target_cache_opt()]</c></tag>
      <item>
        <p><c>target_cache_opt() = {verbosity, verbosity()}</c></p>
        <p>Defines options specific for the SNMP agent target cache. </p>
        <p>For defaults see the options in <c>target_cache_opt()</c>.</p>
      </item>

      <tag><marker id="agent_config"></marker>
        <c><![CDATA[agent_config() = [agent_config_opt()] <mandatory>]]></c></tag>
      <item>
        <p><c>agent_config_opt() = {dir, agent_config_dir()} |  {force_load, force_load()} | {verbosity, verbosity()}</c></p>
        <p>Defines specific config related options for the SNMP agent. </p>
        <p>For defaults see the options in <c>agent_config_opt()</c>.</p>
      </item>

      <tag><marker id="agent_config_dir"></marker>
        <c><![CDATA[agent_config_dir = dir() <mandatory>]]></c></tag>
      <item>
        <p>Defines where the SNMP agent configuration files are stored.</p>
      </item>

      <tag><marker id="agent_force_load"></marker>
        <c><![CDATA[force_load() = bool() <optional>]]></c></tag>
      <item>
        <p>If <c>true</c> the configuration files are re-read
          during start-up, and the contents of the configuration 
          database ignored.  Thus, if <c>true</c>, changes to 
          the configuration database are lost upon reboot of the 
          agent. </p>
        <p>Default is <c>false</c>.</p>
      </item>
    </taglist>

    <marker id="manager_opts_and_types"></marker>
    <p>Manager specific config options and types:</p>
    <taglist>
      <tag><marker id="manager_server"></marker>
        <c><![CDATA[server() = [server_opt()] <optional>]]></c></tag>
      <item>
        <p><c>server_opt() = {timeout, server_timeout()} | {verbosity, verbosity()} | {cbproxy, server_cbproxy()}</c></p>
        <p>Specifies the options for the manager server process.</p>
        <p>Default is <c>silence</c>.</p>
      </item>

      <tag><marker id="manager_server_timeout"></marker>
        <c><![CDATA[server_timeout() = integer() <optional>]]></c></tag>
      <item>
        <p>Asynchronous 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 <em>best before</em> time has been passed.
          This cleanup will be performed at regular intervals, defined 
          by the <c>server_timeout()</c> time.
          The information will have a <em>best before</em> time,
          defined by the <c>Expire</c> time given when calling the
          request function (see 
          <seealso marker="snmpm#async_get">async_get</seealso>,
          <seealso marker="snmpm#async_get_next">async_get_next</seealso> and 
          <seealso marker="snmpm#async_set">async_set</seealso>).</p>
        <p>Time in milli-seconds.</p>
        <p>Default is <c>30000</c>.</p>
      </item>

      <tag><marker id="manager_server_cbproxy"></marker>
        <c><![CDATA[server_cbproxy() = temporary (default) | permanent <optional>]]></c></tag>
      <item>
        <p>This option specifies how the server will handle callback calls.</p>
	<taglist>
	  <tag><marker id="manager_server_cbproxy_temporary"></marker>
	  <c><![CDATA[temporary (default)]]></c></tag>
	  <item>
	    <p>A temporary process will be created for each callback call. </p>
	  </item>
	  
	  <tag><marker id="manager_server_cbproxy_temporary"></marker>
	  <c><![CDATA[permanent]]></c></tag>
	  <item>
	    <p>With this the server will create a permanent (named) process that
	    in effect serializes all callback calls.</p>
	  </item>
	</taglist>
        <p>Default is <c>temporary</c>.</p>
      </item>

      <tag><marker id="manager_config"></marker>
        <c><![CDATA[manager_config() = [manager_config_opt()] <mandatory>]]></c></tag>
      <item>
        <p><c>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()}</c></p>
        <p>Defines specific config related options for the SNMP manager. </p>
        <p>For defaults see the options in <c>manager_config_opt()</c>.</p>
      </item>

      <tag><marker id="manager_config_dir"></marker>
        <c><![CDATA[manager_config_dir = dir() <mandatory>]]></c></tag>
      <item>
        <p>Defines where the SNMP manager configuration files are stored.</p>
      </item>

      <tag><marker id="manager_config_db_dir"></marker>
        <c><![CDATA[manager_db_dir = dir() <mandatory>]]></c></tag>
      <item>
        <p>Defines where the SNMP manager store persistent data.</p>
      </item>

      <tag><marker id="manager_config_repair"></marker>
        <c><![CDATA[manager_repair() = false | true | force <optional>]]></c></tag>
      <item>
        <p>Defines the repair option for the persistent database (if 
          and how the table is repaired when opened). </p>
        <p>Default is <c>true</c>.</p>
      </item>

      <tag><marker id="manager_config_auto_save"></marker>
        <c><![CDATA[manager_auto_save() = integer() | infinity <optional>]]></c></tag>
      <item>
        <p>The auto save interval. The table is flushed to disk
          whenever not accessed for this amount of time.</p>
        <p>Default is <c>5000</c>.</p>
      </item>

      <tag><marker id="manager_irb"></marker>
        <c><![CDATA[manager_irb() = auto | user | {user, integer()} <optional>]]></c></tag>
      <item>
        <p>This option defines how the manager will handle the sending of 
          response (acknowledgment) to received inform-requests. </p>
        <list type="bulleted">
          <item>
            <p><c>auto</c> - The manager will autonomously send response
              (acknowledgment&gt; to inform-request messages.</p>
          </item>
          <item>
            <p><c>{user, integer()}</c> - The manager will send response
              (acknowledgment) to inform-request messages when the 
              <seealso marker="snmpm_user#handle_inform">handle_inform</seealso> 
              function completes. The integer is the time, in milli-seconds, 
              that the manager will consider the stored inform-request info 
              valid.</p>
          </item>
          <item>
            <p><c>user</c> - Same as <c>{user, integer()}</c>, except that 
              the default time, 15000 milli-seconds, is used.</p>
          </item>
        </list>
        <p>See 
          <seealso marker="snmpm_network_interface">snmpm_network_interface</seealso>, 
          <seealso marker="snmpm_user">handle_inform</seealso> and 
          <seealso marker="snmp_manager_netif">definition of the manager net if</seealso> for more info.</p>
        <p>Default is <c>auto</c>.</p>
      </item>

      <tag><marker id="manager_mibs"></marker>
        <c><![CDATA[manager_mibs() = [string()] <optional>]]></c></tag>
      <item>
        <p>Specifies a list of MIBs (including path) and defines which MIBs
          are initially loaded into the SNMP manager. </p>
        <p>Default is <c>[]</c>.</p>
      </item>

      <tag><marker id="manager_net_if"></marker>
        <c><![CDATA[manager_net_if() = [manager_net_if_opt()] <optional>]]></c></tag>
      <item>
        <p><c>manager_net_if_opt() = {module, manager_net_if_module()} | 
          {verbosity, verbosity()} | 
          {options, manager_net_if_options()}</c></p>
        <p>Defines options specific for the SNMP manager network interface 
          entity. </p>
        <p>For defaults see the options in <c>manager_net_if_opt()</c>.</p>
      </item>

      <tag><marker id="manager_ni_opts"></marker>
        <c><![CDATA[manager_net_if_options() = [manager_net_if_option()] <optional>]]></c></tag>
      <item>
        <p><c>manager_net_if_option() = {bind_to, bind_to()} | 
          {sndbuf, sndbuf()} | 
          {recbuf, recbuf()} | 
          {no_reuse, no_reuse()} |
          {filter, manager_net_if_filter_options()}</c></p>
        <p>These options are actually specific to the used module.
	The ones shown here are applicable to the default 
	<c>manager_net_if_module()</c>. </p>
        <p>For defaults see the options in <c>manager_net_if_option()</c>.</p>
      </item>

      <tag><marker id="manager_ni_module"></marker>
        <c><![CDATA[manager_net_if_module() = atom() <optional>]]></c></tag>
      <item>
        <p>The module which handles the network interface part for the
	SNMP manager. It must implement the 
	<seealso marker="snmpm_network_interface">snmpm_network_interface</seealso> behaviour. </p>
        <p>Default is <c>snmpm_net_if</c>. </p>
      </item>

      <tag><marker id="manager_ni_filter_opts"></marker>
        <c><![CDATA[manager_net_if_filter_options() = [manager_net_if_filter_option()] <optional>]]></c></tag>
      <item>
	<p><c>manager_net_if_filter_option() = {module, manager_net_if_filter_module()}</c></p>
	<p>These options are actually specific to the used module.
	  The ones shown here are applicable to the default 
	  <c><![CDATA[manager_net_if_filter_module()]]></c>.</p>
	<p>For defaults see the options in 
          <c>manager_net_if_filter_option()</c>.</p>
      </item>

      <tag><marker id="manager_ni_filter_module"></marker>
        <c><![CDATA[manager_net_if_filter_module() = atom() <optional>]]></c></tag>
      <item>
	<p>Module which handles the network interface filter part for the
	  SNMP manager. Must implement the 
	  <seealso marker="snmpm_network_interface_filter">snmpm_network_interface_filter</seealso> behaviour.</p>
	<p>Default is <c>snmpm_net_if_filter</c>.</p>
      </item>

      <tag><marker id="manager_def_user_module"></marker>
        <c><![CDATA[def_user_module() = atom() <optional>]]></c></tag>
      <item>
        <p>The module implementing the default user. See the 
          <seealso marker="snmpm_user">snmpm_user</seealso> behaviour.</p>
        <p>Default is <c>snmpm_user_default</c>.</p>
      </item>

      <tag><marker id="manager_def_user_data"></marker>
        <c><![CDATA[def_user_data() = term() <optional>]]></c></tag>
      <item>
        <p>Data for the default user. Passed to the user when calling 
          the callback functions.</p>
        <p>Default is <c>undefined</c>.</p>
      </item>
    </taglist>

    <marker id="common_types"></marker>
    <p>Common config types:</p>
    <taglist>
      <tag><marker id="restart_type"></marker>
        <c>restart_type() = permanent | transient | temporary</c></tag>
      <item>
        <p>See <seealso marker="stdlib:supervisor#child_spec">supervisor</seealso> 
          documentation for more info.</p>
        <p>Default is <c>permanent</c> for the agent and <c>transient</c>
          for the manager.</p>
      </item>

      <tag><marker id="db_init_error"></marker>
        <c>db_init_error() = terminate | create | create_db_and_dir</c></tag>
      <item>
        <p>Defines what to do if the agent is unable to open an
          existing database file. <c>terminate</c> means that the
          agent/manager will terminate, <c>create</c> means that the 
          agent/manager will remove the faulty file(s) and create new ones,
          and <c>create_db_and_dir</c> means that the agent/manager will
          create the database file along with any missing parent directories
          for the database file.</p>
        <p>Default is <c>terminate</c>.</p>
      </item>

      <tag><marker id="prio"></marker>
        <c><![CDATA[priority() = atom() <optional>]]></c></tag>
      <item>
        <p>Defines the Erlang priority for all SNMP processes.</p>
        <p>Default is <c>normal</c>.</p>
      </item>

      <tag><marker id="versions"></marker>
        <c><![CDATA[versions() = [version()] <optional>]]></c></tag>
      <item>
        <p><c>version() = v1 | v2 | v3</c></p>
        <p>Which SNMP versions shall be accepted/used.</p>
        <p>Default is <c>[v1,v2,v3]</c>.</p>
      </item>

      <tag><marker id="verbosity"></marker>
        <c><![CDATA[verbosity() = silence | info | log | debug | trace <optional>]]></c></tag>
      <item>
        <p>Verbosity for a SNMP process. This specifies now much debug info
          is printed.</p>
        <p>Default is <c>silence</c>.</p>
      </item>

      <tag><marker id="bind_to"></marker>
        <c><![CDATA[bind_to() = bool() <optional>]]></c></tag>
      <item>
        <p>If <c>true</c>, net_if binds to the IP address.
          If <c>false</c>, net_if listens on any IP address on the host
          where it is running. </p>
        <p>Default is <c>false</c>.</p>
      </item>

      <tag><marker id="no_reuse"></marker>
        <c><![CDATA[no_reuse() = bool() <optional>]]></c></tag>
      <item>
        <p>If <c>true</c>, net_if does not specify that the IP
          and port address should be reusable. If <c>false</c>, 
          the address is set to reusable. </p>
        <p>Default is <c>false</c>.</p>
      </item>

      <tag><marker id="recbuf"></marker>
        <c><![CDATA[recbuf() = integer() <optional>]]></c></tag>
      <item>
        <p>Receive buffer size. </p>
        <p>Default value is defined by <c>gen_udp</c>.</p>
      </item>

      <tag><marker id="sndbuf"></marker>
        <c><![CDATA[sndbuf() = integer() <optional>]]></c></tag>
      <item>
        <p>Send buffer size. </p>
        <p>Default value is defined by <c>gen_udp</c>.</p>
      </item>

      <tag><marker id="note_store"></marker>
        <c><![CDATA[note_store() = [note_store_opt()] <optional>]]></c></tag>
      <item>
        <p><c>note_store_opt() = {timeout, note_store_timeout()} |  {verbosity, verbosity()}</c></p>
        <p>Specifies the options for the SNMP note store.</p>
        <p>For defaults see the options in <c>note_store_opt()</c>.</p>
      </item>

      <tag><marker id="ns_timeout"></marker>
        <c><![CDATA[note_store_timeout() = integer() <optional>]]></c></tag>
      <item>
        <p>Note cleanup time. When storing a note in the note store,
          each note is given lifetime. Every <c>timeout</c> the note_store
          process performs a GC to remove the expired note's. Time in
          milli-seconds.</p>
        <p>Default is <c>30000</c>.</p>
      </item>

      <tag><marker id="audit_trail_log"></marker>
        <c><![CDATA[audit_trail_log() [audit_trail_log_opt()] <optional>]]></c></tag>
      <item>
        <p><c>audit_trail_log_opt() = {type, atl_type()} | {dir, atl_dir()} |  {size, atl_size()} |  {repair, atl_repair()} | {seqno, atl_seqno()}</c></p>
        <p>If present, this option specifies the options for the 
          <em>audit trail logging</em>. The <c>disk_log</c> module is used 
          to maintain a wrap log. If present, the <c>dir</c> and 
          <c>size</c> options are mandatory.</p>
        <p>If not present, audit trail logging is not used.</p>
      </item>

      <tag><marker id="atl_type"></marker>
        <c><![CDATA[atl_type() = read | write | read_write <optional>]]></c></tag>
      <item>
        <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>
        <list type="bulleted">
          <item>If <c>write</c> is specified, only set requests are logged.  </item>
          <item>If <c>read</c> is specified, only get requests are logged.  </item>
          <item>If <c>read_write</c>, all requests are logged.  </item>
        </list>
        <p>For the manager:</p>
        <list type="bulleted">
          <item>If <c>write</c> is specified, only sent messages are logged.  </item>
          <item>If <c>read</c> is specified, only received messages are logged.  </item>
          <item>If <c>read_write</c>, both outgoing and incoming messages are 
           logged.  </item>
        </list>
        <p>Default is <c>read_write</c>.</p>
      </item>

      <tag><marker id="atl_dir"></marker>
        <c><![CDATA[atl_dir = dir() <mandatory>]]></c></tag>
      <item>
        <p>Specifies where the audit trail log should be stored.</p>
        <p>If <c>audit_trail_log</c> specifies that logging should take
          place, this parameter <em>must</em> be defined.</p>
      </item>

      <tag><marker id="atl_size"></marker>
        <c><![CDATA[atl_size() = {integer(), integer()} <mandatory>]]></c></tag>
      <item>
        <p>Specifies the size of the audit
          trail log.  This parameter is sent to <c>disk_log</c>.  </p>
        <p>If <c>audit_trail_log</c> specifies that logging should 
          take place, this parameter <em>must</em> be defined.</p>
      </item>

      <tag><marker id="atl_repair"></marker>
        <c><![CDATA[atl_repair() = true | false | truncate | snmp_repair <optional>]]></c></tag>
      <item>
        <p>Specifies if and how the audit trail log shall be repaired
          when opened. Unless this parameter has the value <c>snmp_repair</c>
          it is sent to <c>disk_log</c>. If, on the other hand, the value is
          <c>snmp_repair</c>, 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 <em>moves it aside</em> for later off-line 
          analysis.</p>
        <p>Default is <c>true</c>.</p>
      </item>

      <tag><marker id="atl_seqno"></marker>
        <c><![CDATA[atl_seqno() = true | false <optional>]]></c></tag>
      <item>
        <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 <c>false</c>.</p>
      </item>
    </taglist>
  </section>

  <section>
    <title>Modifying the Configuration Files</title>
    <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 <c>crypto</c> application.</p>
    <pre>
1> 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>
  </section>

  <section>
    <title>Starting the application</title>
    <p>Start Erlang with the command:</p>
    <code type="none">
erl -config /tmp/snmp/sys
    </code>
    <p>If authentication or encryption is used (SNMPv3 only), start
      the <c>crypto</c> application.  If this step is forgotten, the
      agent will not start, but report a
      <c>{config_error,{unsupported_crypto,_}}</c> error.</p>
    <pre>
1> <input>application:start(crypto).</input>
ok
    </pre>
    <pre>
2> <input>application:start(snmp).</input>
ok
    </pre>
  </section>

  <section>
    <marker id="verbosity"></marker>
    <title>Debugging the application</title>
    <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 
      <c>snmpa:verbosity/2</c> and <c>snmpm:verbosity/2</c> function(s) 
      and/or using 
      <seealso marker="#configuration_params">configuration parameters</seealso>.
      The verbosity itself has several <em>levels</em>: <c>silence | info |  log | debug | trace</c>. For the lowest verbosity <c>silence</c>, 
      nothing is printed. The higher the verbosity, the more is printed.
      Default value is always <c>silence</c>.</p>
    <pre>
3> <input>snmpa:verbosity(master_agent, log).</input>
ok
5> <input>snmpa:verbosity(net_if, log).</input>
ok
6> 
%% 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>

    <p>Other useful function(s) for debugging the agent are: </p>
    <taglist>
      <tag><c><![CDATA[snmpa:info/0,1]]></c></tag>
      <item>
        <p><seealso marker="snmpa#info">info</seealso> is used to retrieve a list of miscellaneous agent information.</p>
      </item>

      <tag><c><![CDATA[snmpa:which_aliasnames/0]]></c></tag>
      <item>
        <p><seealso marker="snmpa#which_aliasnames">which_aliasnames</seealso> is used to retrieve a list of all alias-names known to the agent. </p>
      </item>

      <tag><c><![CDATA[snmpa:which_tables/0]]></c></tag>
      <item>
        <p><seealso marker="snmpa#which_tables">which_tables</seealso> is used to retrieve a list of all (MIB) tables known to the agent. </p>
      </item>

      <tag><c><![CDATA[snmpa:which_variables/0]]></c></tag>
      <item>
        <p><seealso marker="snmpa#which_variables">which_variables</seealso> is used to retrieve a list of all (MIB) variables known to the agent. </p>
      </item>

      <tag><c><![CDATA[snmpa:which_notifications/0]]></c></tag>
      <item>
        <p><seealso marker="snmpa#which_notifications">which_notifications</seealso> is used to retrieve a list of all (MIB) notifications/traps known to the agent. </p>
      </item>

      <tag><c><![CDATA[snmpa:restart_worker/0,1]]></c></tag>
      <item>
        <p><seealso marker="snmpa#restart_worker">restart_worker</seealso> is used to restart the worker process of a multi-threaded agent. </p>
      </item>

      <tag><c><![CDATA[snmpa:restart_set_worker/0,1]]></c></tag>
      <item>
        <p><seealso marker="snmpa#restart_set_worker">restart_set_worker</seealso> is used to restart the set-worker process of a multi-threaded agent. </p>
      </item>

      <tag><c><![CDATA[snmpa_local_db:print/0,1,2]]></c></tag>
      <item>
        <p>For example, this function can show the counters 
          <c>snmpInPkts</c> and <c>snmpOutPkts</c>.</p>
      </item>
    </taglist>

    <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><c><![CDATA[snmpa:print_mib_info()]]></c></p>
    <p>See 
    <seealso marker="snmpa#print_mib_info">print_mib_info/0</seealso>, 
    <seealso marker="snmpa#print_mib_tables">print_mib_tables/0</seealso>
    or
    <seealso marker="snmpa#print_mib_variables">print_mib_variables/0</seealso> 
    for more info. </p>
      
  </section>
</chapter>