snmpa_supervisor(3)
β¨ NAME β¨
snmpa_supervisor β a supervisor for the SNMP agent Processes π
π¦ DESCRIPTION π¦
Okay bestie, so this is the top supervisor for the agent part of the SNMP application. Like, the big boss energy one. π
There is always one supervisor at each node with an SNMP agent (master agent or sub-agent). No cap β every node that's running an agent has exactly one of these, periodt.
πΈ FUNCTIONS πΈ
start_master_sup(Opts) -> {ok, Pid} | {error, Reason}
start_master_sup(Opts) -> {ok, Pid} | {error, Reason}
when
Opts :: [Opt],
Opt ::
{db_dir, string()} |
{config, ConfOpts} |
{atom(), term()},
ConfOpts :: [ConfOpt],
ConfOpt ::
{dir, string()} | {atom(), term()},
Pid :: pid(),
Reason :: {already_started, Pid} | term().
Starts a supervisor for the SNMP agent system π. This one spins up all the involved SNMP processes, including the master agent. Sub-agents? Those don't get auto-started here β you gotta call start_subagent/3 yourself. iykyk.
db_diris mandatory. Like, nodb_dir, no vibes. π ββοΈdirinconfigis mandatory too. Both of them. Mandatory. Both.- See snmp config for a description of the options π
start_sub_agent(ParentAgent, Subtree, Mibs) -> {ok, Pid} | {error, Reason}
start_sub_agent(ParentAgent, Subtree, Mibs) ->
{ok, Pid} | {error, Reason}
when
ParentAgent :: pid(),
Subtree :: snmp:oid(),
Mibs :: [MibName],
MibName :: string(),
Pid :: pid(),
Reason :: term().
Starts a sub-agent on the node where the function is called π. Heads up though: 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, Reason}
start_sub_sup(Opts) -> {ok, Pid} | {error, Reason}
when
Opts :: [Opt],
Opt ::
{db_dir, snmp:dir()} | {atom(), term()},
Pid :: pid(),
Reason :: {already_started, Pid} | term().
Starts a supervisor for the SNMP agent system without a master agent π§. So it starts all the involved SNMP agent processesβ¦ but no agent processes. Bestie, yes, that is the sentence. Read it again, it's giving exactly what it says. π
Sub-agents should be started by calling start_sub_agent/3.
db_diris mandatory. Again. Always. π- See configuration parameters for a description of the options β¨
stop_sub_agent(SubAgentPid) -> ok | no_such_child
stop_sub_agent(SubAgentPid) -> ok | no_such_child
when SubAgentPid :: pid().
Stops the sub-agent on the node where the function is called π«Ά. And yep, once again: the snmpa_supervisor must be running.
If the supervisor is not running, the function fails with the reason badarg. π
Ericsson AB made this, it's from snmp version 5.20.5, and it's the snmpa_supervisor page (the (3) one, Erlang Module Definition flavour π). That's the whole thing bestie, go start some supervisors, you got this πβ¨π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms