Rpc. rstatd and rpc. statd commands in linuxz

Source: Internet
Author: User

Problem description: RPC is found in the running process. statd service. If you do not know about this service, you can find that there are two file rpc in the/usr/sbin directory of Linux. rstatd and RPC. STATD: The file names are very similar. What do they do?

Answer:
In the Linux/usr/sbin directory, there are two files: rpc. rstatd and rpc. statd. The file name is very similar, but the role is different.

Purpose:
1. run/usr/sbin/rpc. the rstatd command starts the rstatd background program, which is a server that obtains information about system performance statistics from the system core and returns the results to the calling program. Rstatd daemon is usually started by inetd daemon.
Currently, during stress testing, users often use the Load Runner software on the client to collect performance data of applications or database servers. It is implemented by sending a request to the rstatd background program on the server.
2. the/usr/sbin/rpc. statd command starts the statd background program. In an NFS environment, statd daemon and lockd daemon are combined to provide crash and recovery ing functions for the lock mechanism. In addition to maintaining relevant connection information, statd daemon also monitors the/var/statmon/SM directory and/var/statmon/SM. the status information in the Bak directory and the/var/statmon/State file. STATD
It is usually started before lockd. the start and stop of statd daemon are implemented by calling the SRC command of the system.

Start/stop mode:
1. start/stop rstatd
A. Start rstatd
A.1 first edit the/etc/inetd. conf file, delete the annotator before the rstatd row, and save the file to the disk.
# Vi/etc/inetd. conf
Rstatd sunrpc_udp udp wait root/usr/sbin/rpc. rstatd 100001 1-3
A.2 refresh inetd daemon
# Refresh-s inetd

B. Stop rstatd
B .1 edit the/etc/inetd. conf file and add a annotator before the rstatd line to save the file to the disk.
# Vi/etc/inetd. conf
# Rstatd sunrpc_udp udp wait root/usr/sbin/rpc. rstatd 100001 1-3
B .2 refresh inetd daemon
# Refresh-s inetd

2. start/stop statd
Start statd
# Startsrc-s rpc. statd
Stop statd
# Stopsrc-s rpc. statd

Check Method:
1. Check whether rstatd is active.
A. Use the SRC command
# Lssrc-ls inetd
Subsystem group PID status
Inetd TCPIP 10086 active
...
Service Command description status
Rstatd/usr/sbin/rpc. rstatd 100001 1-3 active
Wsmserver/usr/websm/bin/wsmserver-start active
Time Internal Active
...

B. the rstatd is also registered in Portmap.
# Rpcinfo-p | grep rstatd
Program vers proto port service
100001 1 udp 32935 rstatd
100001 2 UDP 32935 rstatd
100001 3 UDP 32935 rstatd

2. Check whether statd is started.
A. Use the SRC command
# Lssrc-s rpc. statd
Subsystem group PID status
Rpc. statd NFS 13682 active

B. Check whether the process exists.
# Pd-Ef | grep stat
Daemon 13682 6044 0 Oct 28-/usr/sbin/rpc. statd-D 0-T 50

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.