51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1836|回复: 1
打印 上一主题 下一主题

winxp32 ,LoadRunner11监控tomcat报错如图

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2014-7-4 18:03:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
代码:
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;
}

运行结果:

Starting action Action.
Action.c(6): Notify: Transaction "monitor tomcat" started.
Action.c(8): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(14): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(20): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(26): web_set_user was successful          [MsgId: MMSG-26392]
Action.c(28): Error -26628: HTTP Status-Code=403 (Forbidden) for "http://127.0.0.1:8080/manager/status"          [MsgId: MERR-26628]
Action.c(28): Error -26377: No match found for the requested parameter "JVMFreeMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): Error -26377: No match found for the requested parameter "JVMTotalMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): Error -26377: No match found for the requested parameter "JVMMaxMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): web_url("status") highest severity level was "ERROR", 5813 body bytes, 681 header bytes, 24 chunking overhead bytes          [MsgId: MMSG-26387]
Action.c(28): Notify: Transaction "monitor tomcat" ended with "Fail" status (Duration: 0.6659 Wasted Time: 0.5223).
Ending action Action.

不知道哪里出错了,一直都没有成功,哪位大侠帮忙解决一下,非常感谢
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    奋斗
    2019-3-7 09:49
  • 签到天数: 133 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2014-7-23 11:32:41 | 只看该作者
    这个没试过,帮你顶下
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-4-27 00:29 , Processed in 0.073483 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表