---
name: "snmpa_supervisor"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/snmpa_supervisor"
---

# snmpa\_supervisor(3erl)

A supervisor for the SNMP agent Processes

## NAME

snmpa\_supervisor - A supervisor for the SNMP agent Processes

## DESCRIPTION

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

## EXPORTS

**start\_sub\_sup(Opts) -\> {ok, pid()} \| {error, {already\_started, pid()}} \| {error, Reason}**\

Types:

Opts = \[opt()\]\
 opt() = {db\_dir, string()} \| ...\

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 *start\_sub\_agent/3*.

*db\_dir* is mandatory.

See configuration parameters for a description of the options.

**start\_master\_sup(Opts) -\> {ok, pid()} \| {error, {already\_started, pid()}} \| {error, Reason}**\

Types:

Opts = \[opt()\]\
 opt() = {db\_dir, string()} \| {config, ConfOpts()} \| ...\
 ConfOpts = \[conf\_opts()\]\
 conf\_opts() = {dir, string()} \| ...\
 Reason = term()\

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 *start\_subagent/3*.

*db\_dir* is mandatory.

*dir* in config is mandatory.

See snmp config for a description of the options.

**start\_sub\_agent(ParentAgent,Subtree,Mibs) -\> {ok, pid()} \| {error, Reason}**\

Types:

ParentAgent = pid()\
 SubTree = oid()\
 Mibs = \[MibName\]\
 MibName = \[string()\]\

Starts a sub-agent on the node where the function is called. The *snmpa\_supervisor* must be running.

If the supervisor is not running, the function fails with the reason *badarg*.

**stop\_sub\_agent(SubAgent) -\> ok \| no\_such\_child**\

Types:

SubAgent = pid()\

Stops the sub-agent on the node where the function is called. The *snmpa\_supervisor* must be running.

If the supervisor is not running, the function fails with the reason *badarg*.
