


What is the function of linux rpc.statd
In Linux, rpc.statd is a process that implements the Network Status Monitoring (NSM) RPC protocol and notifies the NFS client when an NFS server restarts abnormally. The syntax is " /sbin/rpc.statd [-F] [-d] [-?] [-n name ] [-o port ] [-p port ] [-V]". The nfslock service will automatically start the rpc.statd process and does not require user configuration.
The following RPC background process provides services for NFS
rpc.mountd
: This process accepts loads from NFS clients Request and verify that the requested file system is being exported. This process is automatically started by the NFS service and does not require user configuration.rpc.nfsd
: This process is the NFS server. It works with the Linux core to meet the dynamic needs of NFS clients, such as providing Server thread for each request. This process corresponds to the nfs service.rpc.lockd
: An optional process that allows NFS clients to lock files on the server. This process corresponds to the nfslock service.rpc.statd
: This process implements the Network Status Monitoring (NSM) RPC protocol to notify NFS clients when an NFS server restarts abnormally. This process is automatically started by the nfslock service. No user configuration is required.rpc.rquotad
: This process provides user quota information for remote users. This process is automatically started by the nfs service and does not require user configuration.
Linux Commands rpc.statd
The rpc.statd service implements the NSM (Network Status Monitor) RPC protocol.
This service is somewhat misnamed, as it does not actually provide proactive monitoring as one might suspect; instead, NSM implements a restart notification service.
rpc.lockd is a file service used to recover locked files when the NFS server crashes and restarts.
Using rpc.statd
In the past, on some Linux distributions, we needed to start rpc.statd separately when starting the NFS server.
This is mainly due to the old Sysvinit system.
Now we will find that starting NFS will automatically start rpc.statd and any other components required for the server to function properly.
systemctl start nfs
Or (depending on the distro)
systemctl start nfs-server
This is also true when enabling the server on startup.
Debian-based distributions such as Ubuntu and Linux Mint will enable NFS as soon as we install it, so there is no need to do this, but enabling the server will look like this:
systemctl enable nfs
or
systemctl enable nfs-server
Again, the exact command depends on the distribution.
"nfs-server" is a Debian-based system.
If we need to customize the behavior of rpc.statd, we can do so using the following options.
Normally, we would not want to run this command alone.
Instead, we will make a copy of the Systemd service file, creating a backup of the original and a new copy to modify freely.
We will then use the following options to change how the service is called from that service file.
Syntax
/sbin/rpc.statd [-F] [-d] [-?] [-n name ] [-o port ] [-p port ] [-V]
Operation
For each NFS client or server to be monitored machine, rpc.statd creates a file in /var/lib/nfs/statd/sm.
When started, it iterates through these files and notifies peerrpc.statd on these machines.
Options
-F
By default, rpc.statd is forked and placed in the background on startup. The
-F parameter tells it to stay in the foreground.
This option is mainly used for debugging purposes.
-d
By default, rpc.statd sends log messages to the system log via syslog(3). The
-d parameter forces it to log verbose output to stderr instead.
This option is mainly used for debugging purposes and can only be used in conjunction with the -F parameter.
-n, --name name
Specify a name for rpc.statd to use as the local host name.
By default, rpc.statd will call gethostname(2) to obtain the local host name.
Specifying the local hostname may be useful for machines with multiple interfaces.
-o, --outgoing-port port
Specify a port for rpc.statd to send outgoing status requests from.
By default, rpc.statd will ask portmap (8) to assign it a port number.
As of this writing, there is no standard port number that portmap always or usually assigns.
Specifying ports may be useful when implementing a firewall.
-p, --port port
Specify the port that rpc.statd listens on.
By default, rpc.statd will ask portmap (8) to assign it a port number.
As of this writing, there is no standard port number that portmap always or usually assigns.
Specifying ports may be useful when implementing a firewall.
-?
Causes rpc.statd to print out command line help and exit.
-V
Cause rpc.statd to print out version information and exit.
TCP_WRAPPERS SUPPORT
This version of rpc.statd is protected by the tcp_wrapper library.
如果允许客户端使用 rpc.statd,则必须授予客户端访问权限。
要允许来自 .bar.com 域的客户端的连接,我们可以在 /etc/hosts.allow 中使用以下行:
statd: .bar.com
我们必须使用守护程序名称 statd 作为守护程序名称(即使二进制文件具有不同的名称)。
The above is the detailed content of What is the function of linux rpc.statd. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

VS Code is available on Mac. It has powerful extensions, Git integration, terminal and debugger, and also offers a wealth of setup options. However, for particularly large projects or highly professional development, VS Code may have performance or functional limitations.

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.
