Linux系统启动jmeter可视化界面

目的:方便在Linux系统调试jmeter脚本。操作:Linux启动jmeter可视化界面,不能使用root用户,需要创建新用户,切换到新用户启动jmeter。


1. 创建用户

  创建一个新的系统用户。

[yyuser@zwzf-cwy-lzy-7-new ~]$ sudo -i
[root@zwzf-cwy-lzy-7-new ~]# useradd jmeter
[root@zwzf-cwy-lzy-7-new ~]# passwd jmeter
Changing password for user jmeter.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@zwzf-cwy-lzy-7-new ~]#

2. 用户赋权

  给新建系统用户赋予jmeter环境变量所在路径访问权限。

[root@zwzf-cwy-lzy-7-new opt]# chown -R jmeter /opt/apache-jmeter-5.4.1

3. 登录新用户

  重新访问虚拟机,登录新建用户。

[yyuser@zwzf-cwy-lzy-7-new ~]$ su - jmeter
Password:
[jmeter@zwzf-cwy-lzy-7-new ~]$

4. 启动jmeter

  使用新用户,启动jmeter图形化界面。

[jmeter@zwzf-cwy-lzy-7-new ~]$ jmeter
Apr 06, 2023 3:47:35 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
================================================================================
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use CLI Mode (was NON GUI):
   jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
& increase Java Heap to meet your test requirements:
   Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check : https://jmeter.apache.org/usermanual/best-practices.html
================================================================================
[2023-04-06 15:47:37] [WARNING] System property 'awt.useSystemAAFontSettings' is not set. Using 'LCD HRGB antialiasing text mode'
It's recommended to manually add the property to the JVM startup parameters on your platform for optimal text antialiasing. Refer to the [documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html#aaFonts)for more information on the possible values. [at com.github.weisj.darklaf.task.FontDefaultsInitTask]
Apr 06, 2023 3:47:37 PM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Apr 06, 2023 3:47:37 PM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Apr 06, 2023 3:47:37 PM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Apr 06, 2023 3:47:37 PM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial
Apr 06, 2023 3:47:38 PM com.kitfox.svg.Text buildText
WARNING: Could not create font Arial


使用root用户,会出现如下问题:

[root@zwzf-cwy-lzy-13 jmeter]# jmeter
================================================================================
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use CLI Mode (was NON GUI):
   jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
& increase Java Heap to meet your test requirements:
   Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check : https://jmeter.apache.org/usermanual/best-practices.html
================================================================================
An error occurred: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值