View Source snmpa_supervisor (snmp v5.15)

A supervisor for the SNMP agent Processes

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

Summary

Functions

start_master_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}

start_sub_agent(ParentAgent,Subtree,Mibs) -> {ok, pid()} | {error, Reason}

start_sub_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}

stop_sub_agent(SubAgent) -> ok | no_such_child

Functions

start_master_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}

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.

Link to this function

start_sub_agent(ParentAgent, Subtree, Mibs)

View Source

start_sub_agent(ParentAgent,Subtree,Mibs) -> {ok, pid()} | {error, Reason}

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.

start_sub_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason}

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.

Link to this function

stop_sub_agent(SubAgentPid)

View Source

stop_sub_agent(SubAgent) -> ok | no_such_child

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.