Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmpa_local_db(3erl) [linux man page]

snmpa_local_db(3erl)					     Erlang Module Definition					      snmpa_local_db(3erl)

NAME
snmpa_local_db - The SNMP built-in database DESCRIPTION
The module snmpa_local_db contains functions for implementing tables (and variables) using the SNMP built-in database. The database exists in two instances, one volatile and one persistent. The volatile database is implemented with ets. The persistent database is implemented with dets. There is a scaling problem with this database. * Insertions and deletions are inefficient for large tables. This problem is best solved by using Mnesia instead. The following functions describe the interface to snmpa_local_db . Each function has a Mnesia equivalent. The argument NameDb is a tuple {Name, Db} where Name is the symbolic name of the managed object (as defined in the MIB), and Db is either volatile or persistent . mnesia is not possible since all these functions are snmpa_local_db specific. COMMON DATA TYPES
In the functions defined below, the following types are used: * NameDb = {Name, Db} * Name = atom(), Db = volatile | persistent * RowIndex = [int()] * Cols = [Col] | [{Col, Value}], Col = int(), Value = term() where RowIndex denotes the last part of the OID, that specifies the index of the row in the table. Cols is a list of column numbers in case of a get operation, and a list of column numbers and values in case of a set operation. EXPORTS
dump() -> ok | {error, Reason} Types Reason = term() This function can be used to manually dump the database to file. match(NameDb, Pattern) Performs an ets/dets matching on the table. See Stdlib documentation, module ets, for a description of Pattern and the return val- ues. print() print(TableName) print(TableName, Db) Types TableName = atom() Prints the contents of the database on screen. This is useful for debugging since the STANDARD-MIB and OTP-SNMPEA-MIB (and maybe your own MIBs) are stored in snmpa_local_db . TableName is an atom for a table in the database. When no name is supplied, the whole database is shown. table_create(NameDb) -> bool() Creates a table. If the table already exist, the old copy is destroyed. Returns false if the NameDb argument is incorrectly specified, true otherwise. table_create_row(NameDb, RowIndex, Row) -> bool() Types Row = {Val1, Val2, ..., ValN} Val1 = Val2 = ... = ValN = term() Creates a row in a table. Row is a tuple with values for all columns, including the index columns. table_delete(NameDb) -> void() Deletes a table. table_delete_row(NameDb, RowIndex) -> bool() Deletes the row in the table. table_exists(NameDb) -> bool() Checks if a table exists. table_get_row(NameDb, RowIndex) -> Row | undefined Types Row = {Val1, Val2, ..., ValN} Val1 = Val2 = ... = ValN = term() Row is a tuple with values for all columns, including the index columns. SEE ALSO
ets(3erl), dets(3erl), snmp_generic(3erl) Ericsson AB snmp 4.19 snmpa_local_db(3erl)

Check Out this Related Man Page

snmp_notification_mib(3erl)				     Erlang Module Definition				       snmp_notification_mib(3erl)

NAME
snmp_notification_mib - Instrumentation Functions for SNMP-NOTIFICATION-MIB DESCRIPTION
The module snmp_notification_mib implements the instrumentation functions for the SNMP-NOTIFICATION-MIB, and functions for configuring the database. The configuration files are described in the SNMP User's Manual. EXPORTS
configure(ConfDir) -> void() Types ConfDir = string() This function is called from the supervisor at system start-up. Inserts all data in the configuration files into the database and destroys all old rows with StorageType volatile . The rows created from the configuration file will have StorageType nonVolatile . If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with reason configuration_error . ConfDir is a string which points to the directory where the configuration files are found. The configuration file read is: notify.conf . reconfigure(ConfDir) -> void() Types ConfDir = string() Inserts all data in the configuration files into the database and destroys all old data, including the rows with StorageType non- Volatile . The rows created from the configuration file will have StorageType nonVolatile . Thus, the data in the SNMP-NOTIFICATION-MIB, after this function has been called, is from the configuration files. If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with reason configuration_error . ConfDir is a string which points to the directory where the configuration files are found. The configuration file read is: notify.conf . add_notify(Name, Tag, Type) -> Ret Types Name = string() Tag = string() Type = trap | inform Ret = {ok, Key} | {error, Reason} Key = term() Reason = term() Adds a notify definition to the agent config. Equivalent to one line in the notify.conf file. delete_notify(Key) -> Ret Types Key = term() Ret = ok | {error, Reason} Reason = term() Delete a notify definition from the agent config. Ericsson AB snmp 4.19 snmp_notification_mib(3erl)
Man Page