La commande 'netcdctrl' permet de contrôler les informations contenues dans le cache du démon 'netcd'.

 

La syntaxe de base est la suivante :

netcdctrl -t dns -e hosts -a /tmp/cacheDNS.log

Cette commande permet de stocker dans le fichier /tmp/cacheDNS.log les informations du cache de type DNS et pour les entrées Hosts( Seule option disponible avec le type 'NDS')

Le démon netcd doit être actif( Vérifier avec 'lssrc -s netcd')

 

Le fichier de configuration du démon netcd est /etc/netcd.conf, qui peut contenir une seule ligne telle que la suivante :

cache dns hosts 128 60

 

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: Il faut posséder les droits 'root' pour lancer cette commande.

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
  • nisplus
  • 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

  1. To dump all the NIS caches in binary format, enter:

netcdctrl -t nis -e all -b /tmp/netcd_nis_binary_dump

  1. To dump the local cache for hosts in ASCII format, enter:

netcdctrl -t local -e hosts -a /tmp/netcd_dns_hosts

  1. To set the level of logging to obtain all possible traces, enter:

netcdctrl -l 7

 

 

 

 

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone