-
大小: 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
相关资源
- powerpaste-4.0.1-317(兼容最新tinymce5.2.
- Driver Reviver 驱动管理工具 v4.0.1.60 官方
- LoadRunner11.0地址及破解用户
- loadrunner11破解版
- LoadRunner11.0地址+汉化+破解
- loadrunner12.60 社区版.rar
- lr_Del_license.exe LoadRunner 注册表清除工
- mongodb windows64位 4.0.10 msi安装包
- llPDFLib 6.4.0.138 FULL CODE 可以输出中文
- LoadRunner11教程完整版
- 高恪K2等7620A通用刷机专用固件 又称底
- NetLimiter 4.0.15.0 x64 破解注册版
- UPPAAL-4.0.14
- LoadRunner11 Controller中文用户指南
- loadrunner自带订票脚本(flight sample)
- 测试软件使用手册-LoadRunner12.55
- loadrunner11版WebTours
- LoadRunner11.0通过浏览器代理录制脚本适
- tiff-4.0.10-windows
- redis 4.0.10
- 软件测试实验报告使用LoadRunner进行性
- LoadRunner压力测试报告
- loadrunner12.6
- Chrome 34.0.1847.131
- LoadRunner12中文版使用手册
- LoadRunner12.00用户指南—中文版,十分
- opencv_contrib-4.0.1.zip
- HP LoadRunner 11.00 Patch 4.zip 工具
- Windographer4.0.11
- Enterprise Architect14.0.1422破解版
评论
共有 条评论