The NLM uses the NSM protocol to enable it to recover from crashes of either the client or server host. To provide this functionality the NSM and NLM protocols on both the client and server hosts must cooperate.
The NSM is a service that provides applications with information on the status of network hosts. Each NSM keeps track of its own "state" and notifies any interested party of a change in this state to any other NSM upon request. The state is merely a number which increases monotonically each time the state of the host changes; an even number indicates the host is down, while an odd number indicates the host is up.
Applications register the network hosts they are interested in with the local NSM. If one of these hosts crashes, the NSM on the crashed host, after a reboot, will notify the NSM on the local host that the state changed. The local NSM can then, in turn, notify the interested application of this state change.
The NSM is used heavily by the Network Lock Manager (NLM).
The local NLM registers with the local
NSM all server hosts on which the NLM has currently active locks.
In parallel, the NLM on the remote (server) host
registers all of its client hosts with its local NSM.
If the server host crashes and reboots, the server NSM will inform the
NSM on the client hosts of this event.
The local NLM can then take steps to re-establish the locks when the
server is rebooted.
Low-end systems that do not run an NSM, due to memory or
speed constraints, are restricted to using non-monitored locks.
See
These are the sizes, given in decimal bytes, of various XDR structures used in the protocol.
This section presents the data types used by the NSM.
Implementations and applications must be able to handle host names as 8-bit transparent data (allowing use of arbitrary character set encodings). For maximum portability and interworking, it is recommended that applications and users define host names containing only the characters of the Portable Filename Character Set defined in ISO/IEC 9945-1:1990. (This also applies to the "my_id.my_name" fields in the call arguments of the SM_MON, SM_UNMON and SM_UNMON_ALL procedures.)
sm_stat_res is the return value from SM_STAT and SM_MON procedures. It includes the return status of the call and the state number of the local host.
The state number of the NSM monotonically increases each time state of the host changes; an even number indicates that the host is down, while an odd number indicates that it is up.
Contains the name of the host to be monitored and RPC call-back information. See SM_NOTIFY for more information.
Parameter to SM_MON call. "priv" is information provided by the client that is returned on notification of a server state change (crash and reboot).
This is the parameter to the SM_NOTIFY call. It contains the name of the host that had a state change (that is, crashed and recovered) and its new state number.
The following reference pages define the RPC procedures supplied by an NSM server.
Contents | Next section | Index |