likaihon 发表于 2014-7-4 17:51:28

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:47

没有必要用LR来监控
页: [1]
查看完整版本: winxp32 ,LoadRunner11监控tomcat报错如图