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
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2004</year><year>2013</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>snmpa_supervisor</title>
<prepared></prepared>
<responsible></responsible>
<docno></docno>
<approved></approved>
<checked></checked>
<date></date>
<rev></rev>
<file>snmpa_supervisor.xml</file>
</header>
<module>snmpa_supervisor</module>
<modulesummary>A supervisor for the SNMP agent Processes</modulesummary>
<description>
<p>This is the top supervisor for the agent part of the SNMP
application. There is always one supervisor at each node with
an SNMP agent (master agent or sub-agent).
</p>
</description>
<funcs>
<func>
<name>start_sub_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}</name>
<fsummary>Start the SNMP supervisor for sub-agents only</fsummary>
<type>
<v>Opts = [opt()]</v>
<v>opt() = {db_dir, string()} | ...</v>
</type>
<desc>
<p>Starts a supervisor for the SNMP agent system without a
master agent. The supervisor starts all involved SNMP
processes, but no agent processes. Sub-agents should be
started by calling <c>start_sub_agent/3</c>.
</p>
<p><c>db_dir</c> is mandatory.</p>
<p>See <seealso marker="snmp_config#configuration_params">configuration parameters</seealso> for
a description of the options.</p>
</desc>
</func>
<func>
<name>start_master_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}</name>
<fsummary>Start the SNMP supervisor for all agents</fsummary>
<type>
<v>Opts = [opt()]</v>
<v>opt() = {db_dir, string()} | {config, ConfOpts()} | ...</v>
<v>ConfOpts = [conf_opts()]</v>
<v>conf_opts() = {dir, string()} | ...</v>
<v>Reason = term()</v>
</type>
<desc>
<p>Starts a supervisor for the SNMP agent system. The
supervisor starts all involved SNMP processes, including the
master agent. Sub-agents should be started by calling
<c>start_subagent/3</c>.
</p>
<p><c>db_dir</c> is mandatory.</p>
<p><c>dir</c> in config is mandatory.</p>
<p>See <seealso marker="snmp_config">snmp config</seealso> for
a description of the options.</p>
</desc>
</func>
<func>
<name>start_sub_agent(ParentAgent,Subtree,Mibs) -> {ok, pid()} | {error, Reason}</name>
<fsummary>Start a sub-agent</fsummary>
<type>
<v>ParentAgent = pid()</v>
<v>SubTree = oid()</v>
<v>Mibs = [MibName]</v>
<v>MibName = [string()]</v>
</type>
<desc>
<p>Starts a sub-agent on the node where the function is
called. The <c>snmpa_supervisor</c> must be running.
</p>
<p>If the supervisor is not running, the function fails with the
reason <c>badarg</c>.</p>
</desc>
</func>
<func>
<name>stop_sub_agent(SubAgent) -> ok | no_such_child</name>
<fsummary>Stop a sub-agent</fsummary>
<type>
<v>SubAgent = pid()</v>
</type>
<desc>
<p>Stops the sub-agent on the node where the function is
called. The <c>snmpa_supervisor</c> must be running.
</p>
<p>If the supervisor is not running, the function fails with the
reason <c>badarg</c>.</p>
</desc>
</func>
</funcs>
</erlref>
|