热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Loadrunner监控linux之详解rstatd的安装

2019独角兽企业重金招聘Python工程师标准1.前期准备(1)把rstatd文件解压到要监控的机器上。(2)打开终

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

1.    前期准备

 (1)把rstatd文件解压到要监控的机器上。

 (2)打开终端,定位到rstatd文件夹下:查看文件夹中的内容如下:


[root@localhost rpc.rstatd]# lsaclocal.m4    COPYING     Makefile.am    README        rstat_proc.c rup.1config.h.in   CVS         Makefile.in    rpc.rstatd.8 rstat.x       rup.cconfigure     INSTALL     missing        rstatd.8      rsysinfo.1    stamp-h.inconfigure.in install-sh mkinstalldirs rstat_main.c rsysinfo.c

2.    执行步骤

(1) 执行:./configure 命令

[root@localhost rpc.rstatd]# ./configurecreating cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets ${MAKE}... yeschecking for working aclocal... foundchecking for working autoconf... foundchecking for working automake... foundchecking for working autoheader... foundchecking for working makeinfo... foundchecking for gawk... gawkchecking for gcc... gccchecking whether the C compiler (gcc ) works... yeschecking whether the C compiler (gcc ) is a cross-compiler... nochecking whether we are using GNU C... yeschecking whether gcc accepts -g... yeschecking for a BSD compatible install... /usr/bin/install -cchecking whether ln -s works... yeschecking whether make sets ${MAKE}... (cached) yeschecking how to run the C preprocessor... gcc -Echecking for sys/ioctl.h... yeschecking for syslog.h... yeschecking whether time.h and sys/time.h may both be included... yeschecking whether gcc needs -traditional... nochecking for ANSI C header files... yeschecking return type of signal handlers... voidupdating cache ./config.cachecreating ./config.statuskcreating Makefilecreating config.h

(2)执行:make 命令

[root@localhost rpc.rstatd]# makerm -f rstat.hrpcgen -h -o rstat.h rstat.xgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rup.crup.c: In function 'ointopoint_v5':rup.c:256: warning: passing argument 6 of 'client->cl_ops->cl_call'?from incompatible pointer typerup.c: In function 'ointopoint_v3'?rup.c:292: warning: passing argument 6 of 'client->cl_ops->cl_call'?from incompatible pointer typerup.c: In function 'main'?rup.c:317: warning: return type of 'main'?is not 'int'?rm -f rstat_xdr.crpcgen -c -o rstat_xdr.c rstat.xgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rstat_xdr.crm -f rstat_clnt.crpcgen -l -o rstat_clnt.c rstat.xgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rstat_clnt.cgcc -g -O2 -o rup rup.o rstat_xdr.o rstat_clnt.o gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rsysinfo.crsysinfo.c: In function 'ointopoint_v3'?rsysinfo.c:136: warning: passing argument 6 of 'client->cl_ops->cl_call'?from incompatible pointer typersysinfo.c: In function 'main'?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.crpcgen -m -o rstat_svc.c rstat.xgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rstat_svc.cgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rstat_proc.cgcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c rstat_main.crstat_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 

这之后可以执行:make check检查一下。

(3) 执行:make install 命令

[root@localhost rpc.rstatd]# make installmake[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.rstatdmake[1]: Nothing to be done for `install-data-am'.make[1]: Leaving directory `/opt/rpc.rstatd'

(4)执行:./rpc.rstatd 命令

启动rpc服务。

[root@localhost rpc.rstatd]# ./rpc.rstatd

执行完成后没有回显信息,说明启动成功。

(5)执行:rpcinfo –p 命令

检查rpc服务的状态.

[root@localhost rpc.rstatd]# rpcinfo -pprogram vers proto   port100000    2   tcp    111 portmapper100000    2   udp    111 portmapper100024    1   udp    797 status100024    1   tcp    800 status100001    5   udp    900 rstatd100001    3   udp    900 rstatd100001    2   udp    900 rstatd100001    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 &#39;10.1.200.65&#39;. (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]

 


转:https://my.oschina.net/u/2391658/blog/712837



