In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to read the linux system for monitoring, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
I. linux system monitoring and preparation work
You can verify that the rstatd daemon is configured on the server in two ways:
① uses the rup command, which is used to report various statistics for the computer, including configuration information for rstatd. Use the command rup10.130.61.203, where 10.130.61.203 is the Ip of the linux/Unix server to be monitored, if the command returns relevant statistics. The rstatd daemon is configured and activated; if no meaningful statistics are returned, or an error report occurs, the rstatd daemon has not been configured or has a problem.
② uses the find command
# find/-namerpc.rstatd, this command is used to find out if the rpc.rstatd file exists on the system, and if not, the system does not have the rstatd daemon installed.
If the rstatd program is not installed on the server (generally speaking, LINUX is not installed), you need to download a package to have this service, the package name is rpc.rstatd-4.0.1.tar.gz. This is a source code, need to compile, download and install rstatd (can be downloaded from the address of http://sourceforge.net/projects/rstatd)
After downloading, start the installation. The installation steps are as follows:
Tar-xzvfrpc.rstatd-4.0.1.tar.gz
Cdrpc.rstatd-4.0.1/
. / configure- configuration operation
Compile with make-
Makeinstall- installation begins
Rpc.rstatd- starts the rstatd process
2. Configure the rstatd target daemon xinetd after the linux system monitoring installation is completed. Its main configuration file is / etc/xinetd.conf, which contains the following basic information:
#
# xinetd.conf
#
# Copyright (c) 1998-2001 SuSEGmbHNuernberg, Germany.
# Copyright (c) 2002 SuseLinuxAG, Nuernberg, Germany.
#
Defaults
{
Log_type=FILE/var/log/xinetd.log
Log_on_success=HOSTEXITDURATION
Log_on_failure=HOSTATTEMPT
# only_from=localhost
Instances=30
Cps=5010
#
# Thespecificationofaninterfaceisinteresting,ifweareonafirewall.
# Forexample,ifyouonlywanttoprovideservicesfromaninternal
# networkinterface,youmayspecifyyourinternalinterfacesIP-Address.
#
# interface=127.0.0.1
}
Includedir/etc/xinetd.d
What we need to modify here are the three conf files under / etc/xinetd.d/: rlogin,rsh,rexec, the three configuration files. Change the disable=yes in these three files to disable=no (disabled is used to disable services in the default {}) or set # default:off to on, which means to start the above three services by default when xinetd starts!
Note: in my own configuration, without disable=yes, I changed # default:off to: default:on. After reboot (cd/etc/init.d/./xinetdrestart), I checked it through netstat-an | grep514 and did not return it. Then, I manually add disable=no on one line of the three files, restart xinetd, and then use netstat-an | grep514 to view it, and get the tcp000.0.0.0:5140.0.0.0:*LISTEN result, indicating that the rsh server has been started.
As long as you make sure that there are rstatd and xinetd services in the processes on the Linux machine, you can use LR to monitor them.
Two tips:
① check whether it is started: the TCP that rshserver listens on is 514.
[root@mg04root] # netstat-an | grep514
Tcp000.0.0.0:5140.0.0.0:*LISTEN
If you can see that 514 is listening, the rsh server has been started.
② check whether it is started: rstatd
Enter command: rpcinfo-p
If you can see information similar to the following:
Program version protocol port
1000015udp937rstatd
1000014udp937rstatd
1000013udp937rstatd
1000012udp937rstatd
1000011udp937rstatd
That means the rstatd service is started (of course, you can also use psax here)
③ restart xinetd method:
In suselinux, do the following:
Cd/etc/init.d/
. / xinetdrestart
It is said to use the following command in some places on the Internet:
# servicexinetdreload
# / sbin/servicexinetdrstart
I don't know what system it's used in.
④ installs rsh and rsh-server service pack methods
a. Uninstall rsh
# rpm-qrsh- View version number
# rpm-e version number-Uninstall the version.
B. Installation
# rpm-ivhrsh-0.17-14.i386.rpmrsh-server-0.17-14.i386.rpm
⑤ will error "Cannotregisterservice:RPC:Unabletoreceive;errno=Ctionrefused" when starting rpc.rstatd.
The solution is as follows:
# / etc/init.d./portmapstart
# / etc/init.d./nfsstart
And then start rpc.rstatd again.
* in controller, drag and drop UNIXresources into the right window, right-click to select AddMeasurements, add the IP address of the monitored linux, and then select the metric to be monitored. The entire system monitoring: linux system monitoring is completed.
Thank you for reading this article carefully. I hope the article "how to monitor the linux reading system" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.