netcdctrl Command

Purpose

Manages the network caching (netcd) daemon caches.

Syntax

netcdctrl [ -t type -e type [ -a file | -b file | -f | -s file ]] [ -l level ] [ -h ]

Description

The netcdctrl command provides the following functions:
  • Dumps specific caches in ASCII format: provides a readable output of the caches content.
  • Dumps specific caches in binary format. The binary format can be used later to reload the caches when starting the netcd daemon. Dumping avoids reloading the caches from the beginning.
  • Displays statistics on caches use. The caches are tables, and the access to these tables is controlled by a hash algorithm. This output helps you size the table for a given resolution and a given map using the netcd configuration file.
  • Flushes specific caches. The content of the specified caches are erased, and local caches are then reloaded. Other caches are reloaded by resolver's responses.
  • Changes the logging level dynamically.
Requirement: You must have the root authority to issue the netcdctrl command.

Flags

Item Description
-a file Specifies ASCII dumping of the specified caches.
-b file Specifies binary dumping of the specified caches (local caches are not dumped).
-e type Specifies the map. The type parameter can be one of the following values:
  • hosts
  • protocols
  • servers
  • networks
  • netgroup
  • a yellow pages map name (for example passwd.byname or group.bygid)
  • all
Use this flag only with the -b, -a, -f and -s flags.
-f Flushes the specified caches.
-h Displays help information.
-l level Changes the logging level of the netcd daemon. The level value must be an integer of 0 through 7.
-s file Provides statistics on caches use.
-t type Specifies the resolution. The type parameter can be one of the following values:
  • local
  • dns
  • nis
  • yp
  • ulm
  • a specific module name as provided in the netcd.conf file
  • all
Use his flag only with the -b, -a, -f and -s flags.

Examples

  1. To flush all the caches, enter:
    netcdctrl -t all -e all -f
  2. To dump all the NIS caches in binary format, enter:
    netcdctrl -t nis -e all -b /tmp/netcd_nis_binary_dump
  3. To dump the local cache for hosts in ASCII format, enter:
    netcdctrl -t local -e hosts -a /tmp/netcd_dns_hosts
  4. To set the level of logging to obtain all possible traces, enter:
    netcdctrl -l 7