推荐阅读
  • Nginx使用(server参数配置)
    本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
  • 在CentOS/RHEL 7/6,Fedora 27/26/25上安装JAVA 9的步骤和方法
    本文介绍了在CentOS/RHEL 7/6,Fedora 27/26/25上安装JAVA 9的详细步骤和方法。首先需要下载最新的Java SE Development Kit 9发行版,然后按照给出的Shell命令行方式进行安装。详细的步骤和方法请参考正文内容。 ... [详细]
  • 本文讨论了clone的fork与pthread_create创建线程的不同之处。进程是一个指令执行流及其执行环境,其执行环境是一个系统资源的集合。在调用系统调用fork创建一个进程时,子进程只是完全复制父进程的资源,这样得到的子进程独立于父进程,具有良好的并发性。但是二者之间的通讯需要通过专门的通讯机制,另外通过fork创建子进程系统开销很大。因此,在某些情况下,使用clone或pthread_create创建线程可能更加高效。 ... [详细]
  • Python如何调用类里面的方法
    本文介绍了在Python中调用同一个类中的方法需要加上self参数,并且规范写法要求每个函数的第一个参数都为self。同时还介绍了如何调用另一个类中的方法。详细内容请阅读剩余部分。 ... [详细]
  • Linux如何安装Mongodb的详细步骤和注意事项
    本文介绍了Linux如何安装Mongodb的详细步骤和注意事项,同时介绍了Mongodb的特点和优势。Mongodb是一个开源的数据库,适用于各种规模的企业和各类应用程序。它具有灵活的数据模式和高性能的数据读写操作,能够提高企业的敏捷性和可扩展性。文章还提供了Mongodb的下载安装包地址。 ... [详细]
  • 使用正则表达式爬取36Kr网站首页新闻的操作步骤和代码示例
    本文介绍了使用正则表达式来爬取36Kr网站首页所有新闻的操作步骤和代码示例。通过访问网站、查找关键词、编写代码等步骤,可以获取到网站首页的新闻数据。代码示例使用Python编写,并使用正则表达式来提取所需的数据。详细的操作步骤和代码示例可以参考本文内容。 ... [详细]
  • VueCLI多页分目录打包的步骤记录
    本文介绍了使用VueCLI进行多页分目录打包的步骤,包括页面目录结构、安装依赖、获取Vue CLI需要的多页对象等内容。同时还提供了自定义不同模块页面标题的方法。 ... [详细]
  • 如何在php文件中添加图片?
    本文详细解答了如何在php文件中添加图片的问题,包括插入图片的代码、使用PHPword在载入模板中插入图片的方法,以及使用gd库生成不同类型的图像文件的示例。同时还介绍了如何生成一个正方形文件的步骤。希望对大家有所帮助。 ... [详细]
  • 本文介绍了如何使用PHP代码将表格导出为UTF8格式的Excel文件。首先,需要连接到数据库并获取表格的列名。然后,设置文件名和文件指针,并将内容写入文件。最后,设置响应头部,将文件作为附件下载。 ... [详细]
  • 本文介绍了Python语言程序设计中文件和数据格式化的操作,包括使用np.savetext保存文本文件,对文本文件和二进制文件进行统一的操作步骤,以及使用Numpy模块进行数据可视化编程的指南。同时还提供了一些关于Python的测试题。 ... [详细]
  • 超级简单加解密工具的方案和功能
    本文介绍了一个超级简单的加解密工具的方案和功能。该工具可以读取文件头,并根据特定长度进行加密,加密后将加密部分写入源文件。同时,该工具也支持解密操作。加密和解密过程是可逆的。本文还提到了一些相关的功能和使用方法,并给出了Python代码示例。 ... [详细]
  • Centos7搭建ELK(Elasticsearch、Logstash、Kibana)教程及注意事项
    本文介绍了在Centos7上搭建ELK(Elasticsearch、Logstash、Kibana)的详细步骤,包括下载安装包、安装Elasticsearch、创建用户、修改配置文件等。同时提供了使用华为镜像站下载安装包的方法,并强调了保证版本一致的重要性。 ... [详细]
  • 如何修改MySQL数据库密码的方法及步骤详解
    本文详细介绍了四种修改MySQL数据库密码的方法,包括使用SET PASSWORD命令、mysqladmin命令、UPDATE语句直接编辑user表的步骤和操作示例。通过本文的指导,读者可以轻松掌握修改MySQL数据库密码的技巧和方法。 ... [详细]
  • springboot启动不了_Spring Boot + MyBatis 多模块搭建教程
    作者:枫本非凡来源:www.cnblogs.comorzlinp9717399.html一、前言1、创建父工程最近公司项目准备开始重构,框 ... [详细]
  • PatchODAX8: ... [详细]
author-avatar
MC_炽焰
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有