-
大小: 85KB文件类型: .gz金币: 1下载: 0 次发布日期: 2021-06-07
- 语言: 其他
- 标签: rpc.rstatd 4.0.1 loadrunner linux rpc
资源简介
使用教程
linux下安装rpc.rstatd
1.rpc服务需rsh的支持,一般情况下rsh已安装。rpm -qa rsh查看。
2.右键另存为http://heanet.dl.sourceforge.net/sourceforge/rstatd/rpc.rstatd-4.0.1.tar.gz下载rpc.rstatd-4.0.1.tar.gz。
3.执行以下命令解压和安装
tar zxvf rpc.rstatd-4.0.1.tar.gz
cd rpc.rstatd-4.0.1
./configure //配置
make //编译
make install //安装
4.启动 rpc.rstatd
如果第一次执行rpc.rstatd报错,按以下步骤可解决报错
cd /etc/init.d
./portmap start
./nfs start
rpc.rstatd
5.检验,执行rpcinfo -p,看到以下信息表示安装成功:
100001 5 udp 800 rstatd
100001 3 udp 800 rstatd
100001 2 udp 800 rstatd
100001 1 udp 800 rstatd
6.在LoadRunner中添加计数器
average load: 在过去的1分钟的平均负载
cpu utilization: cpu的使用率
disk traffic: disk传输率
paging rate: 每秒从磁盘读到物理内存,或者从物理内存写到页面文件的内存页数
Swap-in rate: 每秒交换到内存的进程数
Swap-out rate: 每秒从内存交换出来的进程数 ......
代码片段和文件信息
/*
* getdata.c -- common data gathering functions
*
* Software distributed under the GPL for license terms see the file
* COPYING in this directory
*
* (c) 2005 Dr. Andreas Mueller Beratung und Entwicklung
* $Id: getdata.cv 1.3 2005/09/19 07:20:33 afm Exp $
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PATTERNS 6
char *patterns[PATTERNS] = {
“^((da|)s|h)d[a-z][a-z]*$“
“^scd[0-9]$“
“^(rd|ida|cciss)/c[0-9][0-9]*d[0-9]*$“
“^i2o/hd[a-z]*$“
“^amiradi/ar[0-9]*$“
“^carmel/[0-9][0-9]*$“
};
#define MAXINT 0x80000000
static regex_t *rx[PATTERNS];
extern int ninterfaces;
extern char **interfaces;
/* find out whether a device with a given name is a disk */
int isdisk(const char *device) {
int i;
for (i = 0; i < PATTERNS; i++) {
if (0 == regexec(rx[i] device 0 NULL 0)) {
return 1;
}
}
return 0;
}
/* dummy functions */
static void get_disk(struct statsusers *s) {
syslog(LOG_CRIT “dummy function should never be called!“);
exit(EXIT_FAILURE);
}
/* cpu is identical in all version of linux */
static void get_cpu(struct statsusers *s) {
FILE *stat;
char buf[1024];
unsigned long long cp[4];
unsigned long long l;
int i;
if (NULL == (stat = fopen(“/proc/stat“ “r“))) {
syslog(LOG_CRIT “/proc/stat not found“);
exit(EXIT_FAILURE);
}
while (fgets(buf sizeof(buf) stat)) {
if (0 == strncmp(buf “cpu “ 4)) {
if (4 != sscanf(buf “cpu %llu %llu %llu %llu\n“
&cp[0] &cp[1]&cp[2] &cp[3])) {
syslog(LOG_CRIT “wrong format of cpu line“);
exit(EXIT_FAILURE);
}
/* convert the cp data to normal longs */
for (i = 0; i < 4; i++) {
s->cp_time[i] = cp[i] % MAXINT;
}
}
if (0 == strncmp(buf “intr “ 5)) {
if (1 != sscanf(buf “intr %llu “ &l)) {
syslog(LOG_CRIT “wrong format of intr line“);
exit(EXIT_FAILURE);
}
s->v_intr = l % MAXINT;
}
if (0 == strncmp(buf “ctxt “ 5)) {
if (1 != sscanf(buf “ctxt %llu\n“ &l)) {
syslog(LOG_CRIT “wrong format of ctxt line“);
exit(EXIT_FAILURE);
}
s->v_swtch = l % MAXINT;
}
} /* while */
fclose(stat);
}
static void get_vm(struct statsusers *s) {
FILE *stat;
char buf[1024];
if (NULL == (stat = fopen(“/proc/stat“ “r“))) {
syslog(LOG_CRIT “/proc/stat not found“);
exit(EXIT_FAILURE);
}
while (fgets(buf sizeof(buf) stat)) {
if (0 == strncmp(buf “page “ 5)) {
if (2 != sscanf(buf “page %u %u \n“
&s->v_pgpgin &s->v_pgpgout)) {
syslog(LOG_CRIT “wrong format of page line“);
exit(EXIT_FAILURE);
}
}
if (0 == strncmp(buf “swap “ 5)) {
if (2 != sscanf(buf “swap %u %u“
&s->v_pswpin &s->v_pswpout)) {
syslog(LOG_CRIT “wrong format of swap line“);
exit(EXIT_FAILURE);
}
}
} /* while */
fclose(stat);
}
static voi
相关资源
- register_vugen.bat
- VisualSVN 4.0.1 破解
- 方便强大的LoadRunner11的破解包,内含
- 深入性能测试:LoadRunner性能测试、流
- Loadrunner 的HTTPS的测试配置
- libcoap-4.0.1
- LoadRunner12.60地址.zip
- loadrunner11+破解
- loadrunner压力测试实际项目案例
- LoadRunner视频,LoadRunner学习视频
- Intel(R) 8 Series C220 Series B xHCI HC -
- 《性能测试进阶指南——LoadRunner11实
- deletelicense
- LoadRunner11.0 破解版文件+汉化+破解文件
- NI visa驱动器-版本14.0.1
- loadrunner12.6汉化补丁
- loadrunner12.60社区版.TXT
- loadrunner11完整安装包+中文破解
- loadrunner11补丁全集
- LoadRunner_Winsocket协议知识总结(修正版
- LoadRunner性能测试实战.txt
- Loadrunner性能测试视频教程.txt
- K2等7620A刷机专用固件-支持升级AP固件
- redis4.0.10
- Redis4.0.1绿色解压即可运行
- loadrunner11迅雷地址
- MT7628_LinuxAP_V4.0.1.3_DPA_20150216.tar
- pdf转ppt软件(WondersharePDFtoPowerPoint)
- pdf转ppt软件(Wondershare PDF to PowerPoin
- LoadRunner12.53 最新版
评论
共有 条评论