home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

-d38.20

Trace database map lookupsdebug command-line switch

The -d38.20 debugging switch traces many different map lookups. The getcanonname( ) routine looks up a hostname and tries to canonify it:

getcanonname(host), trying dbtype 
getcanonname(host), found
getcanonname(host), failed, stat=error 

Here, host is the hostname that is being looked up, and dbtype is one of files, nis, nisplus, dns, or netinfo. If the canonical name is not found, the error shows one of the errors listed in <sysexits.h>. The process of canonifying the name is handled by calling special subroutines based on the dbtype:

text_getcanonname(host) dbtype is files 
nis_getcanonname(host) dbtype is nis 
nisplus_getcanonname(host), qbuf=query dbtype is nisplus
dns_getcanonname(host, flag) dbtype is dns, printed with -d8.2
ni_getcanonname(host) dbtype is netinfo 

The nisplus_getcanonname( ) routine is far more verbose than the other. In addition to the preceding information, the -d38.20 switch also prints:

nisplus_getcanonname(host), got count entries, all but first ignored 
nisplus_getcanonname(host), found in directory "nisdir" 
nisplus_getcanonname(host), found result 
nisplus_getcanonname(host), failed, status=nsistatus, nsw_stat=errno  

The -d38.20 debugging switch also traces general lookups in various kinds of databases. Again note that nisplus is more verbose than the others:

ndbm_map_lookup(name, key) 
db_map_lookup(name, key) 
nis_map_lookup(name, key) 
nisplus_map_lookup(name, key) 
qbuf=query
nisplus_map_lookup(key), got count entries, additional entries ignored 
nisplus_map_lookup(key), found value 
nisplus_map_lookup(key), failed
hes_map_lookup(name, key) 
ni_map_lookup(name, key) 
stab_lookup(name, key) 
impl_map_lookup(name, key) 
user_map_lookup(name, key) 
prog_map_lookup(name, key) 
prog_map_lookup(name): empty answer
seq_map_lookup(name, key) 

Here, the name is either the name you gave to the database map with the K configuration command or one assigned internally by sendmail (such as aliases.files). The key is the item being looked up. The file is the pathname of the file that contains the database.

    Previous Section Next Section