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.
nisping [ -u domain ]
nisping [ -H hostname ] [domain]
nisping [ -C hostname ] [domain ]
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.
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
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
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.