LR监控linux之详解rstatd的安装-Zee
2023-09-11 14:20:53 时间
[root@localhost rpc.rstatd]# ls
aclocal.m4 COPYING Makefile.am README rstat_proc.c rup.1
config.h.in CVS Makefile.in rpc.rstatd.8 rstat.x rup.c
configure INSTALL missing rstatd.8 rsysinfo.1 stamp-h.in
configure.in install-sh mkinstalldirs rstat_main.c rsysinfo.c
2. 执行如下步骤:
2.1. 执行:./configure 命令
[root@localhost rpc.rstatd]# ./configure
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gawk... gawk
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets ${MAKE}... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for sys/ioctl.h... yes
checking for syslog.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking return type of signal handlers... void
updating cache ./config.cache
creating ./config.status
kcreating Makefile
creating config.h
2.2. 执行:make 命令。
[root@localhost rpc.rstatd]# make
rm -f rstat.h
rpcgen -h -o rstat.h rstat.x
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rup.c
rup.c: In function ointopoint_v5:
rup.c:256: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rup.c:292: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rpcgen -c -o rstat_xdr.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_xdr.c rm -f rstat_clnt.c rpcgen -l -o rstat_clnt.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_clnt.c gcc -g -O2 -o rup rup.o rstat_xdr.o rstat_clnt.o gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rsysinfo.c rsysinfo.c: In function ointopoint_v3?
rsysinfo.c:136: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rsysinfo.c:160: warning: return type of main?is not int?gcc -g -O2 -o rsysinfo rsysinfo.o rstat_xdr.o rstat_clnt.o rm -f rstat_svc.c rpcgen -m -o rstat_svc.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_svc.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_proc.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_main.c rstat_main.c: In function main?
rstat_main.c:82: warning: return type of main?is not int?gcc -g -O2 -o rpc.rstatd rstat_svc.o rstat_xdr.o rstat_proc.o rstat_main.o
/usr/bin/install -c rup /usr/local/bin/rup /usr/bin/install -c rsysinfo /usr/local/bin/rsysinfo /bin/sh ./mkinstalldirs /usr/local/sbin /usr/bin/install -c rpc.rstatd /usr/local/sbin/rpc.rstatd make[1]: Nothing to be done for `install-data-am. make[1]: Leaving directory `/opt/rpc.rstatd 2.4. 执行:./rpc.rstatd 命令。启动rpc服务。 注:无回显为成功。 [root@localhost rpc.rstatd]# ./rpc.rstatd 2.5. 执行:rpcinfo –p 命令。检查rpc服务的状态. [root@localhost rpc.rstatd]# rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 797 status 100024 1 tcp 800 status 100001 5 udp 900 rstatd 100001 3 udp 900 rstatd 100001 2 udp 900 rstatd 100001 1 udp 900 rstatd [root@localhost rpc.rstatd]# 3. 可能会出现的错误: 1,若RPC服务没有成功启动。 2,若目标主机上开启了防火墙,阻挡了RPC服务。 在LR中添加时可能会出现如下错误: Monitor name :UNIX Resources. Cannot initialize the monitoring on 10.1.200.65. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification). Detailed error: RPC: Failed to create RPC client. RPC-TCP: Failed to establish RPC server address. RPC-TCP: RPC Server 100001, 3, 17 is not registered on host 10.1.200.65. (entry point: CFactory::Initialize). [MsgId: MMSG-47190] Monitor name :UNIX Resources. Internal rpc error (error code:2). Machine: 10.1.200.65. Hint: Check that RPC on this machine is up and running. Check that rstat daemon on this machine is up and running (use rpcinfo utility for this verification). Details: RPC: RPC call failed. RPC-TCP: recv()/recvfrom() failed. RPC-TCP: Timeout reached. (entry point: Factory::CollectData). [MsgId: MMSG-47197] 至此完毕。 本文出自seven的测试人生公众号最新内容请见作者的GitHub页:http://qaseven.github.io/
rup.c:256: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rup.c:292: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rpcgen -c -o rstat_xdr.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_xdr.c rm -f rstat_clnt.c rpcgen -l -o rstat_clnt.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_clnt.c gcc -g -O2 -o rup rup.o rstat_xdr.o rstat_clnt.o gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rsysinfo.c rsysinfo.c: In function ointopoint_v3?
rsysinfo.c:136: warning: passing argument 6 of client- cl_ops- cl_call?from incompatible pointer type
rsysinfo.c:160: warning: return type of main?is not int?gcc -g -O2 -o rsysinfo rsysinfo.o rstat_xdr.o rstat_clnt.o rm -f rstat_svc.c rpcgen -m -o rstat_svc.c rstat.x gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_svc.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_proc.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c rstat_main.c rstat_main.c: In function main?
rstat_main.c:82: warning: return type of main?is not int?gcc -g -O2 -o rpc.rstatd rstat_svc.o rstat_xdr.o rstat_proc.o rstat_main.o
/usr/bin/install -c rup /usr/local/bin/rup /usr/bin/install -c rsysinfo /usr/local/bin/rsysinfo /bin/sh ./mkinstalldirs /usr/local/sbin /usr/bin/install -c rpc.rstatd /usr/local/sbin/rpc.rstatd make[1]: Nothing to be done for `install-data-am. make[1]: Leaving directory `/opt/rpc.rstatd 2.4. 执行:./rpc.rstatd 命令。启动rpc服务。 注:无回显为成功。 [root@localhost rpc.rstatd]# ./rpc.rstatd 2.5. 执行:rpcinfo –p 命令。检查rpc服务的状态. [root@localhost rpc.rstatd]# rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 797 status 100024 1 tcp 800 status 100001 5 udp 900 rstatd 100001 3 udp 900 rstatd 100001 2 udp 900 rstatd 100001 1 udp 900 rstatd [root@localhost rpc.rstatd]# 3. 可能会出现的错误: 1,若RPC服务没有成功启动。 2,若目标主机上开启了防火墙,阻挡了RPC服务。 在LR中添加时可能会出现如下错误: Monitor name :UNIX Resources. Cannot initialize the monitoring on 10.1.200.65. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification). Detailed error: RPC: Failed to create RPC client. RPC-TCP: Failed to establish RPC server address. RPC-TCP: RPC Server 100001, 3, 17 is not registered on host 10.1.200.65. (entry point: CFactory::Initialize). [MsgId: MMSG-47190] Monitor name :UNIX Resources. Internal rpc error (error code:2). Machine: 10.1.200.65. Hint: Check that RPC on this machine is up and running. Check that rstat daemon on this machine is up and running (use rpcinfo utility for this verification). Details: RPC: RPC call failed. RPC-TCP: recv()/recvfrom() failed. RPC-TCP: Timeout reached. (entry point: Factory::CollectData). [MsgId: MMSG-47197] 至此完毕。 本文出自seven的测试人生公众号最新内容请见作者的GitHub页:http://qaseven.github.io/
相关文章
- Linux下性能监控、守护进程与计划任务管理
- nagios安装check_linux_stats.pl插件报错Can't locate Sys/Statistics/Linux.pm in @INC的处理?
- 排查线上问题常用的几个Linux命令
- 如何定制Linux Mint 15 Cinnamon?
- Linux集群和自动化维2.6.3 监控类脚本
- 在Ubuntu 14.10上安装基于Web的监控工具:Linux-Dash
- linux 监控
- docker搭建 prometheus和grafana监控 linux系统性能
- linux下eclipse安装
- linux中iproute2工具介绍
- linux内核中有哪些子系统(框架)呢?
- 用navicat访问linux数据库,成功实现Navicat访问Linux中安装的MySQL数据库
- linux驱动开发流程和方法
- linux服务器安装nodeJS步骤及踩坑记录(解决node -v报错cannot execute binary file: Exec format error的问题 - 在Linux中安装适用于arm64位的nodejs)以及node环境项目部署
- LoadRunner压力测试时监控服务器Linux的资源情况
- [加入用户]解决useradd 用户后没有加入用户Home文件夹的情况,Linux改变文件或文件夹的訪问权限命令,linux改动用户password,usermod的ysuum安装包。飞
- Linux服务器上监控网络带宽的18个常用命令
- Linux之旅(1): diff, patch和quilt (下)
- Linux学习笔记(25)linux批量管理