[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

nisping Command

Purpose

Pings replica servers, telling them to ask the master server for updates immediately. When a replica responds, nisping updates the replica's entry in the root master server's niscachemgr cache file, /var/nis/NIS_SHARED_DIRCACHE.

Note: The replicas normally wait a couple of minutes before executing this request.

Syntax

To Display the Time of the Last Update

nisping [ -u domain ]

To Ping Replicas

nisping [ -H hostname ] [domain]

To Checkpoint a Directory

nisping [ -C hostname ] [domain ]

Description

Before pinging, the command checks the time of the last update received by each replica. If it is the same as the last update sent by the master, it does not ping the replica.

The nisping command can also checkpoint a directory. This consists of telling each server in the directory, including the master, to update its information on disk from the domain's transaction log.

Flags

-u domain Display the time of the last update; no servers are sent a ping.
-H hostname Only the host hostname is sent the ping, checked for an update time, or checkpointed.
-C hostname Send a request to checkpoint rather than a ping to each server. The servers schedule to commit all the transactions to stable storage.

Examples

Displaying the Time of the Last Update

Use the -u flag. It displays the update times for the master and replicas of the local domain, unless you specify a different domain name. It does not perform a ping.

/usr/lib/nis/nisping -u [domain]

Here is an example:

rootmaster# /usr/lib/nisping -u org_dir
	Last updates for directory wiz.com.:
 Master server is rootmaster.wiz.com.
        Last update occurred at Wed Nov 25 10:53:37 1992
 Replica server is rootreplica1.wiz.com.
        Last update seen was Wed Nov 25 10:53:37 1992

Pinging Replicas

You can ping all the replicas in a domain, or one in particular. To ping all the replicas, use the command without options:

/usr/lib/nis/nisping

To ping all the replicas in a domain other than the local domain, append a domain name:

/usr/lib/nis/nisping domainname

Here is an example that pings all the replicas of the local domain, wiz.com.:

rootmaster# /usr/lib/nis/nisping org_dir
 Pinging replicas serving directory wiz.com.:
 Master server is rootmaster.wiz.com.
        Last update occurred at Wed Nov 25 10:53:37 1992
 Replica server is rootreplica1.wiz.com.
        Last update seen was Wed Nov 18 11:24:32 1992

        Pinging ... rootreplica1.wiz.com.

Since the update times were different, it proceeds with the ping. If the times had been identical, it would not have sent a ping.

You can also ping all the tables in all the directories on a single specified host. To ping all the tables in all the directories of a particular host, us the -a flag:

/usr/lib/nis/nisping -a hostname

Checkpointing a Directory

To checkpoint a directory, use the -C flag:

/usr/lib/nis/nisping -C directory-name

All the servers that support a domain, including the master, transfer their information from their .log files to disk. This erases the log files and frees disk space. While a server is checkpointing, it will still answer requests for service, but it will be unavailable for updates.

Here is an example of nisping output:

rootmaster# /usr/lib/nis/nisping -C
Checkpointing replicas serving directory wiz.com. :
 Master server is rootmaster.wiz.com.
        Last update occurred at Wed May 25 10:53:37 1995
 Master server is rootmaster.wiz.com.
 checkpoint has been scheduled with rootmaster.wiz.com.
 Replica server is rootreplica1.wiz.com.
        Last update seen was Wed May 25 10:53:37 1995
 Replica server is rootreplica1.wiz.com.
 checkpoint has been scheduled with rootmaster.wiz.com.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]