LR监控linux之详解rstatd的安装-Zee[通俗易懂]

LR监控linux之详解rstatd的安装-Zee

大家好,又见面了,我是全栈君。

LR监控linux之详解rstatd的安装-Zee
 
 
1.    前期准备:
 
 
1,

rstatd
文件解压到要监控的机器上。
2,
打开终端,定位到
rstatd
文件夹下:查看文件夹中的内容如下:

[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 
‘c
lient->cl_ops->cl_call

?from incompatible pointer type
rup.c: In function 

ointopoint_v3

?
rup.c:292: warning: passing argument 6 of 
‘c
lient->cl_ops->cl_call

?from incompatible pointer type
rup.c: In function 
‘m
ain

?
rup.c:317: warning: return type of 
‘m
ain

?is not 
‘i
nt

?rm -f rstat_xdr.c
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 
‘c
lient->cl_ops->cl_call

?from incompatible pointer type
rsysinfo.c: In function 
‘m
ain

?
rsysinfo.c:160: warning: return type of 
‘m
ain

?is not 
‘i
nt

?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 
‘m
ain

?
rstat_main.c:82: warning: return type of 
‘m
ain

?is not 
‘i
nt

?gcc -g -O2 -o rpc.rstatd rstat_svc.o rstat_xdr.o rstat_proc.o rstat_main.o 
这之后可以执行
:make check检查一下。
 
 
2.3.                   执行:make install 命令。
 
 

[root@localhost rpc.rstatd]# make install
make[1]: Entering directory `/opt/rpc.rstatd’
/bin/sh ./mkinstalldirs /usr/local/bin
 /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/

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/108361.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • xray漏洞扫描器

    xray漏洞扫描器文章目录一、xray下载二、xray安装、使用一、xray下载xray是一款功能强大的安全评估工具,由多名经验丰富的一线安全从业者呕心打造而成,主要特性有:1、检测速度快。发包速度快;漏洞检测算法高效。2、支持范围广。大至OWASPTop10通用漏洞检测,小至各种CMS框架POC,均可以支持。3、代码质量高。编写代码的人员素质高,通过CodeReview、单元测试、集成测试等多层验证来提高代码可靠性。4、高级可定制。通过配置文件暴露了引擎的各种参数,通过修改配置文件可

    2022年5月7日
    87
  • sigaction函数解析

    sigaction函数解析sigaction函数的功能是检查或修改与指定信号相关联的处理动作(可同时两种操作)。他是POSIX的信号接口,而signal()是标准C的信号接口(如果程序必须在非POSIX系统上运行,那么就应该使用这个接口)给信号signum设置新的信号处理函数act,同时保留该信号原有的信号处理函数oldactint sigaction(int signo,

    2022年5月25日
    72
  • php sigpipe,遭遇SIGPIPE[转]

    php sigpipe,遭遇SIGPIPE[转]转自:http://www.diybl.com/course/3_program/c++/cppjs/20090831/173152.html我写了一个服务器程序,在Windows下在cygwin环境编译后执行,然后用C#写了多线程客户端进行压力测试.程序一直运行正常.但当在Linux下测试时,总是莫名退出.最后跟踪到是write调用导致退出.用gdb执行程序,退出时提示”Broken…

    2022年5月30日
    36
  • 第七课 实战文件注册机制「建议收藏」

    第七课 实战文件注册机制「建议收藏」                实战文件注册机制【盲人摸象】故名思意就是借助一些我们常用的按钮事件,API断点,去高速有效的锁定此课主要是以回顾和巩固以上六课我们所学的知识,当然这课我奉劝大家还是认真的学习,尤其是以后想靠外挂赚钱的同学,这课学得多自然就会得多不要认为我就是一味的靠我的经验,以下就是一系列调试的技巧 这课主要是观看MOV的赋值,以及寄存器的变化,从而达到激活成功教程这也是以后在激活成功教程带有V…

    2022年7月26日
    5
  • 优先队列的数据结构_低优先级队列一天只能一场

    优先队列的数据结构_低优先级队列一天只能一场目录一.PriorityQueuePriorityQueue简介继承关系PriorityQueue示例二.Comparable比较器Compara接口三.Comparator比较器Comparator接口四.底层原理一.PriorityQueuePriorityQueue简介PriorityQueue,即优先级队列。优先级队列可以保证每次取出来的元素都是队列中的最小或最大的元素<Java优先级队列默认每次取出来的为最小元素&gt.

    2022年9月23日
    2
  • LoadRunner AJAX TruClient协议Tips and Tricks

    LoadRunner AJAX TruClient协议Tips and Tricks

    2021年8月25日
    49

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号