Attributes include the following:
Each NIS map includes a timestamp that indicates when the map was built. Viewing this timestamp can be valuable when troubleshooting.
This timestamp is used by NIS programs such as ypxfr on a copy-only server to compare its map versions with those on a master. If the master version has a newer timestamp, the newer version is retrieved.
It may be useful to view this timestamp to ensure synchronization of maps. This timestamp is readable as a string whose value is the standard UNIX system timestamp (seconds since 1970). If this value on a map on a copy-only server is less than that on the map on the master server, the master is newer and hasn't been transferred. If the value on the copy-only server is larger than the master, it may reveal that a bogus master exists somewhere that is updating nonmaster servers.
To view the timestamp, enter:
ypmatch YP_LAST_MODIFIED mapnameThe date is displayed as:
YP_LAST_MODIFIED : 0736625147
Because of file naming conventions, names of existing NIS maps may conflict with names you want to use for another map or another file. To avoid conflicts, you can assign an alias. If this does not work, use a different name for the newer file to avoid having to change the name of an existing map.
If you must change the name of an existing map, follow this procedure:
If you are going to use the old name for a different NIS map, remove the old map from the master server; create and propagate the new map, using the old name. You will not need to add the name to the YP_MAP_X_LATE files on all NIS servers because it is already there.
If you recall from ``Using cron to propagate maps'', you can run ypxfr from a crontab file to update maps on a regular schedule. This should be set up to ensure that all NIS servers within an NIS domain are synchronized (using the same map, the most current one). The schedule with which a map is updated will depend on how frequently the map is expected to change.
If the frequency of updates to a map changes, change the frequency with which the map is updated by the crontab file. The example files provided are set up to group updates in the same time frequency. To change the frequency with which a map is updated, move its ypxfr entry to a crontab file with a frequency closer to that needed or create a new crontab file if an existing one does not fit.
For example, the following crontab entry will update a map once a day:
0 0 * * * /etc/yp/ypxfr1pdyTo have cron update the map twice a day instead of once a day, change the map's crontab entry to read as follows:
0 0,12 * * * /etc/yp/ypxfr2pdy