linux下swingbench压力测试工具安装避坑

2024年 4月 28日 39.6k 0

xmanager6工具准备:(如果本地使用就安装图形化GUI的系统即可,如果远程可以vnc远程桌面服务或xmanager)


win10安装xmanager6时可能你会发现安装不报错,但目录没有生成文件,处理办法是把日期时间调到2021年前即可。
安装成功如下:

网友给的xmanager6介质下载:
https://pan.baidu.com/s/1NMi66lrr-93Ig1hmEDA2kQ?at=1714121476531#list/path=%2F&parentPath=%2Fsharelink3861404325-698348587164516
安装完成后,没有xftp,可以安装一个winscp替代便于上传下载文件。

swingbench下载地址:

https://github.com/domgiles/swingbench-public/releases/tag/production
我的操作系统版本是CentOS Linux release 7.9.2009 (Core)
自带的java是1.8版本,不支持。

用oracle连接登录后显示的DISPLAY如下:此时可以通过xclock测试图形显示。

电脑左上角后弹出:

[oracle@11g bin]$ xclock
弹出时钟图形,说明调用图形化可行。
如果没安装,可以yum install xclock -y
[oracle@11g bin]$ pwd
/home/oracle/swingbench/bin
[oracle@11g bin]$ ll
total 60
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 ccwizard
-rwxr-xr-x 1 oracle oinstall 1134 Apr 5 2023 charbench
-rwxr-xr-x 1 oracle oinstall 195 May 6 2022 coordinator
drwxr-xr-x 2 oracle oinstall 4096 Feb 14 2023 data
-rwxr-xr-x 1 oracle oinstall 143 Jul 19 2017 jsonwizard
-rwxr-xr-x 1 oracle oinstall 110 Jul 19 2017 minibench
-rwxr-xr-x 1 oracle oinstall 150 Jan 15 2023 moviewizard
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 oewizard
-rwxr-xr-x 1 oracle oinstall 114 Jul 19 2017 results2pdf
-rwxr-xr-x 1 oracle oinstall 107 Jul 19 2017 sbutil
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 shwizard
-rwxr-xr-x 1 oracle oinstall 121 Nov 3 2016 sqlbuilder
-rwxr-xr-x 1 oracle oinstall 112 Jul 19 2017 swingbench
-rwxr-xr-x 1 oracle oinstall 150 Jul 19 2017 tpcdswizard
-rwxr-xr-x 1 oracle oinstall 147 Mar 14 2022 tpchwizard
[oracle@11g bin]$ ./oewizard
java.lang.UnsupportedClassVersionError: com/dom/benchmarking/swingbench/wizards/Wizard has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0----选择不带jdk11.zip版本的时候,java1.8报错52.0,java11的报错55.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:183)

升级jdk1.8到jdk11

[root@11g ~]# yum search java | grep jdk
找到java-11-openjdk的版本,然后安装
[root@11g ~]# yum install java-11-openjdk -y
检查java对于文件版本
[root@11g bin]$ ll /etc/alternatives/java
lrwxrwxrwx 1 root root 73 Apr 26 19:51 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.402.b06-1.el7_9.x86_6
[root@11g ~]# ln -s /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-1.el7_9.x86_64/bin/java /etc/alternatives/java
ln: failed to create symbolic link ‘/etc/alternatives/java’: File exists
[root@11g ~]# rm /etc/alternatives/java
rm: remove symbolic link ‘/etc/alternatives/java’? y
[root@11g ~]# ln -s /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-1.el7_9.x86_64/bin/java /etc/alternatives/java
删除原软连接,重新替换软连接成功:
[root@11g bin]$ ll /etc/alternatives/java
lrwxrwxrwx 1 root root 64 Apr 26 19:58 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-1.el7_9.x86_64/bin/java
[oracle@11g bin]$ java -version
openjdk version "11.0.22" 2024-01-16 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.22.0.7-1.el7_9) (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.22.0.7-1.el7_9) (build 11.0.22+7-LTS, mixed mode, sharing)

选择jdk11版本:


弹出了图形窗口,执行成功:




选择创建1G的测试一下,提示临时表空间太小,提前扩大一下。

最后执行完成:

简单测试:


保持测试结果:

[oracle@11g bin]$ pwd
/home/oracle/swingbench/bin
[oracle@11g bin]$ ll
total 104
-rw-r--r-- 1 oracle oinstall 7853 Apr 26 21:07 1.xml
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 ccwizard
-rwxr-xr-x 1 oracle oinstall 1134 Apr 5 2023 charbench
-rwxr-xr-x 1 oracle oinstall 195 May 6 2022 coordinator
drwxr-xr-x 2 oracle oinstall 4096 Feb 14 2023 data
-rwxr-xr-x 1 oracle oinstall 143 Jul 19 2017 jsonwizard
-rwxr-xr-x 1 oracle oinstall 110 Jul 19 2017 minibench
-rwxr-xr-x 1 oracle oinstall 150 Jan 15 2023 moviewizard
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 oewizard
-rwxr-xr-x 1 oracle oinstall 114 Jul 19 2017 results2pdf
-rw-r--r-- 1 oracle oinstall 20523 Apr 26 21:07 results.xml
-rwxr-xr-x 1 oracle oinstall 107 Jul 19 2017 sbutil
-rwxr-xr-x 1 oracle oinstall 141 Jul 19 2017 shwizard
-rwxr-xr-x 1 oracle oinstall 121 Nov 3 2016 sqlbuilder
-rwxr-xr-x 1 oracle oinstall 112 Jul 19 2017 swingbench
-rwxr-xr-x 1 oracle oinstall 150 Jul 19 2017 tpcdswizard
-rwxr-xr-x 1 oracle oinstall 147 Mar 14 2022 tpchwizard
-rw-r--r-- 1 oracle oinstall 8365 Apr 26 20:25 wizardlog.xml

[oracle@11g bin]$ ./results2pdf -c results.xml -o 1.pdf
Results2Pdf
Author : Dominic Giles
Version : 2.7.0.1311
Success : Pdf file 1.pdf was created from results.xml results file.


相关参考:
https://www.cnblogs.com/jyzhao/p/9568806.html
https://www.cnblogs.com/feiyun8616/p/9300534.html
https://blog.csdn.net/yushaoyyds/article/details/133958761
使用SQLBuilder功能在Swingbench中构建性能测试场景

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论