table of contents
other versions
- wheezy 1:15.b.1-dfsg-4+deb7u1
- wheezy-backports 1:17.3-dfsg-4~bpo70+1
- jessie 1:17.3-dfsg-4+deb8u1
- jessie-backports 1:19.2.1+dfsg-2~bpo8+1
- testing 1:19.2.1+dfsg-2
- unstable 1:19.2.1+dfsg-2
- experimental 1:19.3.1+dfsg-1
snmpa_local_db(3erl) | Erlang Module Definition | snmpa_local_db(3erl) |
NAME¶
snmpa_local_db - The SNMP built-in databaseDESCRIPTION¶
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.
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()
EXPORTS¶
dump() -> ok | {error, Reason}
Types:
Reason = term()
This function can be used to manually dump the database to file.
Performs an ets/dets matching on the table. See Stdlib documentation, module
ets, for a description of Pattern and the return values.
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.
Creates a table. If the table already exist, the old copy is destroyed.
Returns false if the NameDb argument is incorrectly specified,
true otherwise.
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.
Deletes a table.
Deletes the row in the table.
Checks if a table exists.
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)snmp 4.22 | Ericsson AB |