|
3#
楼主 |
发表于 2011-11-19 17:00:01
|
只看该作者
web_reg_save_param("JVMFreeMemory",
"LB=Free memory: ",
"RB= MB",
"Ord=1",
LAST);
web_reg_save_param("JVMTotalMemory",
"LB=Total memory: ",
"RB= MB",
"Ord=1",
LAST);
web_reg_save_param("JVMMaxMemory",
"LB=Max memory: ",
"RB= MB",
"Ord=1",
LAST);
//通过LR去访问tomcat监控页
web_set_user("admin","pass","192.168.1.173:1203");
web_url("status",
"URL=http://192.168.1.173:1203/manager/status",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
lr_end_transaction("monitor tomcat", LR_AUTO);
// Tomcat JVM metrics 使用lr_user_data_point()添加数据到图表中去
lr_user_data_point("Tomcat JVM Free memory", atof(lr_eval_string("{JVMFreeMemory}")));
lr_user_data_point("Tomcat JVM Total memory", atof(lr_eval_string("{JVMTotalMemory}")));
lr_user_data_point("Tomcat JVM Max memory", atof(lr_eval_string("{JVMMaxMemory}")));
return 0;
}
就是 这个脚本 在action里,看于涌的书说 “需要在controller连续不断的根据设定好的采样时间,不停的捕获和回写数据”,到底怎么样才能连续不断的捕获数据啊
是不是在设计场景时候要配什么 谢谢 |
|