netdbm(8)

NAME
netdbm - perl based indexer for RIPE like databases

SYNOPSIS

netdbm [ -c ] [ -p ] [ -V ] databasefile

DESCRIPTION

netdbm is part of the RIPE database software package. It is a perl script that will read the databasefile for database entries defined in a configuration file (see dbconfig(5)). It will then, also according to that configuration file define the keys for that entry, and will generate DBM index files for that database. These indexes can then be used by lookup programs like whoisd(8). The indexing does not have to be finished before lookup programs can use the indexes. For "split" databases (see DBFILE in dbconfig(5)) each file can be indexed seperately. Please note that netdbm will NOT generate any lock files for the databases it is indexing, therefore you should never use netdbm for indexing databases that can be updated using dbupdate(8). Use cleandb(8) for that purpose. netdbm is normally used to index read-only (or secondary) databases.

OPTIONS

-c  index this database classless. Databases that contain objects that have IP network numbers (in range format, classful or prefix/length format) as (part of) their key need to be indexed classless. This option will cause netdbm to do a classless index ONLY. You need to run a normal index (without this option) as well for any lookups to succeed. The classless index could generate a reasonable amount of index files depending on the database file. NB Any IP number lookups in databases that are not indexed using this option will fail.

-p  prime the database. When generating classless indexing in some cases it improves index and lookup performance is a certain set of dummy entries is inserted into the index. These entries are only inserted when this option is present. These dummy entries will never be shown in lookups. This option should only be used when you have a database that needs classless indexing (ie in combination with -c) and you have a reasonable size database. It will slow down indexing for databases with up to 4000 entries, and speed up any bigger database. It will insert some 4000 dummy entries.

-V  be verbose. netdbm will show what it is doing and will report every 100 objects in the database file it has processed and indexed.

ENVIRONMENT

The configuration file netdbm and all the other RIPE database software uses can be hardcoded in at installation time (usually default config) or set in environment variable RIPEDBCNF

EXAMPLES

The following command:

    example% netdbm -V -c -p ripe.db

would index ASCII file ripe.db (containing database entries) by generating the corresponding DBM files (extensions .dir and .pag). It will also generate quite some files of the form ripe.db.in.193.89.0.0.16 or a similar form. These files are created only when a database is indexed classless and are generated due to a limitation in DBM. See the installation documentation for more details. Please note that this example would ONLY generate a classless index. You would need to run the same command without the -c and -p option to have a completely indexed database.

SEE ALSO
dbm(3X) whoisd(8) dbconfig(5) dbupdate(8)

BUGS

The indexing is fairly slow. The largest we have done is indexing a 10 Mbyte file on a SUN ELC, which took 2 hours for a classless index. It not only depends on size, but also on the number and average size of the database entries. Using the -p option for classless indexes speeds up the indexing and lookups for reasonable sized database significantly.

AUTHOR

Marten Terpstra, RIPE Network Coordination Centre <marten@ripe.net>