jmeter 监控服务器的内存,cpu等内容
1、需要下载一个jar包,放入到lib /ext文件中 JMeterPlugins-Standard.jar
2、在服务器上安装 perfmon server agent
这里监控内存我们使用的是:jp@gc - PerfMon Metrics Collectot
在使用之前,我们需要运行/serverAgent/startAgent.bat这个文件,我们需要将serverAgent目录及下面的文件复制到我们测试的服务器上,然后点击打开
3、 创建监控器时选择如图:

PerfMon Server AgentInstallationYou do not need any root/admin privilege. You can just unzip the the ServerAgent-X.X.X.zip somewhere on the server. Then launch the agent using startAgent.sh script on Unix, or startAgent.bat script on Windows. The agent is written in Java, so you will need JRE 1.4+ to run it. Note you can create yourself the agent package which includes its own JRE so you don't have to install java on the server (We tested it on windows platform). To do this, just create a JRE folder in the agent folder and copy one installed JRE inside. Change the java command inside the .bat file to the path to the java executable and it will work. Once the agent is running, you can use the PerfMon Metrics Collector Listener to connect to the agents. You can add multiple servers to monitor, one graph can display several kinds of metrics (cpu, memory, etc...), auto-zooming rows for best view. UsageTo start the agent, simply run startAgent bat/sh file. It will open UDP/TCP server ports where JMeter will connect and query the metrics. Some information will be printed to standard output, informing you on problems gathering metrics (logging verbosity regulated with --loglevel parameter). You can specify the listening ports as arguments (0 disables listening), default is 4444: $ ./startAgent.sh --udp-port 0 --tcp-port 3450 You can use the --auto-shutdown option when starting the agent to automatically stop it once the test is finished. It is recommended to use this feature only with TCP connections: $ undera@undera-HP:/tmp/serverAgent$ ./startAgent.sh --udp-port 0 --auto-shutdown You can use the --sysinfo option to view available system objects: $ ./startAgent.sh --sysinfo The --interval <seconds> argument can be used to change metrics collection frequency. Using Server Agent With Other ApplicationsServer Agent uses simple plain-text protocol, anyone can use agent's capabilities implementing client, based on kg.apc.perfmon.client.Transport interface. If anyone's interested, start the topic on the support forums and I'll describe how to connect third-party client app to agent. ServerAgent has simple text protocol and can work on UDP and TCP transports. Most of cases will use TCP. To have your first talk with the agent, start it locally. Then use telnet utility to connect to it: user@ubuntu:~$ telnet localhost 4444 If connection has succeeded, you should see "Accepting new TCP connection" message in ServerAgent console log. Type "test" and press Enter in telnet chat, server should answer with short "Yep": test Type "exit": exit That's it. You sending a command line, server answering. Command line consists of command, sometimes with parameters. Parameters are separated from command with a colon sign. Possible commands are:
Specifying MetricsMetrics list consists of metric specifications, separated by TAB character. Metric collection output consists of float values, TAB separated. Example: metrics-single:cpumemory Each metric specification consists of several fields, colon-separated. Short example: metrics-single:cpu:idle memory:free Fields number is metric-type specific. Possible metric types are:
Fields corresponding to each metric type are described at metrics page. Last example (Yep, ServerAgent can be shell exec vulnerability. If you have issue with this, ask me and I'll introduce 'secure' mode, disabling insecure metric types): metrics-single:exec:/bin/sh:-c:free | grep Mem | awk '{print $7}'
|
jmeter 监控服务器的内存,cpu等内容的更多相关文章
- Jmeter监控服务器的CPU
1.Jmeter监控服务器的软件:链接: https://pan.baidu.com/s/1Ag75IXqR2XMe8RpZA4nvHg 密码: yki2 2.(1)Window版本 <1> ...
- 『动善时』JMeter基础 — 61、使用JMeter监控服务器
目录 1.监控插件安装 2.启动监控服务 3.使用JMeter监控服务器 (1)测试计划内包含的元件 (2)HTTP请求界面内容 (3)配置jp@gc-PerfMon Metrics Collecto ...
- Jmeter监控服务器笔记
Jmeter监控服务器-CPU,Memory,Disk,Network性能指标 本文主要说一下如何通过JMeter插件来监控服务器CPU.内存.磁盘.网络等相关资源. 一.下载 首先进入网址https ...
- 使用jmeter监控服务器性能指标
先下载jmeter-ServerAgent Windows下载和Linux下载 https://jmeter-plugins.org/wiki/PerfMon/ 找到ServerAgent的下载链接 ...
- ubuntu查看系统资源占用(内存,cpu和进程)
ubuntu查看系统资源占用(内存,cpu和进程) 1 top 查看ubuntu的资源占用的命令为$: top 说明:top命令就可以查看内存,cpu和进程了,很方便 top: 主要参数 d: ...
- linux查看内存cpu占用
linux查看内存cpu占用top 命令 按q退出 可以添加额外选项选择按进程或按用户查看如: top -u gitu PID:进程idPR:进程的优先级别,越小越优先被执行NInice:值VIRT ...
- vs中调试程序查看变量在内存中的内容的方法
vs中调试程序 查看变量在内存中的内容的方法 https://blog.csdn.net/guojg1988/article/details/42922149 原文链接:http://www.sows ...
- JMeter监控服务器CPU、内存的方法
jmeter也可以像loadrunner一样监控服务器CPU.内存等性能参数,不过需要安装一些插件 一.首先下载监控服务器的插件 链接:https://pan.baidu.com/s/1o9Zuw ...
- jmeter ---监控服务器CPU, 内存,网络数据
JMeter如何收集获得服务器cpu,内存,磁盘,网络等相关资源使用率的信息 1. JMeter 自带的Monitor Results 监控 JMeter 自带的Monitor Results 在官网 ...
随机推荐
- 深入理解javascript---如何编写高质量的代码?
如何书写可维护的代码? 最小全局变量 JavaScript通过函数管理作用域.在函数内部声明的变量只在这个函数内部,函数外面不可用.另一方面,全局变量就是在任何函数外面声明的或是未声明直接简单使用的( ...
- 总结CSS3新特性(选择器篇)
CSS3新增了嗯- -21个选择器,脚本通过控制台在这里运行; ~: p ~ p { color : red;/*此条规则将用于p后边所有的p...就是除了第一个p的所有p,规则同p:not(:nth ...
- 原创:phoenix4.6.0连接hbase1.1.2(不使用phoenix-4.6.0-HBase-1.1-client.jar)
官网上面的例子是在phoenix-4.6.0-HBase-1.1-client.jar完成的,这个jar包含了phoenix4.6连接hbase1.1.2所有的依赖,真是包罗万象(里面竟然还包括了se ...
- android绘制view的过程
1 android绘制view的过程简单描述 简单描述可以解释为:计算大小(measure),布局坐标计算(layout),绘制到屏幕(draw): 下面看看每一步的动作到底是 ...
- sqlite3 not found问题解决方法
测试发现,有些Android手机自带sqlite3命令,有些不带.对于不带sqlite3的手机,我们可以手动将sqlite3加入系统. 执行如下命令 adb remount adb push 路径/s ...
- C语言32个关键字
auto 局部变量(自动储存) break无条件退出程序最内层循环 case switch语句中选择项 char单字节整型数据 const定义不可更改的常量值 continue中断本次循环,并 ...
- iOS Unicode和汉字互转
//unicode转中文 NSString* strA = [@"%E4%B8%AD%E5%9B%BD"stringByReplacingPercentEscapesUsingEn ...
- VisualSVN Server的配置和使用方法 图文
转载 http://www.jb51.net/article/17365.htm VisualSVN Server是免费的,而VisualSVN是收费的.VisualSVN是SVN的客户端,和Visu ...
- Java注解一谈
阅读目录 1.元注解 2.自定义注解 3.注解处理器 android注解框架解析 我们经常会在java代码里面看到:“@Override”,“@Target”等等样子的东西,这些是什么? 在java里 ...
- BIEE建模参考规范
BIEE建模参考规范 注:本文基于网上盛传的“BIEE建模黄金法则”,并做了更为细致的讲解,以及修改. 物理层 1. 在可能的情况下,配置你的连接池使用本地驱动来连接物理数据库.例如,使用OCI而不 ...