51Testing软件测试论坛

标题: winxp32 ,LoadRunner11监控tomcat报错如图 [打印本页]

作者: likaihon    时间: 2014-7-4 17:51
标题: winxp32 ,LoadRunner11监控tomcat报错如图
代码:
Action()
{




lr_start_transaction("monitor tomcat");


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);


web_set_user("admin","123456","127.0.0.1:8080");


web_url("status",

"URL=http://127.0.0.1:8080/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("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;
}

运行结果
作者: msnshow    时间: 2014-7-12 15:05
没有必要用LR来监控




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2