4.3BSD-UWisc/man/cat5/ypfiles.5

Compare this file to the similar file:
Show the results in this format:




YPFILES(5)          UNIX Programmer's Manual           YPFILES(5)



NAME
     ypfiles - the yellowpages database and directory structure

DESCRIPTION
     The yellow pages (YP) network lookup service uses a database
     of _d_b_m files in the directory hierarchy at /_e_t_c/_y_p . A _d_b_m
     database consists of two files, created by calls to the
     _d_b_m(3X) library package.  One has the filename extension
     ._p_a_g and the other has the filename extension ._d_i_r.  For
     instance, the database named _h_o_s_t_s._b_y_n_a_m_e, is implemented by
     the pair of files _h_o_s_t_s._b_y_n_a_m_e._p_a_g and _h_o_s_t_s._b_y_n_a_m_e._d_i_r.  A
     _d_b_m database served by the YP is called a YP _m_a_p.  A YP
     _d_o_m_a_i_n is a named set of YP maps. Each YP domain is imple-
     mented as a subdirectory of /_e_t_c/_y_p containing the map.  Any
     number of YP domains can exist.  Each may contain any number
     of maps.

     No maps are required by the YP lookup service itself,
     although they may be required for the normal operation of
     other parts of the system.  There is no list of maps which
     YP serves - if the map exists in a given domain, and a
     client asks about it, the YP will serve it.  For a map to be
     accessible consistently, it must exist on all YP servers
     that serve the domain.  To provide data consistency between
     the replicated maps, an  entry to run _y_p_x_f_r periodically
     should be made in /_u_s_r/_l_i_b/_c_r_o_n_t_a_b on each server.  More
     information on this topic is in ypxfr(8).

     YP maps should contain two distinguished key-value pairs.
     The first is the key YP_LAST_MODIFIED, having as a value a
     ten-character ASCII order number.  The order number should
     be the UNIX time in seconds when the map was built.  The
     second key is YP_MASTER_NAME, with the name of the YP master
     server as a value. _m_a_k_e_d_b_m generates both key-value pairs
     automatically.  A map that does not contain both key-value
     pairs can be served by the YP, but the _y_p_s_e_r_v process will
     not be able to return values for "Get order number" or "Get
     master name" requests. In addition, values of these two keys
     are used by _y_p_x_f_r when it transfers a map from a master YP
     server to a slave. If _y_p_x_f_r cannot figure out where to get
     the map, or if it is unable to determine whether the local
     copy is more recent than the copy at the master, you must
     set extra command line switches when you run it.

     YP maps must be generated and modified only at the master
     server.  They are copied to the slaves using _y_p_x_f_r(8) to
     avoid potential byte-ordering problems among YP servers run-
     ning on machines with different architectures, and to minim-
     ize the amount of disk space required for the dbm files.
     The YP database can be initially set up for both masters and
     slaves by using _y_p_i_n_i_t(8).




Printed 12/27/86           1 Aug 1985                           1






YPFILES(5)          UNIX Programmer's Manual           YPFILES(5)



     After the server databases are set up, it is probable that
     the contents of some maps will change.  In general, some
     ASCII source version of the database exists on the master,
     and it is changed with a standard text editor.  The update
     is incorporated into the YP map and is propagated from the
     master to the slaves by running /_e_t_c/_y_p/_M_a_k_e_f_i_l_e . All Sun-
     supplied maps have entries in /_e_t_c/_y_p/_M_a_k_e_f_i_l_e ; if you add
     a YP map, edit the this file to support the new map.  The
     makefile uses _m_a_k_e_d_b_m to generate the YP map on the master,
     and _y_p_p_u_s_h to propagate the changed map to the slaves.
     _y_p_p_u_s_h is a client of the map _y_p_s_e_r_v_e_r_s , which lists all
     the YP servers. For more information on this topic, see
     yppush(8).

SEE ALSO
     makedbm(8), ypinit(8), ypmake(8), ypxfr(8), yppush(8),
     yppoll(8), ypserv(8), rpcinfo(8),






































Printed 12/27/86           1 Aug 1985                           2