The module
The following data types are used in the functions below:
Monitor the SNMP manager. In case of a crash, the calling (monitoring) process will get a 'DOWN' message (see the erlang module for more info).
Turn off monitoring of the SNMP manager.
Request a notification (message) when the SNMP manager has started.
The
The
A client application that is dependent on the SNMP manager will use this function in order to be notified of when the manager has started. There are two situations when this is useful:
During the start of a system, when a client application could start prior to the SNMP manager but is dependent upon it, and therefor has to wait for it to start.
When the SNMP manager has crashed, the dependent client application has to wait for the SNMP manager to be restarted before it can reconnect.
The function returns the pid() of a handler process, that does the supervision on behalf of the client application. Note that the client application is linked to this handler.
This function is used in conjunction with the monitor function.
Cancel a previous request to be notified of SNMP manager start.
Register the manager entity (=user) responsible for specific agent(s).
The argument
The type of
Register the monitored manager entity (=user) responsible for specific agent(s).
The process performing the registration will be monitored. Which means that if that process should die, all agents registered by that user process will be unregistered. All outstanding requests will be canceled.
The argument
The type of
Unregister the user.
Get a list of the identities of all registered users.
Explicitly instruct the manager to handle this agent, with
Called to instruct the manager that this agent shall be handled.
This function is used when the user knows in advance which agents
the manager shall handle.
Note that there is an alternate way to do the same thing:
Add the agent to the manager config files (see
The type of
Note that if no
Note that if no
Unregister the agent.
Retrieve agent config.
Update agent config. The function
See function
Get a list of all registered agents or all agents registered by a specific user.
Explicitly instruct the manager to handle this USM user.
Note that there is an alternate way to do the same thing:
Add the usm user to the manager config files (see
The type of
Unregister this USM user.
Retrieve usm user config.
Update usm user config.
Get a list of all registered usm users.
Get a list of all registered usm users with engine-id
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case.
The send option
Some of the send options (
For
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. R is the actual reason in this case.
For
Asynchronous
The reply, if it arrives, will be delivered to the user
through a call to the snmpm_user callback function
The send option
The send option
Some of the send options (
Asynchronous
The reply, if it arrives, will be delivered to the user
through a call to the snmpm_user callback function
The
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case.
The send option
Some of the send options (
For
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. R is the actual reason in this case.
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The send option
The send option
Some of the send options (
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case.
When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs.
The send option
Some of the send options (
For
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. R is the actual reason in this case.
When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs.
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The send option
When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs.
The send option
Some of the send options (
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The
When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs.
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case.
The send option
Some of the send options (
For
Synchronous
When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. R is the actual reason in this case.
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The send option
The send option
Some of the send options (
Asynchronous
The reply will be delivered to the user through a call
to the snmpm_user callback function
The
Cancel a previous asynchronous request.
Converts an Audit Trail Log to a readable text file.
The
Converts an Audit Trail Log to a readable format and
prints it on stdio.
Changes the log size of the Audit Trail Log. The application must be configured to use the audit trail log function. Please refer to disk_log(3) in Kernel Reference Manual for a description of how to change the log size.
The change is permanent, as long as the log is not deleted. That means, the log size is remembered across reboots.
Changes the run-time Audit Trail log type.
Note that this has no effect on the application configuration as defined by configuration files, so a node restart will revert the config to whatever is in those files.
This function is primarily useful in testing/debugging scenarios.
Load a
Dir = code:priv_dir(my_app) ++ "/mibs/",
snmpm:load_mib(Dir ++ "MY-MIB").
Unload a
Dir = code:priv_dir(my_app) ++ "/mibs/",
snmpm:unload_mib(Dir ++ "MY-MIB").
Get a list of all the mib's loaded into the manager.
Transform a alias-name to its oid.
Note that an alias-name is only unique within the mib, so when loading several mib's into a manager, there might be several instances of the same aliasname.
Transform a oid to its aliasname.
Retreive the type (asn1 bertype) of an oid.
Backup persistent data handled by the manager.
BackupDir cannot be identical to DbDir.
Returns a list (a dictionary) containing information about the manager. Information includes statistics counters, miscellaneous info about each process (e.g. memory allocation), and so on.
Sets verbosity for the designated process. For the lowest
verbosity
This utility function is used to create a formatted (pretty printable) string of the error reason received from either:
The
The