|
PerfMonAgent
PerfMon server agent tool
PerfMon Server AgentInstallationYou do not need any root/admin privilege. You just unzip somewhere in the server the serverAgent folder contained in the plugin package JMeterPlugins-VERSION.zip file. On UNIX platforms, give execution permission to startAgent.sh: $ chmod +x startAgent.sh The agent is written in Java, so you will need JRE 1.4+ to run it. Note you can create yourself an agent package which includes its own JRE so you don't have to install java on the server (I 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 INFO 2011-11-25 19:02:14.315 [kg.apc.p] (): Binding TCP to 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 INFO 2011-11-25 19:48:59.321 [kg.apc.p] (): Agent will shutdown when all clients disconnected INFO 2011-11-25 19:48:59.424 [kg.apc.p] (): Binding TCP to 4444 You can use the --sysinfo option to view available system objects: $ ./startAgent.sh --sysinfo INFO 2011-11-25 19:51:25.517 [kg.apc.p] (): *** Logging available processes *** INFO 2011-11-25 19:51:25.542 [kg.apc.p] (): Process: pid=24244 name=bash args=-bash INFO 2011-11-25 19:51:25.543 [kg.apc.p] (): Process: pid=25086 name=dash args=/bin/sh ./startAgent.sh --sysinfo INFO 2011-11-25 19:51:25.543 [kg.apc.p] (): Process: pid=25088 name=java args=java -jar ./CMDRunner.jar --tool PerfMonAgent --sysinfo INFO 2011-11-25 19:51:25.549 [kg.apc.p] (): *** Logging available filesystems *** INFO 2011-11-25 19:51:25.551 [kg.apc.p] (): Filesystem: fs=/dev type=devtmpfs INFO 2011-11-25 19:51:25.551 [kg.apc.p] (): Filesystem: fs=/ type=ext4 INFO 2011-11-25 19:51:25.551 [kg.apc.p] (): Filesystem: fs=/var/run type=tmpfs INFO 2011-11-25 19:51:25.551 [kg.apc.p] (): Filesystem: fs=/home type=ext4 INFO 2011-11-25 19:51:25.552 [kg.apc.p] (): Filesystem: fs=/var/lock type=tmpfs INFO 2011-11-25 19:51:25.552 [kg.apc.p] (): Filesystem: fs=/proc type=proc INFO 2011-11-25 19:51:25.553 [kg.apc.p] (): *** Logging available network interfaces *** INFO 2011-11-25 19:51:25.554 [kg.apc.p] (): Network interface: iface=lo addr=127.0.0.1 type=Local Loopback INFO 2011-11-25 19:51:25.554 [kg.apc.p] (): Network interface: iface=eth0 addr=192.168.0.1 type=Ethernet INFO 2011-11-25 19:51:25.555 [kg.apc.p] (): *** Done logging sysinfo *** INFO 2011-11-25 19:51:25.555 [kg.apc.p] (): Binding UDP to 4444 INFO 2011-11-25 19:51:26.560 [kg.apc.p] (): Binding TCP to 4444 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, let me know and I'll describe how to connect third-party client app to agent. | |
