前言测试文档
https://www.hikunpeng.com/document/detail/zh/techcert/certtest/testexct/kunpengcomtestool_06_0001.html
生态伙伴中心
https://www.hikunpeng.com/partnercenter/#/verification
测试步骤安装依赖
1yum -y install nmap ipmitool dmidecode pciutils util-linux util-linux net-tools sysstat bc
下载测试软件
https://mirrors.huaweicloud.com/kunpeng/archive/compatibility_testing/
命令
1wget https://mirrors.huaweicloud.com/kunpeng/archive/compatibility_testing/compatibility_testing.zip
解压
12unzip compatibility_testing.zipcd ~/compatibility_testing/Chinese
修改配置
1vi compatibility_testing.conf
配置如下
1234567891011121314# 待测试应用软件进程名称,多个应用名称以逗号隔开。application_names=gateway-0.0.1-SNAPSHOT.jar# 待测试应用软件启动命令,多个应用的启动命令以逗号隔开。start_app_commands=service 8301.sh start# 待测试应用软件停止命令,多个应用的停止命令以逗号隔开。stop_app_commands=service 8301.sh stop# 被测试应用软件的压力测试工具启动命令。start_performance_scripts=# Kubernetes集群填写“Y”。其他环境可置空。kubernetes_env=# 以下为多节点集群部署填写,单机(单节点)部署不需要填写。# 集群环境的IP地址列表,多个IP地址以逗号隔开,不包括当前脚本所在服务器IP地址,请勿填写本机IP地址。cluster_ip_lists=
执行测试
执行前要把测试的服务先停止
1sh compatibility_testing.sh
采集的结果会在测试的同级目录生成。
采集结束,日志打包完成,压缩包log_20241111164718.tar.gz存放在/root/compatibility_testing/Chinese。
压测工具流量访问压测工具 - ab
ab 是 Apache 自带的一个小型工具,用于测试 HTTP 服务器的性能。
使用场景:流量访问压测工具常用于评估 Web 服务器的性能,检测系统在并发访问下的表现。
ab工具安装:
12sudo yum install httpd-tools #Centos系统sudo apt-get install apache2-utils #ubuntu系统
测试网站的并发连接数
1ab -n 20 -c 5 https://www.baidu.com/
这将创建5个并发连接,每个连接执行20个请求。
测试网站的请求速度
1ab -n 1000 -c 100 https://www.baidu.com/
这将创建100个并发连接,总共执行1000个请求.这时可以通过监控观察cpu和内存,用来初步评估平台的并发承载能力。
鲲鹏DevKithttps://www.hikunpeng.com/document/detail/zh/kunpengdevps/userguide/usermanual/KunpengDevKit_0004.html
其中的应用迁移工具能生成迁移报告。
安装插件安装
在Visual Studio Code扩展菜单中搜索Kunpeng DevKit,单击“安装”。
服务器上测试软件安装
https://www.hikunpeng.com/developer/devkit/download
下载
1wget "https://kunpeng-repo.obs.cn-north-4.myhuaweicloud.com/Kunpeng DevKit/Kunpeng DevKit 24.0.RC3/DevKit-All-24.0.RC3-Linux-Kunpeng.tar.gz"
安装依赖包
1yum install -y file passwd which hostname procps iproute make acl gcc-c++ gcc glibc openssl sudo sqlite wget lsof unzip gzip expect libcap rpm-build e2fsprogs crontabs pcre pcre-devel zlib zlib-devel openssl-devel
解压
1tar --no-same-owner -zxvf DevKit-All-24.0.RC3-Linux-Kunpeng.tar.gz
进入解压目录
1cd DevKit-All-24.0.RC3-Linux-Kunpeng/
进行安装
1./install.sh
测试在VSCode的插件Kunpeng DevKit中登录
点击新建“快速创建鲲鹏工程或任务”,默认选择“迁移”功能中“软件迁移评估”,点击“确认”。