下载安装包
启动服务
直接安装包启动
nohup java -Xmx4g -Xms4g -XX:MaxMetaspaceSize=256m -jar ngrinder-controller-3.5.5-p1.war --port 8081 > /dev/null 2>&1 &
也可以放在tomcat里启动
当 nGrinder Controller 启动时,nGrinder 将创建 ${user.home}/.ngrinder 目录到用户的主目录中。该目录包含默认配置文件和数据。以下是 .ngrinder 文件夹的默认位置。
窗口:C:\Users\ ${user.home}.ngrinder
Unix/Linux :${user.home}/.ngrinder
但是,如果您想为主目录分配其他目录,请在运行 ngrinder 之前设置环境变量 ${NGRINDER_HOME} 或者您可以在命令行中提供“--ngrinder-home HOME_PATH”。
Name | Example | overriden properties | description |
---|---|---|---|
-p / –port | -p 80 | - | HTTP port of the server. The default port is 8080. |
-c / --context-path | -c ngrinder | - | Web context path of controller. The default context path is “”. For example, if you provide “ngrinner” here, the access url will be “http://localhost:8080/ngrinder” |
-cm / --cluster-mode | -cm easy | cluster.mode | cluster mode. There are three availbale options(none / easy / advanced). The default value is “none” |
-nh / --ngrinder-home | -nh ~/ngrinder | ngrinder.home | home path. By default it’s the “~/.ngrinder” |
-exh / --exhome | -ex ~/ngrinder_ex | ngrinder.exhome | extended home path. By default it’s the “~/.ngrinder_ex” If you want to know what ngrinder extended home path is, See TBD. |
-D | -Ddatabase=cubrid &database_url=blar | can override all | Dynamic properties. This options can override all the configuration defined in database.conf and system.conf |
-h / --help / –? | -h | show help |
安装agent
nGrinder 3.3 代理是从控制器下载的。下载的代理包已经包含连接到下载代理的控制器的默认代理配置。因此,只需解压 tar 文件并运行“run_agent.sh”或“run_agent.bat”即可使代理连接到控制器
run_agent.sh # for linux / mac
run_agent_bg.sh # If you want to run it in the background for linux / mac
停止agent
stop_agent.sh # for linux / mac
安装Monitor
nGrinder Monitor 是代理包的子集,安装在目标机器上,用于收集负载下的系统统计信息(如 CPU、MEM 和网络)。
您也可以从控制器下载监视器。
在admin控制台上下载monitor
然后解压监视器包并运行批处理文件或 shell 文件。
run_monitor_bg.sh # for linux / mac
如果要停止监视器,请运行以下命令。
stop_monitor.sh # for linux / mac