[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 3

lockd Daemon

Purpose

Processes lock requests.

Syntax

/usr/sbin/rpc.lockd [ -t TimeOut ] [ -g GracePeriod ] [ -S Number ]

Description

The lockd daemon processes lock requests that are either sent locally by the kernel or remotely by another lock daemon. The lockd daemon forwards lock requests for remote data to the server site lock daemon through the RPC package. The lockd daemon then asks the statd (status monitor) daemon for monitor service. The reply to the lock request is not sent to the kernel until both the statd daemon and the server site lockd daemon reply. The statd daemon should always be started before the lockd daemon.

If either the status monitor or the server site lock daemon is unavailable, the reply to a lock request for remote data is delayed until all daemons become available.

When a server recovers, it waits for a grace period for all client site lockd daemons to submit reclaim requests. The client site lockd daemons, on the other hand, are notified of the server recovery by the statd daemon. These daemons promptly resubmit previously granted lock requests. If a lockd daemon fails to secure a previously granted lock at the server site, the lockd daemon sends a SIGLOST signal to the process.

The lockd daemon is started and stopped with the following System Resource Controller (SRC) commands:

startsrc -s rpc.lockd
stopsrc -s rpc.lockd

To modify the arguments passed to the lockd daemon when it is started, use the following command:

chssys -s rpc.lockd -a Arguments

The status monitor maintains information on the location of connections as well as the status in the /etc/sm directory, the /etc/sm.bak file, and the /etc/state file. When restarted, the statd daemon queries these files and tries to reestablish the connection it had prior to termination. To restart the statd daemon, and subsequently the lockd daemon, without prior knowledge of existing locks or status, delete these files before restarting the statd daemon.

Flags

-g GracePeriod Uses the GracePeriod variable to specify the amount of time, in seconds, that the lockd daemon should wait for reclaim requests for previously granted locks. The default value of the GracePeriod variable is 45 seconds.
-S Number Changes the size of the socket buffer to the size specified by the Number variable. The default value of the Number variable is 15,000 bytes.
Notes:
  1. The -S flag is only available on AIX version 4.2.0 and prior releases.
  2. To set the socket buffer size higher than 56,000 bytes, first use the no command with the sb_max option to increase the kernel's maximum socket buffer size. Then use the lockd daemon with the -S Number flag.
-t TimeOut Uses the TimeOut variable to specify the interval between retransmitting lock requests to the remote server. The default value for the TimeOut variable is 15 seconds.

Examples

  1. To specify a grace period, enter:
    /usr/sbin/rpc.lockd -g 60
    In this example, the grace period is set for 60 seconds.
  2. To specify the amount of time the lockd daemon should wait before retransmitting a lock request, enter:
    /usr/sbin/rpc.lockd -t 30
    In this example, the retransmissions occur after 30 seconds.

Related Information

The chssys command, nfso command, no command.

The statd daemon.

The fcntl subroutine, lockf subroutine, signal subroutine.

List of NFS Commands.

Network File System (NFS) Overview for System Management in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]