diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/README b/component/CompatibilityTesting/compatibility_testing/Chinese/README new file mode 100644 index 0000000000000000000000000000000000000000..04b60c9297c419d6d74deb71d6a311a334a9ec85 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/README @@ -0,0 +1,131 @@ +======================================================================= +#功能描述: 提供给用户进行兼容性测试、指标日志采集工具 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录: 2022-03-02 修改 +======================================================================= + +#########################环境依赖###################################### +1. 系统版本 CentOS 7.6,中标麒麟 V7Update6,Ubuntu 18.0.1,银河麒麟4.0.2, +UOS 20 SP1,SUSE 12-SP5,openEuler 20.03 (LTS) + +2. RPM包安装: +nmap-ncat,nmap,ipmitool,dmidecode,net-tools,pciutils,util-linux,sysstat +bc. + +3. 多节点集群部署,在每台节点服务器上配置对自身节点和其他所有节点的SSH免密登录。 + +#########################执行步骤###################################### +1. 修改compatibility_testing.conf配置文件,填写以下内容: + + +# 待测试应用软件进程名称,多个应用名称以逗号隔开。 +# 可通过ps或者docker top 命令CMD所在列查找后台进程名称, Kubernetes集群环境下填写Pod名称。 +application_names= +# 待测试应用软件启动命令,多个应用的启动命令以逗号隔开。 +start_app_commands= +# 待测试应用软件停止命令,多个应用的停止命令以逗号隔开。 +stop_app_commands= +# 被测应用软件的压力测试工具启动命令。 +start_performance_scripts= +# Kubernetes集群填写"Y"。其他环境可置空。 +kubernetes_env= + +# 以下为集群部署填写,单机部署不需要填写。 +# 集群环境的IP地址列表,多个IP地址以逗号隔开,不包含当前脚本所在的服务器IP地址, 请勿填写本机IP地址。 +cluster_ip_lists= + +# 以下为Validated认证测试填写,Compatible认证测试不需要填写。 +# CVE漏洞扫描目录,多个目录以逗号隔开,Validated认证测试有自己的CVE漏洞检查工具不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +cve_scan_path= +# clamav防病毒扫描目录,多个目录以逗号隔开,Validated认证测试有自己的商用杀毒软件不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +clamav_scan_path= + +# 以下为HPC应用方案认证填写,HPC应用测试填写"Y",其他应用认证测试可置空。 +hpc_certificate= + +# 以下涉及C/C++语言应用填写,请填写待测试应用二进制文件的绝对路径。 +binary_files= + +2. 确认填写后,使用root用户执行采集工具。 + +用法: +CentOS/中标麒麟/SUSE/openEuler:使用root用户执行,sh compatibility_testing.sh +Ubuntu/银河麒麟/UOS:使用root用户执行,bash compatibility_testing.sh +多节点集群部署情况下,在控制节点(主节点)执行脚本。 + + + +自动化测试采集工具开始执行,脚本分为10个步骤,运行时间约50分钟,请耐心 +等待。执行步骤如下: +*********************************************************************** +第 1 步:软件依赖检查,开始 +第 1 步:软件依赖检查,完成 +第 2 步:配置文件检查, 开始 +第 2 步:配置文件检查, 完成 +第 3 步:测试环境自检, 开始 +第 3 步:测试环境自检, 完成 +第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +第 4 步:应用启动前采集结束 +第 5 步:启动业务应用 +第 5 步:启动业务应用完成 +第 6 步:安全测试,进行应用运行期间监听端口扫描 +第 6 步:安全扫描结束 +第 7 步:进行业务压力下CPU、内存、硬盘和网卡系统资源采集 +第 7 步:进行测试采集结束. +第 8 步:进行可靠性测试,强制KILL应用后正常启动测试 +第 8 步:可靠性测试结束. +第 9 步:应用停止后CPU、内存、硬盘、网卡和功耗系统资源采集 +第 9 步:应用停止后测试采集结束 +第 10 步:测试采集数据打包 +采集结束,日志打包完成,压缩包log_yyyymmddHHMMSS.tar.gz存放在脚本执行目录。 + +*********************************************************************** + + +#########################输出压缩文件的目录结果######################## +├── compatibility_testing.conf +├── hardware +│   ├── hardware_cpu.log +│   ├── hardware_disk.log +│   ├── hardware_info.log +│   └── hardware_pcie.log +├── others +│   └── info.log_yyyymmdd +├── product +│   └── product_name.log +├── software +│   └── system_version.log +├── system +│   └── message.log +└── test + ├── compatiable + │   ├── test_perf_cpu_0.log + │   ├── test_perf_cpu_1.log + │   ├── test_perf_disk_0.log + │   ├── test_perf_disk_1.log + │   ├── test_perf_mem_0.log + │   ├── test_perf_mem_1.log + │   ├── test_perf_net_0.log + │   └── test_perf_net_1.log + ├── dfx + ├── function + ├── performance + │   ├── test_perf_cpu_1.log + │   ├── test_perf_disk_1.log + │   ├── test_perf_mem_1.log + │   └── test_perf_net_1.log + ├── power + │   ├── test_power_0.log + │   └── test_power_1.log + └── safety + ├── {ip}protocol.gnmap + ├── {ip}protocol.nmap + ├── {ip}protocol.xml + ├── {ip}tcp.gnmap + ├── {ip}tcp.nmap + ├── {ip}tcp.xml + ├── {ip}udp.gnmap + ├── {ip}udp.nmap + └── {ip}1udp.xml diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.conf b/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.conf new file mode 100644 index 0000000000000000000000000000000000000000..f9131d0caa4ddf6d49ba2b325decb2ea5d97ffc9 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.conf @@ -0,0 +1,48 @@ +################################################################################## +#功能描述: 提供给用户进行兼容性测试、性能测试的指标日志采集工具 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录: 2022-08-17 修改 +#使用方法:自动化采集开始前,请用户先配置compatibility_testing.conf, +# 填写待测试应用名称application_names, +# 待测试应用启动命令start_app_commands, +# 待测试应用停止命令stop_app_commands +# 被测应用软件的压力测试工具启动命令start_performance_scripts, +# 确认填写后 +# CentOS/中标麒麟/SUSE/openEuler:使用root用户执行,sh compatibility_testing.sh。 +# Ubuntu/银河麒麟/UOS:使用root用户执行,bash compatibility_testing.sh。 +# 多节点集群部署,在每台节点服务器上配置对自身节点和其他所有节点的SSH免密登录。并在控制节点(主节点)执行脚本。 +################################################################################### + +# 待测试应用软件进程名称,多个应用名称以逗号隔开。 +# 可通过ps或者docker top 命令CMD所在列查找后台进程名称, Kubernetes集群环境下填写Pod名称。 +application_names=test_app +# 待测试应用软件启动命令,多个应用的启动命令以逗号隔开。 +start_app_commands=nohup python3 /home/test/test_app.py & +# 空载采集时间(分钟) +idle_performance_time=1 +# 待测试应用软件停止命令,多个应用的停止命令以逗号隔开。 +stop_app_commands= +# 被测应用软件的压力测试工具启动命令。 +start_performance_scripts= +# 被测应用软件的压力测试工具运行时间(分钟) +start_performance_time= +# Kubernetes集群填写"Y"。其他环境可置空。 +kubernetes_env= + +# 以下为多节点集群部署填写,单机(单节点)部署不需要填写。 +# 集群环境的IP地址列表,多个IP地址以逗号隔开,列表不应包括当前脚本所在服务器IP地址,请勿增加。 +cluster_ip_lists= + +# 以下为Validated认证测试填写,Compatible认证测试不需要填写。 +# CVE漏洞扫描目录,多个目录以逗号隔开,Validated认证测试有自己的CVE漏洞检查工具不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +cve_scan_path= +# clamav防病毒扫描目录,多个目录以逗号隔开,Validated认证测试有自己的商用杀毒软件不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +clamav_scan_path= + +# 以下为HPC应用方案认证填写,HPC应用测试填写"Y",其他应用认证测试可置空。 +hpc_certificate= + +# 以下为C/C++编译的应用填写,请填写待测试应用二进制文件的绝对路径。 +binary_file= diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.sh new file mode 100644 index 0000000000000000000000000000000000000000..994657e98b53bcf0e0dd3027bf427f02af818d11 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/compatibility_testing.sh @@ -0,0 +1,1200 @@ +#!/bin/bash +################################## +#功能描述: 提供给用户进行兼容性测试、指标日志采集工具 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2023 +#修改记录:2023-04-08 修改 +################################## +# 创建日志目录 +clear +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +APP_PID="" +STRESS_CMD=-1 +LIB_PATH=${CURRENT_PATH}/../lib/ +REMOTE_EXECUTIVE_PATH=/home/compatibility_testing/Chinese/ +REMOTE_LIB_PATH=/home/compatibility_testing/lib/ +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +nmap_log_file=nmap.log_${current_time} +# 清空日志文件。 +log_files=( "${CURRENT_PATH}"/log/"${error_file}" "${CURRENT_PATH}"/log/"${app_log_file}" "${CURRENT_PATH}"/log/"${nmap_log_file}") +for file in "${log_files[@]}"; do + if [[ -e "${file}" ]]; then + cat /dev/null >"${file}" + else + touch ${file} + fi +done + +# 是否有配置测试工具启动命令。 +TEST_TOOL_COMM=0 +# 配置测试工具运行时间 +TEST_TOOL_TIME=0 +# 配置空载采集时间 +IDLE_PERFORMNCE_TIME=0 +# 是否有配置应用启动命令。 +START_APP_COMM=0 +# 是否有配置应用停止命令。 +STOP_APP_COMM=0 +# 命令执行失败后,手动停止业务应用。 +HAND_STOP_APP=0 +# 命令执行失败后,手动启动业务应用。 +HAND_START_APP=0 +# 命令执行失败后,手动启动测试工具。 +HAND_START_TEST=0 +# 判断是否安装鲲鹏开发套件 +HAS_KUNPENG_DEVKIT=0 +SYS_LOG_="messages" +DEBUG=0 +# 判断是否集群部署 +HAS_CLUSTER_ENV=0 +KUBERNETES_ENV=0 +CLAMAV_SCAN=0 +CVE_SCAN=0 +HPC_CERTIFICATE=0 +BINARY_PACK=0 +CURRENT_SYS="" +O_S_VERSION="" +declare -a product_result_array +declare -a snapshot_result_array +declare -a performance_test_pid_array + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case ${level_info} in + i) echo "#${DATE}#info#${step}#${messages}" >> ./log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> ./log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> ./log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> ./log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;${colors}m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> ./log/"${log_file}" + ;; + esac +} + +notice_users() { + write_messages c 34 0 "自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README" + write_messages c 34 0 "自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。" + write_messages i 0 0 "自动化测试采集工具开始执行。" +} + +production_env_waring() { + write_messages c 31 0 "测试期间会不断启动和停止待测试应用软件,请勿在生产环境执行兼容性测试工具。确认当前环境不是生产环境,请回复 N ,是生产环境请回复 Y ?" + read -r INPUT_ + write_messages c 31 0 "您输入的是 ${INPUT_} " + if [[ "${INPUT_}" == "Y" || "${INPUT_}" == "y" ]]; then + exit + fi +} + + +check_configuration() { + # 检查用户填写配置项是否为空 + config_file="${CURRENT_PATH}""/compatibility_testing.conf" + + if [[ -f "${config_file}" ]]; then + application_names=$(sed '/^application_names=/!d;s/application_names=//' "${config_file}") + start_app_commands=$(sed '/^start_app_commands=/!d;s/start_app_commands=//' "${config_file}") + stop_app_commands=$(sed '/^stop_app_commands=/!d;s/stop_app_commands=//' "${config_file}") + start_performance_time=$(sed '/^start_performance_time=/!d;s/start_performance_time=//' "${config_file}") + start_performance_scripts=$(sed '/^start_performance_scripts=/!d;s/start_performance_scripts=//' "${config_file}") + cluster_ip_lists=$(sed '/^cluster_ip_lists=/!d;s/cluster_ip_lists=//' "${config_file}") + kubernetes_env=$(sed '/^kubernetes_env=/!d;s/kubernetes_env=//' "${config_file}") + cve_scan_path=$(sed '/^cve_scan_path=/!d;s/cve_scan_path=//' "${config_file}") + clamav_scan_path=$(sed '/^clamav_scan_path=/!d;s/clamav_scan_path=//' "${config_file}") + hpc_certificate=$(sed '/^hpc_certificate=/!d;s/hpc_certificate=//' "${config_file}") + binary_file=$(sed '/^binary_file=/!d;s/binary_file=//' "${config_file}") + idle_performance_time=$(sed '/^idle_performance_time=/!d;s/idle_performance_time=//' "${config_file}") + if [[ -z "${application_names}" ]]; then + write_messages e 31 2 "配置文件中的应用名称为空,请填写正确后重启脚本。" + exit 1 + fi + if [[ -z "${start_app_commands}" ]]; then + write_messages e 31 2 "应用启动命令为空。" + START_APP_COMM=1 + exit 1 + fi + if [[ -z "${stop_app_commands}" ]]; then + write_messages e 31 2 "应用停止命令为空。" + STOP_APP_COMM=1 + fi + export STRESS_CMD + if [[ -z "${start_performance_scripts}" ]]; then + write_messages e 31 2 "压力测试工具启动命令为空。" + + STRESS_CMD=0 + TEST_TOOL_COMM=1 + else + STRESS_CMD=1 + fi + if [[ -n "${start_performance_scripts}" && ! "${start_performance_time}" -gt 0 ]]; then + write_messages e 31 2 "压力测试工具运行时间必须大于0" + exit 1 + else + TEST_TOOL_TIME=${idle} + fi + if [[ ! "${idle_performance_time}" -gt 0 ]]; then + write_messages e 31 2 "空载采集时间需提供或空载采集时间必须大于0." + exit 1 + else + IDLE_PERFORMNCE_TIME=${idle_performance_time} + fi + + if [[ -n "${cluster_ip_lists}" ]]; then + HAS_CLUSTER_ENV=1 + fi + if [[ -n "${kubernetes_env}" && "${kubernetes_env}" == "Y" ]];then + KUBERNETES_ENV=1 + fi + if [[ -n "${cve_scan_path}" ]];then + CVE_SCAN=1 + fi + if [[ -n "${clamav_scan_path}" ]];then + CLAMAV_SCAN=1 + fi + if [[ -n "${hpc_certificate}" ]];then + HPC_CERTIFICATE=1 + fi + if [[ -n "${binary_file}" ]];then + BINARY_PACK=1 + fi + else + write_messages e 31 2 "配置文件不存在,请检查。" + exit + fi +} + +create_result_dir() { + # 创建采集目录 + write_messages i 0 1 "创建目录" + result_dirs=("data/hardware/" "data/software/" "data/system/" "data/product/" + "data/test/performance/" "data/test/compatiable/" "data/test/function/" + "data/test/power/" "data/test/safety" "data/test/dfx" "data/others") + for dir in "${result_dirs[@]}"; do + if [[ ! -d "${dir}" ]]; then + mkdir -p "${dir}" + else + find ./"${dir}" -type f -name "*.log*" -exec rm {} \; + fi + done + # 删除远端服务器的文件 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@${ip_addr} "if [ -d ${REMOTE_EXECUTIVE_PATH} ];then cd ${REMOTE_EXECUTIVE_PATH}; rm -rf data log;fi" + done + fi + IFS="${OLD_IFS}" +} + +get_service_info() { + # 获取服务器信息 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + path="data/hardware/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + path="data/software/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + scp -r ${CURRENT_PATH}/obtain_service_info.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + scp ${CURRENT_PATH}/../lib/cvecheck ${ip_addr}:${REMOTE_LIB_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x obtain_service_info.sh; bash obtain_service_info.sh" + done + bash obtain_service_info.sh + else + bash obtain_service_info.sh + fi + + if [[ ${BINARY_PACK} -eq 1 ]]; then + if [[ -f ${binary_file} ]]; then + + gcc_file="data/software/system_version.log" + echo -e "\n=${binary_file}=" >>${gcc_file} 2>> /dev/null; + echo -e "\n=============binary files=============" >>${gcc_file} 2>> /dev/null; + strings ${binary_file} |grep -E 'GCC|gcc|clang' >>${gcc_file} 2>> /dev/null; + else + write_messages e 0 4 "配置文件填写的二进制文件不存在。" + fi + fi + + file_name_list=("data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" "data/hardware/hardware_cpu.log" + "data/hardware/hardware_disk.log" "data/software/system_version.log") + smartctl_file_name="data/hardware/hardware_smartctl.log" + command_desc=("服务器型号" "pci信息" "CPU信息" "硬盘分区" "内核信息") + length=${#file_name_list[@]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + if [[ -f ${file_name} ]]; then + product_result_array[$i]='True' + else + product_result_array[$i]='False' + fi + done + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + ip_length=${#ip_list[@]} + for ((j =0;j<"${ip_length}";j++));do + ip_addr=${ip_list[$j]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + index=$((length * (j + 1) + i)) + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_name} ${file_name}_${ip_addr} >/dev/null + if [[ $? -eq 0 ]];then + product_result_array[$index]='True' + else + product_result_array[$index]='False' + fi + done + + + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${smartctl_file_name} ${smartctl_file_name}_${ip_addr} >/dev/null + + done + fi + IFS="${OLD_IFS}" +} + +get_ps_snapshot() { + # 获取服务器进程的快照 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + file_path="data/product/" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + file_name='product_name.log' + index=0 + if ! ps aux >${file_path}${file_name}; then + snapshot_result_array[$index]='False' + write_messages e 0 5 "调用ps aux命令获取服务器进程快照失败" + else + snapshot_result_array[$index]='True' + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + index=$(( index + 1 )) + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; mkdir -p ${file_path}; ps aux >${file_path}${file_name}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + if [[ $? -eq 0 ]];then + snapshot_result_array[$index]='True' + else + snapshot_result_array[$index]='False' + fi + done + fi + IFS="${OLD_IFS}" +} + +check_system_message() { + # 检查系统日志 + # 参数1:开始时间 + # 参数2:结束时间 + start_time=$1 + end_time=$2 + file_path="data/system/" + file_name="message.log" + error_file_name="err_messages.log" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + system_message_result='True' + if [[ ${start_time}x == ""x || ${end_time}x == ""x ]]; then + grep -i -E 'fail|error' /var/log/"${SYS_LOG_}" > "${file_path}""${error_file_name}" + else + if ! sed -n /"${start_time}"/,/"${end_time}"/p /var/log/"${SYS_LOG_}" >"${file_path}""${file_name}"; then + system_message_result='False' + write_messages e 0 9 "执行获取服务器日志失败" + write_messages s 0 9 "调用sed -n '/${start_time}/,/${end_time}/p' /var/log/${SYS_LOG_}命令失败" + else + grep -i -E 'fail|error' "${file_path}""${file_name}" > "${file_path}""${error_file_name}" + fi + fi +} + +tar_output() { + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + current_time=$(date "+%Y%m%d%H%M%S") + # 检查文件是否存在 + result_files=("data/hardware/hardware_cpu.log" "data/hardware/hardware_disk.log" + "data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" + "data/product/product_name.log" "data/software/system_version.log" + "data/test/performance/test_perf_cpu_1.log" "data/test/performance/test_perf_disk_1.log" + "data/test/performance/test_perf_mem_1.log" "data/test/performance/test_perf_net_1.log" + "data/test/compatiable/test_perf_cpu_0.log" + "data/test/compatiable/test_perf_cpu_1.log" "data/test/compatiable/test_perf_disk_0.log" + "data/test/compatiable/test_perf_disk_1.log" "data/test/compatiable/test_perf_mem_0.log" + "data/test/compatiable/test_perf_mem_1.log" "data/test/compatiable/test_perf_net_0.log" + "data/test/compatiable/test_perf_net_1.log" ) + for data_file in "${result_files[@]}"; do + if [[ ! -f "${data_file}" ]]; then + write_messages e 0 10 "数据目录下的日志文件${data_file}不存在" + fi + done + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + for data_file in "${result_files[@]}"; do + data_file=${data_file}_${ip_addr} + if [[ ! -f "${data_file}" ]]; then + write_messages e 0 10 "数据目录下的日志文件${data_file}不存在" + fi + done + done + fi + + record_log_file=( "${error_file}" "${app_log_file}" "${log_file}") + for file in "${record_log_file[@]}"; do + if [[ -f ./log/"${file}" ]]; then + cp ./log/"${file}" ./data/others/ + else + write_messages e 0 10 "./log/目录下的日志文件${file}不存在" + fi + done + if [[ -f "${config_file}" ]]; then + cp "${config_file}" ./data/ + fi + if ! tar -czf log.tar.gz data; then + write_messages e 0 10 "压缩文件出错" + fi + write_messages c 34 10 "采集结束,日志打包完成,压缩包log.tar.gz存放在$CURRENT_PATH。" + IFS=${OLD_IFS} +} + +check_error() { + # 检查采集期间是否有异常 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + for ((i = 0; i < ${#product_result_array[@]}; i++)); do + if [[ "${product_result_array[i]}" = 'False' ]]; then + index=$(($i/5)) + sub_index=$(($i%5)) + if [[ ${index} -eq 0 ]]; then + desc="本服务器" + else + desc=${ip_list[$(($index-1))]} + fi + case ${sub_index} in + 0) write_messages e 0 10 "在${desc}执行获取服务器型号命令失败" ;; + 1) write_messages e 0 10 "在${desc}执行pcie命令失败" ;; + 2) write_messages e 0 10 "在${desc}执行lscpu命令失败" ;; + 3) write_messages e 0 10 "在${desc}执行lsblk命令失败" ;; + 4) write_messages e 0 10 "在${desc}获取操作系统内核版本失败" ;; + esac + fi + done + if [[ "${system_message_result}" = 'False' ]]; then + write_messages e 0 10 "执行检查系统日志失败,请检查/var/log/${SYS_LOG_}是否有权限查询" + fi + for ((i = 0; i < ${#snapshot_result_array[@]}; i++)); do + if [[ "${snapshot_result_array[i]}" = 'False' ]];then + if [[ ${i} -eq 0 ]]; then + write_messages e 0 10 "在本服务器执行ps查看进程失败" + else + index=$(( $i -1)) + write_messages e 0 10 "在${ip_list[index]}执行ps查看进程失败" + fi + + fi + done + + if [[ -f ./log/"${error_file}" ]]; then + while read -r line; do + echo "${line}" | awk -F'#' '{if($5~/sar/) print $5}' + done <./log/"${error_file}" + fi + IFS="${OLD_IFS}" +} + +# 集群环境检查各IP的是否连通,并获取操作系统版本。 +check_connection_and_OS() { + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH};mkdir -p ${REMOTE_LIB_PATH};" + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "${ip_addr} 与当前服务器没有建立免密互信,请配置后重新执行脚本" + exit + fi + scp -r ${CURRENT_PATH}/env_OSVersion.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + os_version_=$(ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_OSVersion.sh; bash env_OSVersion.sh") + if [[ ${O_S_VERSION}x == ""x ]];then + O_S_VERSION=${os_version_} + else + O_S_VERSION="${O_S_VERSION}"";""${os_version_}" + fi + done + + fi + os_version_=$(chmod +x *.sh; bash env_OSVersion.sh) + if [[ ${O_S_VERSION}x == ""x ]];then + O_S_VERSION=${os_version_} + else + O_S_VERSION="${O_S_VERSION}"";""${os_version_}" + fi + write_messages i 0 1 "当前的操作系统版本是${O_S_VERSION}。" + IFS="${OLD_IFS}" +} + +# 检查系统环境,安装依赖软件 +env_preparation() { + check_connection_and_OS + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}" + scp -r ${CURRENT_PATH}/env_preparation.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} > /dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_preparation.sh; bash env_preparation.sh " + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "${ip_addr} 安装依赖软件失败,失败原因请登录该服务器,查看目录${REMOTE_EXECUTIVE_PATH}/log/info.log 的日志" + exit + fi + done + bash env_preparation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "安装依赖软件失败,失败原因请查看目录${REMOTE_EXECUTIVE_PATH}/log/info.log 的日志" + exit + fi + + else + bash env_preparation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "安装依赖软件失败,失败原因请查看目录${REMOTE_EXECUTIVE_PATH}/log/info.log 的日志" + exit + fi + + fi + IFS="${OLD_IFS}" +} + +HCS8_PREFIX="172.36.0.10:58089/rest/v2/virtualMachine/verifyIsHCS?mac=" +HCS803_PREFIX="173.64.11.52:58088/rest/v2/virtualMachine/verifyIsHCS?mac=" +check_physical_system(){ + # 判断当前系统是否是物理服务器 + OLD_IFS="${IFS}" + IFS=',' + CURRENT_SYS="" + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + CURRENT_SYS_=$(ssh root@"${ip_addr}" "dmidecode -s system-product-name") + if [[ ${CURRENT_SYS}x == ""x ]];then + CURRENT_SYS="${CURRENT_SYS_}" + else + CURRENT_SYS="${CURRENT_SYS}"";""${CURRENT_SYS_}" + fi + done + fi + IFS="${OLD_IFS}" + CURRENT_SYS_=$(dmidecode -s system-product-name) + if [[ ${CURRENT_SYS}x == ""x ]];then + CURRENT_SYS="${CURRENT_SYS_}" + else + CURRENT_SYS="${CURRENT_SYS}"";""${CURRENT_SYS_}" + fi +} + +stop_or_start_kunpengdeveloper(){ + step=$1 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}" + scp -r ${CURRENT_PATH}/env_kunpengdeveloper.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_kunpengdeveloper.sh; bash env_kunpengdeveloper.sh ${step}" + done + bash env_kunpengdeveloper.sh ${step} + + else + bash env_kunpengdeveloper.sh ${step} + + fi + IFS="${OLD_IFS}" +} + +sys_env_inspectation() { + # 从CPU、内存、硬盘和网卡四个角度检查利用率是否过高,如果过高则提升当前环境非空闲 + write_messages i 0 3 "环境自检开始" + + OLD_IFS="${IFS}" + IFS=',' + ENV_NOT_IDLE=0 + exam_time=0 + read -r -a ip_list <<< "$cluster_ip_lists" + write_messages i 0 3 "环境自检结束" +} + +port_scan() { + # 安全扫描,使用nmap进行端口扫描 + OLD_IFS="${IFS}" + IFS=',' + scan_pid="" + scan_process="" + read -r -a ip_list <<< "$cluster_ip_lists" + file_path="data/test/safety/" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + { + scp ${CURRENT_PATH}/security_port_scan.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_port_scan.sh; bash security_port_scan.sh" + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}${file_path}; for file in \$(find . -type f -name '*.nmap' -exec basename {} \; );do mv \${file} ${ip_addr}_\${file};done" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${ip_addr}*.nmap ${file_path} >/dev/null + } & + scan_pid=$! + if [[ -n ${scan_process} ]];then + scan_process="${scan_process},${scan_pid}" + else + scan_process=${scan_pid} + fi + done + for pid in ${scan_process};do + wait ${pid} + done + fi + bash security_port_scan.sh + write_messages i 0 6 "端口安全测试结束" + IFS="${OLD_IFS}" +} + +validated_clamav_scan(){ + if [[ "${CLAMAV_SCAN}" -eq 1 ]]; then + write_messages i 0 6 "防病毒扫描开始" + scan_path_parser 1 + write_messages i 0 6 "防病毒扫描结束" + fi +} + + +validated_cvecheck(){ + if [[ "${CVE_SCAN}" -eq 1 ]]; then + # 使用cvecheck进行漏洞扫描 + write_messages i 0 6 "漏洞扫描开始" + scan_path_parser 2 + write_messages i 0 6 "漏洞扫描结束" + fi +} + +scan_path_parser(){ + step=$1 + OLD_IFS="${IFS}" + IFS=',' + scan_pid="" + scan_process="" + scan_ip_desc=":" + current_server_path="" + file_path="data/test/safety/" + declare -A multiple_path_array + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${step}" -eq 1 ]]; then + read -r -a scan_path_list <<< "$clamav_scan_path" + file_name=clam.log_${current_time} + else + read -r -a scan_path_list <<< "$cve_scan_path" + file_name=cvecheck-result.json + fi + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + for scan_path in "${scan_path_list[@]}"; do + if [[ ${scan_path} == *${scan_ip_desc}* ]]; then + ip=${scan_path%:*} + path=${scan_path#*:} + if [[ "${ip_list[@]}"=~"${ip}" ]]; then + if [[ -n ${multiple_path_array[$ip]} ]];then + multiple_path_array[$ip]="${multiple_path_array[$ip]},${path}" + else + multiple_path_array[$ip]=${path} + fi + fi + else + if [[ -n ${current_server_path} ]];then + current_server_path="${current_server_path},${scan_path}" + else + current_server_path=${scan_path} + fi + fi + done + + for ip_addr in "${ip_list[@]}"; do + if [[ -n ${multiple_path_array[$ip_addr]} ]]; then + if [[ "${step}" -eq 1 ]]; then + { + scp ${CURRENT_PATH}/security_clam_scan.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_clam_scan.sh; bash security_clam_scan.sh ${multiple_path_array[$ip_addr]}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + } & + else + { + scp ${CURRENT_PATH}/security_cvecheck.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_cvecheck.sh; bash security_cvecheck.sh ${multiple_path_array[$ip_addr]}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + } & + fi + scan_pid=$! + if [[ -n ${scan_process} ]];then + scan_process="${scan_process},${scan_pid}" + else + scan_process=${scan_pid} + fi + fi + done + for pid in ${scan_process};do + wait ${pid} + done + IFS="${OLD_IFS}" + if [[ -n ${current_server_path} ]];then + if [[ "${step}" -eq 1 ]]; then + bash security_clam_scan.sh ${current_server_path} + else + bash security_cvecheck.sh ${current_server_path} + fi + fi + unset scan_pid + unset scan_process + unset scan_ip_desc + unset current_server_path + unset multiple_path_array +} + + +check_process(){ + # 检查进程是否存在 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + process_name=$1 + process_name=$(echo ${process_name} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_results="" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + if [[ ${KUBERNETES_ENV} -eq 1 ]];then + ps_result="$(ssh root@${ip_addr} "kubectl get all --all-namespaces |grep -i ${process_name} 2>/dev/null")" + else + ps_result="$(ssh root@${ip_addr} "pgrep -lf ${process_name}")" + fi + if [[ "${ps_result}" != '' ]]; then + ps_results="${ps_results}"";""${ps_result}" + fi + done + fi + if [[ ${KUBERNETES_ENV} -eq 1 ]];then + ps_result=$(kubectl get all --all-namespaces |grep -i ${process_name} 2>/dev/null) + else + ps_result=$(pgrep -lf "${process_name}") + fi + if [[ "${ps_result}" != '' ]]; then + ps_results="${ps_results}"";""${ps_result}" + fi + echo "${ps_results}" + IFS="${OLD_IFS}" +} + +check_process_exits_stop() { + # 检查业务应用是否存在,如果存在停止进程。 + step=$1 + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a stop_comm_list <<< "$stop_app_commands" + length=${#app_list[@]} + sleep_time=10 + CURRENT_PATH=$(pwd) + STOP_APP_FLAG=0 + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 34 "${step}" "进程${process}存在" + STOP_APP_FLAG=1 + else + if [[ ${step} -ne 4 ]]; then + write_messages i 34 "${step}" "进程${process}不存在" + fi + fi + done + if [[ "${step}" -eq 9 && "${STOP_APP_FLAG}" -eq 0 ]] ; then + for stop_comm in "${stop_comm_list[@]}"; do + eval "${stop_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 + if [[ "$?" -ne 0 ]]; then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${step}" "执行${stop_comm}出错" + else + cd "${CURRENT_PATH}"||exit + fi + done + fi + if [[ "${STOP_APP_COMM}" -eq 0 && "${STOP_APP_FLAG}" -eq 1 ]] ; then + for stop_comm in "${stop_comm_list[@]}"; do + eval "${stop_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 + if [[ "$?" -ne 0 ]]; then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${step}" "执行${stop_comm}出错" + else + cd "${CURRENT_PATH}"||exit + fi + done + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + check_times=5 + while [[ ${check_times} -gt 0 ]];do + sleep "${sleep_time}" + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages e 0 "${step}" "执行${stop_comm}后,等待${sleep_time}秒,${process}存在" + kill_process ${process} + check_times=$((check_times -1)) + else + if [[ ${step} -ne 4 ]]; then + write_messages i 34 "${step}" "进程${process}不存在" + fi + break + fi + done + ps_result="$(check_process ${process})" + if [[ ${check_times} -le 0 ]] ; then + write_messages e 0 "${start_step}" "停止业务应用${process}失败,请用户检查停止脚本。" + HAND_STOP_APP=1 + fi + done + fi + if [[ "${STOP_APP_COMM}" -eq 1 ]] || [[ "${HAND_STOP_APP}" -eq 1 ]]; then + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + check_times=5 + export APP_PID + echo $APP_PID + if ! [ -z "$APP_PID" ]; then + kill -9 $APP_PID + APP_PID="" + fi + if [[ ${check_times} -le 0 ]]; then + write_messages e 0 "${step}" "检查到应用程序还在启动,且用户未能停止应用,请用户停止应用后再执行脚本" + exit + else + write_messages i 0 "${step}" "进程${process}不存在" + fi + done + fi + IFS="${OLD_IFS}" +} + +kill_process() { + # 强制杀死进程 + OLD_IFS="${IFS}" + IFS=',' + process_name=$1 + kill_results="" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + kill_result="$(ssh root@${ip_addr} "pgrep -f "${process}" | xargs kill -9")" + if [[ "${ps_result}" != '' ]]; then + kill_results="${kill_result}"";""${kill_result}" + fi + done + fi + kill_result="$(pgrep -f "${process}" | xargs kill -9 >>./log/"${log_file}" 2>&1)" + if [[ "${kill_result}" != '' ]]; then + kill_results="${kill_result}"";""${kill_result}" + fi + IFS="${OLD_IFS}" +} + +counting_time(){ + ds=$1 + ( + tput sc + for ((dsec = "${ds}"; dsec > 0; dsec--)); do + min=$((dsec / 60)) + se=$((dsec % 60)) + tput rc + tput ed + echo -ne "\r 采集剩余时间:${min}:${se}\r" + sleep 1 + done + ) & +} + + + +get_performance() { + # 进行CPU、内存、硬盘、网卡和功耗指标采集 + # 参数1:采集时间间隔 + # 参数2:采集时长 + # 参数3:采集序列,0:表示兼容测前采集,1:表示性能测试采集,2表示兼容测试后采集 + # 参数4:步骤 + OLD_IFS="${IFS}" + IFS=',' + frequency=$1 + seq=$3 + during_time=$2 + step=$4 + times=$((during_time * 60 / frequency)) + seconds=$((during_time * 60)) + if [[ "${seq}" -eq 1 ]]; then + file_path="data/test/performance/" + file_seq=1 + d_seconds=$((during_time * 60 * 1)) + elif [[ "${seq}" -eq 0 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + d_seconds=$((during_time * 60 * 1)) + elif [[ "${seq}" -eq 3 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + d_seconds=$((during_time * 60 * 1)) + else + file_path="data/test/compatiable/" + file_seq=1 + d_seconds=$((during_time * 60 *1)) + fi + power_path="data/test/power/" + if [[ ! -d "${power_path}" ]]; then + mkdir -p "${power_path}" + fi + desc_array=('兼容性测试前采集' '性能测试采集' '兼容性测试后采集') + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + { + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}; pgrep -f obtain_server_perf.sh | xargs kill -9 " + scp -r ${CURRENT_PATH}/obtain_server_perf.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x obtain_server_perf.sh; bash obtain_server_perf.sh ${frequency} ${during_time} ${seq} ${step}" + }& + done + fi + counting_time d_seconds + bash obtain_server_perf.sh ${frequency} ${during_time} ${seq} ${step} + file_list=("test_perf_cpu_${file_seq}.log" "test_perf_mem_${file_seq}.log" "test_perf_net_${file_seq}.log" "test_perf_disk_${file_seq}.log") + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + ip_length=${#ip_list[@]} + for ((j =0;j<"${ip_length}";j++));do + ip_addr=${ip_list[$j]} + for ((i = 0; i < 4; i++)); do + file_name=${file_list[$i]} + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + done + if [[ "${seq}" -ne 1 ]]; then + file_name="test_power_${file_seq}.log" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${power_path}${file_name} ${power_path}${file_name}_${ip_addr} >/dev/null + fi + done + fi + write_messages i 0 "${step}" "${desc_array[${seq}]}已完成" + IFS="${OLD_IFS}" +} + +start_app(){ + # 启动业务应用进程 + start_step=$1 + export APP_PID + if [[ ${start_step} -eq 5 ]];then + check_process_exits_stop "${start_step}" + fi + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a start_comm_list <<< "$start_app_commands" + length=${#app_list[@]} + START_APP_FLAG=0 + SLEEP_TIME=10 + if [[ ${START_APP_COMM} -eq 0 ]];then + for start_comm in "${start_comm_list[@]}"; do + eval "${start_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 + APP_PID=$! + if [ $? -ne 0 ]; then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${start_step}" "执行${start_comm}报错,请手动执行命令启动业务应用" + START_APP_FLAG=1 + fi + cd "${CURRENT_PATH}"||exit + done + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + check_times=5 + while [[ ${check_times} -gt 0 ]];do + sleep "${SLEEP_TIME}" + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 "${start_step}" "业务应用${process}启动完成。" + break + else + check_times=$((check_times -1)) + fi + done + if [[ ${check_times} -le 0 ]]; then + write_messages e 0 "${start_step}" "启动业务应用${process}失败,请用户检查启动脚本。" + START_APP_FLAG=1 + exit 1 + fi + done + fi + if [[ "${start_step}" -eq 5 ]];then + if [[ ${START_APP_FLAG} -eq 1 || ${START_APP_COMM} -eq 1 ]]; then + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages c 34 "${start_step}" "业务应用${process}启动完成。" + fi + if [[ "${ps_result}" == "" ]]; then + write_messages e 0 "应用启动失败请检查应用启动命令" + exit 1 + fi + done + fi + fi + IFS="${OLD_IFS}" +} + +start_performance_test(){ + # 调用压力测试命令进行压力测试。 + PERF_TEST_FLAG=0 + export STRESS_CMD + if [[ $STRESS_CMD -eq 1 ]]; then + write_messages i 0 7 "启动压力测试工具" + if [[ ${TEST_TOOL_COMM} -eq 0 ]];then + OLD_IFS="${IFS}" + IFS=',' + read -r -a start_performance_scripts <<< "$start_performance_scripts" + length=${#start_performance_scripts[@]} + for ((i = 0; i < "${length}"; i++)); do + start_script=${start_performance_scripts[$i]} + pattern='&$' + if [[ $start_script =~ $pattern ]];then + eval "${start_script}" >> ./log/"${app_log_file}" 2>&1 + PID=$! + cd "${CURRENT_PATH}"||exit + else + eval "(${start_script})&" >> ./log/"${app_log_file}" 2>&1 + PID=$! + cd "${CURRENT_PATH}"||exit + fi + + if ! ps -fp "${PID}"> /dev/null; then + write_messages e 0 7 "调用命令${start_script}启动测试工具失败" + HAND_START_TEST=1 + PERF_TEST_FLAG=0 + else + performance_test_pid_array[$i]="${PID}" + PERF_TEST_FLAG=1 + fi + done + IFS="${OLD_IFS}" + fi + if ! ps -fp "${PID}"> /dev/null; then + write_messages c 31 7 "启动压力测试工具失败,请确认启动命令" + HAND_START_TEST=1 + PERF_TEST_FLAG=0 + exit 1 + fi + else + write_messages i 0 7 "用户未提供启动压力测试工具命令" + fi +} + +reliablity_test(){ + # 可靠性测试 + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a start_comm_list <<< "$start_app_commands" + SLEEP_TIME=20 + RELIABLE_TEST_FLAG=0 + + for pid in "${performance_test_pid_array[@]}" + do + # 当前pid的所有子进程 + sub_pids=$(pgrep -P ${pid}) + for subpid in ${sub_pids}; + do + kill -9 "${subpid}" >>./log/"${log_file}" 2>&1 + done + disown "${pid}" + kill -9 "${pid}" >>./log/"${log_file}" 2>&1 + if [[ $? -ne 0 ]] ; then + write_messages e 0 8 "压力测试工具停止失败" + exit 1 + fi + sleep "${SLEEP_TIME}" + done + + if [[ ${KUBERNETES_ENV} -eq 0 && ${HAND_START_APP} -eq 0 && ${START_APP_COMM} -eq 0 ]];then + length=${#app_list[@]} + for ((i = 0; i < "${length}"; i++)); + do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 8 "可靠性测试前检查,业务应用进程${process}存在" + if ! kill_process ${process} >>./log/"${log_file}" 2>&1 ; then + write_messages e 0 8 "可靠性测试,执行强制杀死进程${process}报错,可靠性测试失败。" + RELIABLE_TEST_FLAG=1 + else + write_messages i 0 8 "可靠性测试,执行强制杀死进程${process}" + fi + else + write_messages e 31 8 "可靠性测试前,业务应用${process}已停止,可靠性测试失败。" + RELIABLE_TEST_FLAG=1 + fi + done + sleep "${SLEEP_TIME}" + if [[ ${RELIABLE_TEST_FLAG} -eq 0 ]]; then + start_app 8 + for ((i = 0; i < "${length}"; i++)); + do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 8 "可靠性测试,业务应用${process}启动完成。可靠性测试成功" + else + write_messages e 31 8 "可靠性测试,业务应用${process}启动失败,可靠性测试失败。" + fi + done + fi + elif [[ ${KUBERNETES_ENV} -eq 1 ]]; then + write_messages c 31 8 "业务应用是Kubernetes集群,不支持该用例测试。" + else + write_messages c 31 8 "业务应用是用户手动启动,不支持该用例测试。" + fi + IFS="${OLD_IFS}" +} + + +notice_users + +if [[ "$(id -u)" -ne 0 ]]; then + write_messages c 31 0 "请使用root用户权限执行脚本,否则没有权限检查系统日志。" +fi + +# 1、检查配置文件是否正确 +write_messages c 34 1 "第 1 步:配置文件检查, 开始" +check_configuration +write_messages c 34 1 "第 1 步:配置文件检查, 完成" +# 初始化,创建采集目录树 +write_messages c 34 1 "第 2 步:软件依赖检查,开始" +create_result_dir + +# 0 环境准备,判断用户环境 +env_preparation +check_physical_system +# 判断鲲鹏开发套件是否有启动,启动则调用命令停止 +stop_or_start_kunpengdeveloper 1 + +message_start_time="$(tail -1 /var/log/${SYS_LOG_}| awk -F' ' '{for(i=1;i<=3;i++) printf $i OFS}')" +write_messages c 34 1 "第 2 步:软件依赖检查,完成" + +# 2、环境自检 +write_messages c 34 3 "第 3 步:测试环境自检, 开始" +sys_env_inspectation +write_messages c 34 3 "第 3 步:测试环境自检, 完成" + +write_messages c 34 4 "第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集" +# 3、系统信息采集 +get_service_info + +# 4、idle_0采集 +# 4.1、检查应用进程,若存在则停止 +check_process_exits_stop 4 +# 4.2、idle_0采集 +get_performance 5 ${IDLE_PERFORMNCE_TIME} 0 4 +write_messages c 34 4 "第 4 步:应用启动前采集结束" +sleep 10 +# 5、启动业务 +write_messages c 34 5 "第 5 步:启动业务应用,可通过./log目录info.log查看进度,如果长时间未进行下一步,请检查配置文件填写的启动命令执行后是否会返回。" +start_app 5 +get_ps_snapshot +write_messages c 34 5 "第 5 步:启动业务应用完成" + +# 6、安全检查 +write_messages c 34 6 "第 6 步:安全测试,进行应用端口扫描,可通过./log目录的nmap.log查看进度" +port_scan +validated_clamav_scan +validated_cvecheck +write_messages c 34 6 "第 6 步:安全测试结束" + +# 7.1、进行压力测试 +write_messages c 34 7 "第 7 步:进行业务压力下CPU、内存、硬盘和网卡系统资源采集" +if [[ ${HPC_CERTIFICATE} -eq 0 && ${STRESS_CMD} -eq 1 ]]; then + start_performance_test + # 7.2、压力测试采集 + sleep 2 + get_performance 5 ${TEST_TOOL_TIME} 1 7 + sleep 20 +fi + + +write_messages c 34 7 "第 7 步:压力测试采集结束." + + +# 8、可靠性测试 +write_messages c 34 8 "第 8 步:进行可靠性测试,强制KILL应用后正常启动测试" +if [[ ${HPC_CERTIFICATE} -eq 0 ]]; then + reliablity_test +fi +write_messages c 34 8 "第 8 步:可靠性测试结束." + +# 9、idle_1测试 +write_messages c 34 9 "第 9 步:应用停止后CPU、内存、硬盘、网卡和功耗系统资源采集" +check_process_exits_stop 9 +get_performance 5 ${IDLE_PERFORMNCE_TIME} 2 9 +sleep 10 +write_messages c 34 9 "第 9 步:应用停止后资源采集结束" + +write_messages c 34 10 "第 10 步:测试采集数据打包" +if [[ ${HPC_CERTIFICATE} -eq 1 ]]; then + source ./hpc_linpack_test.sh + bash hpc_memory_bandwidth.sh +fi +stop_or_start_kunpengdeveloper 10 +message_end_time="$(tail -1 /var/log/${SYS_LOG_}| awk -F' ' '{for(i=1;i<=3;i++) printf $i OFS}')" +check_system_message "${message_start_time}" "${message_end_time}" +# 检查以上采集是否有出错 +check_error +tar_output +exit diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/compatibility_testing.conf b/component/CompatibilityTesting/compatibility_testing/Chinese/data/compatibility_testing.conf new file mode 100644 index 0000000000000000000000000000000000000000..cee7b6cc534355853ccef27fc637b4eb542580c5 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/compatibility_testing.conf @@ -0,0 +1,48 @@ +################################################################################## +#功能描述: 提供给用户进行兼容性测试、性能测试的指标日志采集工具 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录: 2022-08-17 修改 +#使用方法:自动化采集开始前,请用户先配置compatibility_testing.conf, +# 填写待测试应用名称application_names, +# 待测试应用启动命令start_app_commands, +# 待测试应用停止命令stop_app_commands +# 被测应用软件的压力测试工具启动命令start_performance_scripts, +# 确认填写后 +# CentOS/中标麒麟/SUSE/openEuler:使用root用户执行,sh compatibility_testing.sh。 +# Ubuntu/银河麒麟/UOS:使用root用户执行,bash compatibility_testing.sh。 +# 多节点集群部署,在每台节点服务器上配置对自身节点和其他所有节点的SSH免密登录。并在控制节点(主节点)执行脚本。 +################################################################################### + +# 待测试应用软件进程名称,多个应用名称以逗号隔开。 +# 可通过ps或者docker top 命令CMD所在列查找后台进程名称, Kubernetes集群环境下填写Pod名称。 +application_names=test1 +# 待测试应用软件启动命令,多个应用的启动命令以逗号隔开。 +start_app_commands=nohup python3 /home/lj/test1.py & +# 空载采集时间(分钟) +idle_performance_time=1 +# 待测试应用软件停止命令,多个应用的停止命令以逗号隔开。 +stop_app_commands= +# 被测应用软件的压力测试工具启动命令。 +start_performance_scripts= +# 被测应用软件的压力测试工具运行时间(分钟) +start_performance_time= +# Kubernetes集群填写"Y"。其他环境可置空。 +kubernetes_env= + +# 以下为多节点集群部署填写,单机(单节点)部署不需要填写。 +# 集群环境的IP地址列表,多个IP地址以逗号隔开,列表不应包括当前脚本所在服务器IP地址,请勿增加。 +cluster_ip_lists= + +# 以下为Validated认证测试填写,Compatible认证测试不需要填写。 +# CVE漏洞扫描目录,多个目录以逗号隔开,Validated认证测试有自己的CVE漏洞检查工具不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +cve_scan_path= +# clamav防病毒扫描目录,多个目录以逗号隔开,Validated认证测试有自己的商用杀毒软件不需要填写。 +# 集群环境下, 非当前脚本所在服务器的目录填写为"IP:目录", 如192.168.2.2:/root/tomcat +clamav_scan_path= + +# 以下为HPC应用方案认证填写,HPC应用测试填写"Y",其他应用认证测试可置空。 +hpc_certificate= + +# 以下为C/C++编译的应用填写,请填写待测试应用二进制文件的绝对路径。 +binary_file= diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_cpu.log b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_cpu.log new file mode 100644 index 0000000000000000000000000000000000000000..e0fd697e8ca25052d4acabcc3be14a6f7a337861 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_cpu.log @@ -0,0 +1,34 @@ +Architecture: aarch64 +CPU op-mode(s): 64-bit +Byte Order: Little Endian +CPU(s): 96 +On-line CPU(s) list: 0-95 +Thread(s) per core: 1 +Core(s) per socket: 48 +Socket(s): 2 +NUMA node(s): 4 +Vendor ID: HiSilicon +Model: 0 +Model name: Kunpeng-920 +Stepping: 0x1 +CPU max MHz: 2600.0000 +CPU min MHz: 200.0000 +BogoMIPS: 200.00 +L1d cache: 6 MiB +L1i cache: 6 MiB +L2 cache: 48 MiB +L3 cache: 96 MiB +NUMA node0 CPU(s): 0-23 +NUMA node1 CPU(s): 24-47 +NUMA node2 CPU(s): 48-71 +NUMA node3 CPU(s): 72-95 +Vulnerability Itlb multihit: Not affected +Vulnerability L1tf: Not affected +Vulnerability Mds: Not affected +Vulnerability Meltdown: Not affected +Vulnerability Spec store bypass: Not affected +Vulnerability Spectre v1: Mitigation; __user pointer sanitization +Vulnerability Spectre v2: Not affected +Vulnerability Srbds: Not affected +Vulnerability Tsx async abort: Not affected +Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_disk.log b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_disk.log new file mode 100644 index 0000000000000000000000000000000000000000..25c43834303e380c9022b34e65bf3d12741b3ada --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_disk.log @@ -0,0 +1,12 @@ +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +sda 8:0 0 1.1T 0 disk +sdb 8:16 0 1.1T 0 disk +sdc 8:32 0 1.1T 0 disk +sdd 8:48 0 1.1T 0 disk +sde 8:64 0 894.3G 0 disk +├─sde1 8:65 0 1G 0 part /boot/efi +├─sde2 8:66 0 1G 0 part /boot +└─sde3 8:67 0 892.3G 0 part + ├─openEuler-root 253:0 0 100G 0 lvm / + ├─openEuler-swap 253:1 0 4G 0 lvm [SWAP] + └─openEuler-home 253:2 0 788.3G 0 lvm /home diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_info.log b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_info.log new file mode 100644 index 0000000000000000000000000000000000000000..d8c1a838ab151178b3c17711ca187e5cdb3efab9 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_info.log @@ -0,0 +1,1647 @@ +# dmidecode 3.2 +Getting SMBIOS data from sysfs. +SMBIOS 3.2.0 present. +Table at 0x2F8E0000. + +Handle 0x0000, DMI type 0, 26 bytes +BIOS Information + Vendor: Huawei Corp. + Version: 1.83 + Release Date: 11/06/2021 + Address: 0x5F000 + Runtime Size: 644 kB + ROM Size: 6144 kB + Characteristics: + PCI is supported + BIOS is upgradeable + BIOS shadowing is allowed + Boot from CD is supported + Selectable boot is supported + EDD is supported + Japanese floppy for NEC 9800 1.2 MB is supported (int 13h) + Japanese floppy for Toshiba 1.2 MB is supported (int 13h) + 5.25"/360 kB floppy services are supported (int 13h) + 5.25"/1.2 MB floppy services are supported (int 13h) + 3.5"/720 kB floppy services are supported (int 13h) + 3.5"/2.88 MB floppy services are supported (int 13h) + 8042 keyboard services are supported (int 9h) + CGA/mono video services are supported (int 10h) + ACPI is supported + USB legacy is supported + BIOS boot specification is supported + Targeted content distribution is supported + UEFI is supported + BIOS Revision: 1.83 + +Handle 0x0001, DMI type 1, 27 bytes +System Information + Manufacturer: Huawei + Product Name: TaiShan 200 (Model 2280) + Version: To be filled by O.E.M. + Serial Number: 2102312UWPN0KC000383 + UUID: 47c9db54-4467-a7cb-ea11-af1c006caa6d + Wake-up Type: Power Switch + SKU Number: To be filled by O.E.M. + Family: To be filled by O.E.M. + +Handle 0x0002, DMI type 3, 25 bytes +Chassis Information + Manufacturer: Huawei + Type: Main Server Chassis + Lock: Not Present + Version: To be filled by O.E.M. + Serial Number: To be filled by O.E.M. + Asset Tag: To be filled by O.E.M. + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + Height: 2 U + Number Of Power Cords: 1 + Contained Elements: 0 + SKU Number: Not Specified + +Handle 0x0003, DMI type 2, 17 bytes +Base Board Information + Manufacturer: Huawei + Product Name: BC82AMDDA + Version: V200R002C00 + Serial Number: 026PPV10KC000647 + Asset Tag: To be filled by O.E.M. + Features: + Board is a hosting board + Board is replaceable + Location In Chassis: To be filled by O.E.M. + Chassis Handle: 0x0002 + Type: Motherboard + Contained Object Handles: 0 + +Handle 0x0005, DMI type 32, 11 bytes +System Boot Information + Status: No errors detected + +Handle 0x0006, DMI type 16, 23 bytes +Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: Multi-bit ECC + Maximum Capacity: 8 TB + Error Information Handle: Not Provided + Number Of Devices: 32 + +Handle 0x0007, DMI type 19, 31 bytes +Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x03FFFFFFFFF + Range Size: 256 GB + Physical Array Handle: 0x0006 + Partition Width: 32 + +Handle 0x0008, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM000 J27 + Bank Locator: SOCKET 0 CHANNEL 0 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 2464405D + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0009, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM001 J28 + Bank Locator: SOCKET 0 CHANNEL 0 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000A, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM010 J21 + Bank Locator: SOCKET 0 CHANNEL 1 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 24643801 + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000B, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM011 J22 + Bank Locator: SOCKET 0 CHANNEL 1 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000C, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM020 J19 + Bank Locator: SOCKET 0 CHANNEL 2 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 246434E0 + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000D, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM021 J20 + Bank Locator: SOCKET 0 CHANNEL 2 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000E, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM030 J13 + Bank Locator: SOCKET 0 CHANNEL 3 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 245B215C + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x000F, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM031 J14 + Bank Locator: SOCKET 0 CHANNEL 3 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0010, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM040 J25 + Bank Locator: SOCKET 0 CHANNEL 4 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0011, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM041 J26 + Bank Locator: SOCKET 0 CHANNEL 4 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0012, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM050 J23 + Bank Locator: SOCKET 0 CHANNEL 5 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0013, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM051 J24 + Bank Locator: SOCKET 0 CHANNEL 5 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0014, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM060 J17 + Bank Locator: SOCKET 0 CHANNEL 6 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0015, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM061 J18 + Bank Locator: SOCKET 0 CHANNEL 6 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0016, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM070 J15 + Bank Locator: SOCKET 0 CHANNEL 7 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0017, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM071 J16 + Bank Locator: SOCKET 0 CHANNEL 7 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0018, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM100 J43 + Bank Locator: SOCKET 1 CHANNEL 0 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 245B235C + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0019, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM101 J44 + Bank Locator: SOCKET 1 CHANNEL 0 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001A, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM110 J37 + Bank Locator: SOCKET 1 CHANNEL 1 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 245B23C6 + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001B, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM111 J38 + Bank Locator: SOCKET 1 CHANNEL 1 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001C, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM120 J35 + Bank Locator: SOCKET 1 CHANNEL 2 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 245B390C + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001D, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM121 J36 + Bank Locator: SOCKET 1 CHANNEL 2 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001E, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: 72 bits + Data Width: 64 bits + Size: 32 GB + Form Factor: DIMM + Set: None + Locator: DIMM130 J29 + Bank Locator: SOCKET 1 CHANNEL 3 DIMM 0 + Type: DDR4 + Type Detail: Synchronous Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Micron + Serial Number: 245B1F06 + Asset Tag: 1942 + Part Number: 36ASF4G72PZ-2G6E1 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 2.0 V + Configured Voltage: 1.2 V + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x001F, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM131 J30 + Bank Locator: SOCKET 1 CHANNEL 3 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0020, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM140 J41 + Bank Locator: SOCKET 1 CHANNEL 4 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0021, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM141 J42 + Bank Locator: SOCKET 1 CHANNEL 4 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0022, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM150 J39 + Bank Locator: SOCKET 1 CHANNEL 5 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0023, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM151 J40 + Bank Locator: SOCKET 1 CHANNEL 5 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0024, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM160 J33 + Bank Locator: SOCKET 1 CHANNEL 6 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0025, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM161 J34 + Bank Locator: SOCKET 1 CHANNEL 6 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0026, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM170 J31 + Bank Locator: SOCKET 1 CHANNEL 7 DIMM 0 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0027, DMI type 17, 84 bytes +Memory Device + Array Handle: 0x0006 + Error Information Handle: Not Provided + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM171 J32 + Bank Locator: SOCKET 1 CHANNEL 7 DIMM 1 + Type: Unknown + Type Detail: Unknown Synchronous + Speed: Unknown + Manufacturer: NO DIMM + Serial Number: NO DIMM + Asset Tag: NO DIMM + Part Number: NO DIMM + Rank: Unknown + Configured Memory Speed: Unknown + Minimum Voltage: Unknown + Maximum Voltage: Unknown + Configured Voltage: Unknown + Memory Technology: + Memory Operating Mode Capability: None + Firmware Version: Not Specified + Module Manufacturer ID: Unknown + Module Product ID: Unknown + Memory Subsystem Controller Manufacturer ID: Unknown + Memory Subsystem Controller Product ID: Unknown + Non-Volatile Size: None + Volatile Size: None + Cache Size: None + Logical Size: None + +Handle 0x0028, DMI type 7, 27 bytes +Cache Information + Socket Designation: L1 Cache + Configuration: Enabled, Not Socketed, Level 1 + Operational Mode: Write Back + Location: Internal + Installed Size: 6 MB + Maximum Size: 6 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Instruction + Associativity: 8-way Set-associative + +Handle 0x0029, DMI type 7, 27 bytes +Cache Information + Socket Designation: L2 Cache + Configuration: Enabled, Not Socketed, Level 2 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 24 MB + Maximum Size: 24 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Unified + Associativity: 8-way Set-associative + +Handle 0x002A, DMI type 7, 27 bytes +Cache Information + Socket Designation: L3 Cache + Configuration: Enabled, Not Socketed, Level 3 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 48 MB + Maximum Size: 48 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Unified + Associativity: 16-way Set-associative + +Handle 0x002B, DMI type 4, 48 bytes +Processor Information + Socket Designation: CPU01 + Type: Central Processor + Family: ARM + Manufacturer: HiSilicon + ID: 10 D0 1F 48 00 00 00 00 + Signature: Implementor 0x48, Variant 0x1, Architecture 15, Part 0xd01, Revision 0 + Version: Kunpeng 920-4826 + Voltage: 0.9 V + External Clock: 100 MHz + Max Speed: 2600 MHz + Current Speed: 2600 MHz + Status: Populated, Enabled + Upgrade: Unknown + L1 Cache Handle: 0x0028 + L2 Cache Handle: 0x0029 + L3 Cache Handle: 0x002A + Serial Number: 877ACED301906B10 + Asset Tag: To be filled by O.E.M. + Part Number: To be filled by O.E.M. + Core Count: 48 + Core Enabled: 48 + Thread Count: 48 + Characteristics: + 64-bit capable + Multi-Core + Execute Protection + Enhanced Virtualization + Power/Performance Control + +Handle 0x002C, DMI type 7, 27 bytes +Cache Information + Socket Designation: L1 Cache + Configuration: Enabled, Not Socketed, Level 1 + Operational Mode: Write Back + Location: Internal + Installed Size: 6 MB + Maximum Size: 6 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Instruction + Associativity: 8-way Set-associative + +Handle 0x002D, DMI type 7, 27 bytes +Cache Information + Socket Designation: L2 Cache + Configuration: Enabled, Not Socketed, Level 2 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 24 MB + Maximum Size: 24 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Unified + Associativity: 8-way Set-associative + +Handle 0x002E, DMI type 7, 27 bytes +Cache Information + Socket Designation: L3 Cache + Configuration: Enabled, Not Socketed, Level 3 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 48 MB + Maximum Size: 48 MB + Supported SRAM Types: + Synchronous + Installed SRAM Type: Synchronous + Speed: Unknown + Error Correction Type: Single-bit ECC + System Type: Unified + Associativity: 16-way Set-associative + +Handle 0x002F, DMI type 4, 48 bytes +Processor Information + Socket Designation: CPU02 + Type: Central Processor + Family: ARM + Manufacturer: HiSilicon + ID: 10 D0 1F 48 00 00 00 00 + Signature: Implementor 0x48, Variant 0x1, Architecture 15, Part 0xd01, Revision 0 + Version: Kunpeng 920-4826 + Voltage: 0.9 V + External Clock: 100 MHz + Max Speed: 2600 MHz + Current Speed: 2600 MHz + Status: Populated, Enabled + Upgrade: Unknown + L1 Cache Handle: 0x002C + L2 Cache Handle: 0x002D + L3 Cache Handle: 0x002E + Serial Number: D79ACED300908B10 + Asset Tag: To be filled by O.E.M. + Part Number: To be filled by O.E.M. + Core Count: 48 + Core Enabled: 48 + Thread Count: 48 + Characteristics: + 64-bit capable + Multi-Core + Execute Protection + Enhanced Virtualization + Power/Performance Control + +Handle 0x0030, DMI type 128, 52 bytes +OEM-specific Type + Header and Data: + 80 34 30 00 00 00 F0 4F 00 00 00 00 00 00 01 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 + +Handle 0x0031, DMI type 39, 22 bytes +System Power Supply + Power Unit Group: 1 + Location: chassis + Name: PAC2000S12-BG + Manufacturer: HUAWEI + Serial Number: 2102312HGYW0K9003420 + Asset Tag: Not Specified + Model Part Number: 02312HGY + Revision: DC:113 PFC:113 + Max Power Capacity: 2000 W + Status: Present, OK + Type: Switching + Input Voltage Range Switching: Auto-switch + Plugged: Yes + Hot Replaceable: Yes + +Handle 0x0032, DMI type 39, 22 bytes +System Power Supply + Power Unit Group: 1 + Location: chassis + Name: PAC2000S12-BG + Manufacturer: HUAWEI + Serial Number: 2102312HGYW0K9003315 + Asset Tag: Not Specified + Model Part Number: 02312HGY + Revision: DC:113 PFC:113 + Max Power Capacity: 2000 W + Status: Present, OK + Type: Switching + Input Voltage Range Switching: Auto-switch + Plugged: Yes + Hot Replaceable: Yes + +Handle 0x0033, DMI type 9, 24 bytes +System Slot Information + Designation: slot1 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0034, DMI type 9, 24 bytes +System Slot Information + Designation: slot2 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0035, DMI type 9, 24 bytes +System Slot Information + Designation: slot3 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0036, DMI type 9, 24 bytes +System Slot Information + Designation: slot4 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0037, DMI type 9, 24 bytes +System Slot Information + Designation: slot5 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0038, DMI type 9, 24 bytes +System Slot Information + Designation: slot6 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0039, DMI type 9, 24 bytes +System Slot Information + Designation: slot7 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003A, DMI type 9, 24 bytes +System Slot Information + Designation: slot8 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003B, DMI type 9, 24 bytes +System Slot Information + Designation: nvme8 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003C, DMI type 9, 24 bytes +System Slot Information + Designation: nvme9 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003D, DMI type 9, 24 bytes +System Slot Information + Designation: nvme10 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003E, DMI type 9, 24 bytes +System Slot Information + Designation: nvme11 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x003F, DMI type 9, 24 bytes +System Slot Information + Designation: nvme12 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0040, DMI type 9, 24 bytes +System Slot Information + Designation: nvme13 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0041, DMI type 9, 24 bytes +System Slot Information + Designation: nvme14 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0042, DMI type 9, 24 bytes +System Slot Information + Designation: nvme15 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0043, DMI type 9, 24 bytes +System Slot Information + Designation: nvme16 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0044, DMI type 9, 24 bytes +System Slot Information + Designation: nvme17 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0045, DMI type 9, 24 bytes +System Slot Information + Designation: nvme18 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0046, DMI type 9, 24 bytes +System Slot Information + Designation: nvme19 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0047, DMI type 9, 24 bytes +System Slot Information + Designation: nvme44 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0048, DMI type 9, 24 bytes +System Slot Information + Designation: nvme45 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0049, DMI type 9, 24 bytes +System Slot Information + Designation: nvme46 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x004A, DMI type 9, 24 bytes +System Slot Information + Designation: nvme47 + Type: Unknown + Current Usage: Available + Length: Other + Characteristics: None + Bus Address: 0000:00:00.0 + +Handle 0x0004, DMI type 13, 22 bytes +BIOS Language Information + Language Description Format: Long + Installable Languages: 2 + en|US|iso8859-1 + zh|CN|unicode + Currently Installed Language: en|US|iso8859-1 + +Handle 0xFEFF, DMI type 127, 4 bytes +End Of Table + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_pcie.log b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_pcie.log new file mode 100644 index 0000000000000000000000000000000000000000..e86eab586f5e8e261f9eb81fe704a44e9abea5ec --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/hardware/hardware_pcie.log @@ -0,0 +1,2681 @@ +00:00.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L0s Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #0, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [400 v1] Virtual Channel + Caps: LPEVC=1 RefClk=100ns PATEntryBits=1 + Arb: Fixed+ WRR32- WRR64- WRR128- + Ctrl: ArbSelect=Fixed + Status: InProgress- + VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- + Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256- + Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff + Status: NegoPending- InProgress- + VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- + Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256- + Ctrl: Enable- ID=1 ArbSelect=Fixed TC/VC=00 + Status: NegoPending- InProgress- + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [800 v1] Designated Vendor-Specific + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Capabilities: [900 v1] Designated Vendor-Specific + Kernel driver in use: pcieport + +00:04.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #4, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [800 v1] Designated Vendor-Specific + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Capabilities: [900 v1] Designated Vendor-Specific + Kernel driver in use: pcieport + +00:08.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L0s L1 Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 8GT/s (downgraded), Width x8 (ok) + TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #8, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState+ + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+, EqualizationPhase1+ + EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +00:0c.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #12, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +00:10.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #16, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState+ + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +00:11.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L1 Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #17, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState+ + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +00:12.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x4, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L1 Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #18, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000000202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +03:00.0 RAID bus controller [0104]: Broadcom / LSI MegaRAID Tri-Mode SAS3408 [1000:0017] (rev 01) + Subsystem: Huawei Technologies Co., Ltd. Device [19e5:d213] + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- + Capabilities: [158 v1] Alternative Routing-ID Interpretation (ARI) + ARICap: MFVC- ACS-, Next Function: 0 + ARICtl: MFVC- ACS-, Function Group: 0 + Capabilities: [168 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [254 v1] Dynamic Power Allocation + Capabilities: [284 v1] Vendor Specific Information: ID=0002 Rev=1 Len=100 + Capabilities: [384 v1] Vendor Specific Information: ID=0001 Rev=1 Len=038 + Capabilities: [3bc v1] Resizable BAR + Kernel driver in use: megaraid_sas + Kernel modules: megaraid_sas + +05:00.0 Signal processing controller [1180]: Huawei Technologies Co., Ltd. iBMA Virtual Network Adapter [19e5:1710] (rev 01) + Subsystem: Huawei Technologies Co., Ltd. Device [19e5:0000] + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +74:02.0 Serial Attached SCSI controller [0107]: Huawei Technologies Co., Ltd. HiSilicon SAS 3.0 HBA [19e5:a230] (rev 21) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +78:01.0 RAID bus controller [0104]: Huawei Technologies Co., Ltd. HiSilicon RDE Engine [19e5:a25a] (rev 21) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +7d:00.0 Ethernet controller [0200]: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller [19e5:a222] (rev 21) + Subsystem: Huawei Technologies Co., Ltd. Device [19e5:04cc] + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #20, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000200202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [400 v1] Virtual Channel + Caps: LPEVC=1 RefClk=100ns PATEntryBits=1 + Arb: Fixed+ WRR32- WRR64- WRR128- + Ctrl: ArbSelect=Fixed + Status: InProgress- + VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- + Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256- + Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff + Status: NegoPending- InProgress- + VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- + Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256- + Ctrl: Enable- ID=1 ArbSelect=Fixed TC/VC=00 + Status: NegoPending- InProgress- + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [800 v1] Designated Vendor-Specific + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Capabilities: [900 v1] Designated Vendor-Specific + Kernel driver in use: pcieport + +80:04.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L0s L1 Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #24, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000200202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [800 v1] Designated Vendor-Specific + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Capabilities: [900 v1] Designated Vendor-Specific + Kernel driver in use: pcieport + +80:08.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #28, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000200202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +80:0c.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM L0s L1 Enabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #32, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000200202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +80:10.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCIe Root Port with Gen4 [19e5:a120] (rev 21) (prog-if 00 [Normal decode]) + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ + RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ + MaxPayload 256 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- + LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported + ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) + TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- + SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- + Slot #36, PowerLimit 25.000W; Interlock- NoCompl- + SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- + Control: AttnInd Off, PwrInd Off, Power- Interlock- + SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- + Changed: MRL- PresDet- LinkState- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis-, NROPrPrP-, LTR- + 10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1 + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp+, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS+ + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd- + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [80] MSI: Enable+ Count=2/32 Maskable+ 64bit+ + Address: 0000200202110040 Data: 0000 + Masking: fffffffc Pending: 00000000 + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) + Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [d0] Subsystem: Huawei Technologies Co., Ltd. Device [19e5:371e] + Capabilities: [100 v2] Advanced Error Reporting + UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- + UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol- + UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- + CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- + CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ + AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- + MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap+ + HeaderLog: 00000000 00000000 00000000 00000000 + RootCmd: CERptEn+ NFERptEn+ FERptEn+ + RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- + FirstFatal- NonFatalMsg- FatalMsg- IntMsg 1 + ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 + Capabilities: [310 v1] Secondary PCI Express + LnkCtl3: LnkEquIntrruptEn-, PerformEqu- + LaneErrStat: 0 + Capabilities: [630 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid+ TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Capabilities: [700 v1] Data Link Feature + Capabilities: [70c v1] Lane Margining at the Receiver + Capabilities: [880 v1] Physical Layer 16.0 GT/s + Kernel driver in use: pcieport + +b4:00.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCI-PCI Bridge [19e5:a121] (rev 20) (prog-if 00 [Normal decode]) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +b4:01.0 PCI bridge [0604]: Huawei Technologies Co., Ltd. HiSilicon PCI-PCI Bridge [19e5:a121] (rev 20) (prog-if 00 [Normal decode]) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +b4:02.0 Serial Attached SCSI controller [0107]: Huawei Technologies Co., Ltd. HiSilicon SAS 3.0 HBA [19e5:a230] (rev 21) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +b8:01.0 RAID bus controller [0104]: Huawei Technologies Co., Ltd. HiSilicon RDE Engine [19e5:a25a] (rev 21) + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- + PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- + Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00 + DevCap: MaxPayload 512 bytes, PhantFunc 0 + ExtTag+ RBE+ + DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- + RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- + MaxPayload 128 bytes, MaxReadReq 512 bytes + DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend- + LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited + ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk- + ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- + LnkSta: Speed 2.5GT/s (ok), Width x1 (ok) + TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- + RootCap: CRSVisible+ + RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+ + RootSta: PME ReqID 0000, PMEStatus- PMEPending- + DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR- + 10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix- + EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- + FRS-, LN System CLS Not Supported, TPHComp-, ExtTPHComp-, ARIFwd+ + AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd+ + AtomicOpsCtl: ReqEn- EgressBlck- + LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis- + Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- + Compliance De-emphasis: -6dB + LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- + EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- + Capabilities: [b0] Power Management version 3 + Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) + Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- + Capabilities: [100 v1] Access Control Services + ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir- UpstreamFwd+ EgressCtrl- DirectTrans+ + ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- + Kernel driver in use: pcieport + +bd:00.0 Ethernet controller [0200]: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller [19e5:a222] (rev 21) + Subsystem: Huawei Technologies Co., Ltd. Device [19e5:0454] + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..3592512ee1709222ea84dc8bca7900ccb25110f2 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:48:15 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/175.6.26.33tcp --host-timeout 360 175.6.26.33 +# Ports scanned: TCP(65535;1-65535) UDP(0;) SCTP(0;) PROTOCOLS(0;) +Host: 175.6.26.33 () Status: Up +Host: 175.6.26.33 () Ports: 22/open/tcp//ssh//OpenSSH 8.2 (protocol 2.0)/, 80/open/tcp//http//nginx/, 8060/open/tcp//http//nginx 1.24.0/, 9094/open/tcp///// Ignored State: closed (65531) OS: Linux 2.6.32 Seq Index: 259 IP ID Seq: All zeros +# Nmap done at Mon May 27 21:48:30 2024 -- 1 IP address (1 host up) scanned in 15.99 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..1cffa25521ec2f2d857e53d9005611b42f7bfaa3 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.nmap @@ -0,0 +1,36 @@ +# Nmap 7.80 scan initiated Mon May 27 21:48:15 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/175.6.26.33tcp --host-timeout 360 175.6.26.33 +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000015s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +80/tcp open http syn-ack ttl 64 nginx +|_http-favicon: Unknown favicon MD5: FB20D21EB47D8BD317CAD0674A0DE53E +| http-methods: +|_ Supported Methods: GET HEAD POST OPTIONS +| http-robots.txt: 58 disallowed entries (15 shown) +| / /autocomplete/users /autocomplete/projects /search +| /admin /profile /dashboard /users /api/v* /help /s/ /-/profile +|_/-/user_settings/profile /-/ide/ /-/experiment +| http-title: \xE7\x99\xBB\xE5\xBD\x95 \xC2\xB7 GitLab +|_Requested resource was http://175.6.26.33/users/sign_in +|_http-trane-info: Problem with XML parsing of /evox/about +8060/tcp open http syn-ack ttl 64 nginx 1.24.0 +| http-methods: +|_ Supported Methods: GET HEAD POST +|_http-server-header: nginx/1.24.0 +|_http-title: 404 Not Found +9094/tcp open unknown syn-ack ttl 64 +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 19.470 days (since Wed May 8 10:31:24 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=259 (Good luck!) +IP ID Sequence Generation: All zeros + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Mon May 27 21:48:30 2024 -- 1 IP address (1 host up) scanned in 15.99 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.xml new file mode 100644 index 0000000000000000000000000000000000000000..40cb1e77f66532015eddd45a572b01d2c3ea0650 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33tcp.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +cpe:/a:openbsd:openssh:8.2 +cpe:/a:igor_sysoev:nginx + + + + + + +cpe:/o:linux:linux_kernel:2.6.32 + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..88d248a863e347939badb4038a3bac27d8a0cc74 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:48:31 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/175.6.26.33udp --host-timeout 360 175.6.26.33 +# Ports scanned: TCP(0;) UDP(65535;1-65535) SCTP(0;) PROTOCOLS(0;) +Host: 175.6.26.33 () Status: Up +Host: 175.6.26.33 () Ports: 9094/open|filtered/udp///// Ignored State: closed (65534) +# Nmap done at Mon May 27 21:50:27 2024 -- 1 IP address (1 host up) scanned in 117.03 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..261ff8c385ed3678b178f2dd55ac96790098db7a --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.nmap @@ -0,0 +1,13 @@ +# Nmap 7.80 scan initiated Mon May 27 21:48:31 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/175.6.26.33udp --host-timeout 360 175.6.26.33 +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000021s latency). +Not shown: 65534 closed ports +Reason: 65534 port-unreaches +PORT STATE SERVICE REASON VERSION +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Mon May 27 21:50:27 2024 -- 1 IP address (1 host up) scanned in 117.03 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.xml new file mode 100644 index 0000000000000000000000000000000000000000..8106cc06014d897b97a0c2aa9cb5bb8f7e4ec319 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/175.6.26.33udp.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..523a22c8d3102aadee44a203b0c2b4cb7943cca3 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:07 2024 as: nmap -sO -v --reason -n -oA data/test/safety/192.168.0.1protocol --host-timeout 360 192.168.0.1 +# Ports scanned: TCP(0;) UDP(0;) SCTP(0;) PROTOCOLS(256;0-255) +Host: 192.168.0.1 () Status: Up +Host: 192.168.0.1 () Protocols: 1/open/icmp/, 2/open|filtered/igmp/, 6/open/tcp/, 17/open/udp/, 103/open|filtered/pim/, 136/open|filtered/udplite/, 255/open|filtered// Ignored State: closed (249) +# Nmap done at Fri Mar 29 10:42:08 2024 -- 1 IP address (1 host up) scanned in 1.29 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.nmap new file mode 100644 index 0000000000000000000000000000000000000000..2c0b12ada2678b4252c18f317efaa5f444484797 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.nmap @@ -0,0 +1,16 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:07 2024 as: nmap -sO -v --reason -n -oA data/test/safety/192.168.0.1protocol --host-timeout 360 192.168.0.1 +Nmap scan report for 192.168.0.1 +Host is up, received localhost-response (0.00027s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +# Nmap done at Fri Mar 29 10:42:08 2024 -- 1 IP address (1 host up) scanned in 1.29 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.xml new file mode 100644 index 0000000000000000000000000000000000000000..37b41f202f09d3fcf8130020c45404ac14bee4ef --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1protocol.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..058f8fd6a44106695616cc707fdcc62b162033e1 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:01 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.0.1tcp --host-timeout 360 192.168.0.1 +# Ports scanned: TCP(65535;1-65535) UDP(0;) SCTP(0;) PROTOCOLS(0;) +Host: 192.168.0.1 () Status: Up +Host: 192.168.0.1 () Ports: 22/open/tcp//ssh//OpenSSH 8.2 (protocol 2.0)/, 6000/open/tcp//vnc//VNC (protocol 3.8)/, 6001/open/tcp//vnc//VNC (protocol 3.8)/, 6002/open/tcp//vnc//VNC (protocol 3.8)/ Ignored State: closed (65531) OS: Linux 2.6.32 Seq Index: 261 IP ID Seq: All zeros +# Nmap done at Fri Mar 29 10:42:04 2024 -- 1 IP address (1 host up) scanned in 3.17 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..99a5c20c2dd30df4eeacecc4eef74daa05bf9fa8 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.nmap @@ -0,0 +1,34 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:01 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.0.1tcp --host-timeout 360 192.168.0.1 +Nmap scan report for 192.168.0.1 +Host is up, received user-set (0.000013s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +6000/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6001/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6002/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 22.160 days (since Thu Mar 7 06:51:51 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=261 (Good luck!) +IP ID Sequence Generation: All zeros + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Fri Mar 29 10:42:04 2024 -- 1 IP address (1 host up) scanned in 3.17 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.xml new file mode 100644 index 0000000000000000000000000000000000000000..e59c1ad05a553bc4d9ed2ae94f25f67cc2c0ad6d --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1tcp.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +cpe:/a:openbsd:openssh:8.2 + + + + + + + + +cpe:/o:linux:linux_kernel:2.6.32 + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..2b8d8838be717e1a5fe29ca7f86527bc30640c2b --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:04 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.0.1udp --host-timeout 360 192.168.0.1 +# Ports scanned: TCP(0;) UDP(65535;1-65535) SCTP(0;) PROTOCOLS(0;) +Host: 192.168.0.1 () Status: Up +Host: 192.168.0.1 () Status: Up +# Nmap done at Fri Mar 29 10:42:07 2024 -- 1 IP address (1 host up) scanned in 3.07 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..b5ebfc23f55a336f7b6d10b3e946391600f7cbb2 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.nmap @@ -0,0 +1,10 @@ +# Nmap 7.80 scan initiated Fri Mar 29 10:42:04 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.0.1udp --host-timeout 360 192.168.0.1 +Nmap scan report for 192.168.0.1 +Host is up, received user-set (0.000012s latency). +All 65535 scanned ports on 192.168.0.1 are closed because of 65535 port-unreaches +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Fri Mar 29 10:42:07 2024 -- 1 IP address (1 host up) scanned in 3.07 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.xml new file mode 100644 index 0000000000000000000000000000000000000000..556d44bc51211310d123d96a880cc381f5f7a906 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.0.1udp.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..51b3adce07294ef60321658c649c34c9c7bced61 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:55:17 2024 as: nmap -sO -v --reason -n -oA data/test/safety/192.168.122.1protocol --host-timeout 360 192.168.122.1 +# Ports scanned: TCP(0;) UDP(0;) SCTP(0;) PROTOCOLS(256;0-255) +Host: 192.168.122.1 () Status: Up +Host: 192.168.122.1 () Protocols: 1/open/icmp/, 2/open|filtered/igmp/, 6/open/tcp/, 17/open/udp/, 103/open|filtered/pim/, 136/open|filtered/udplite/, 171/open//, 255/open|filtered// Ignored State: closed (248) +# Nmap done at Mon May 27 21:55:19 2024 -- 1 IP address (1 host up) scanned in 1.28 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.nmap new file mode 100644 index 0000000000000000000000000000000000000000..6d51fcca9368636dfb9eaa2c964c6beb9c7975a7 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.nmap @@ -0,0 +1,17 @@ +# Nmap 7.80 scan initiated Mon May 27 21:55:17 2024 as: nmap -sO -v --reason -n -oA data/test/safety/192.168.122.1protocol --host-timeout 360 192.168.122.1 +Nmap scan report for 192.168.122.1 +Host is up, received localhost-response (0.000010s latency). +Not shown: 248 closed protocols +Reason: 248 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +171 open unknown proto-response ttl 50 +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +# Nmap done at Mon May 27 21:55:19 2024 -- 1 IP address (1 host up) scanned in 1.28 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.xml new file mode 100644 index 0000000000000000000000000000000000000000..25dbb27ee9a7276e8875f5720861bd018a6b53a7 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1protocol.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..558ac65620a88a7843f354783aaf4cd0efb3efa3 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:52:44 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.122.1tcp --host-timeout 360 192.168.122.1 +# Ports scanned: TCP(65535;1-65535) UDP(0;) SCTP(0;) PROTOCOLS(0;) +Host: 192.168.122.1 () Status: Up +Host: 192.168.122.1 () Ports: 22/open/tcp//ssh//OpenSSH 8.2 (protocol 2.0)/, 53/open/tcp//domain//dnsmasq 2.82/, 80/open/tcp//http//nginx/, 8060/open/tcp//http//nginx 1.24.0/, 9094/open/tcp///// Ignored State: closed (65530) OS: Linux 2.6.32 Seq Index: 263 IP ID Seq: All zeros +# Nmap done at Mon May 27 21:53:06 2024 -- 1 IP address (1 host up) scanned in 22.71 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..cf74534742431ab47f202519fe9430a0e7a6e587 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.nmap @@ -0,0 +1,39 @@ +# Nmap 7.80 scan initiated Mon May 27 21:52:44 2024 as: nmap -sS -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.122.1tcp --host-timeout 360 192.168.122.1 +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000014s latency). +Not shown: 65530 closed ports +Reason: 65530 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +53/tcp open domain syn-ack ttl 64 dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +80/tcp open http syn-ack ttl 64 nginx +|_http-favicon: Unknown favicon MD5: FB20D21EB47D8BD317CAD0674A0DE53E +| http-methods: +|_ Supported Methods: GET HEAD POST OPTIONS +| http-robots.txt: 58 disallowed entries (15 shown) +| / /autocomplete/users /autocomplete/projects /search +| /admin /profile /dashboard /users /api/v* /help /s/ /-/profile +|_/-/user_settings/profile /-/ide/ /-/experiment +| http-title: \xE7\x99\xBB\xE5\xBD\x95 \xC2\xB7 GitLab +|_Requested resource was http://192.168.122.1/users/sign_in +|_http-trane-info: Problem with XML parsing of /evox/about +8060/tcp open http syn-ack ttl 64 nginx 1.24.0 +| http-methods: +|_ Supported Methods: GET HEAD POST +|_http-server-header: nginx/1.24.0 +|_http-title: 404 Not Found +9094/tcp open unknown syn-ack ttl 64 +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 28.997 days (since Sun Apr 28 21:57:10 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=263 (Good luck!) +IP ID Sequence Generation: All zeros + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Mon May 27 21:53:06 2024 -- 1 IP address (1 host up) scanned in 22.71 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f9f595269a44cbcdc68a87fafd31fe23289446a --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1tcp.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +cpe:/a:openbsd:openssh:8.2 +cpe:/a:thekelleys:dnsmasq:2.82 +cpe:/a:igor_sysoev:nginx + + + + + + +cpe:/o:linux:linux_kernel:2.6.32 + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..1972a4dcbadb5921f666a16958626a36d9f86229 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:53:06 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.122.1udp --host-timeout 360 192.168.122.1 +# Ports scanned: TCP(0;) UDP(65535;1-65535) SCTP(0;) PROTOCOLS(0;) +Host: 192.168.122.1 () Status: Up +Host: 192.168.122.1 () Ports: 53/open/udp//domain//dnsmasq 2.82/, 67/open|filtered/udp//dhcps///, 9094/open|filtered/udp///// Ignored State: closed (65532) +# Nmap done at Mon May 27 21:55:17 2024 -- 1 IP address (1 host up) scanned in 131.35 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..5bf015afe9f56a9b2f9b19d33e6d6c5fcd0312df --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.nmap @@ -0,0 +1,18 @@ +# Nmap 7.80 scan initiated Mon May 27 21:53:06 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/192.168.122.1udp --host-timeout 360 192.168.122.1 +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000020s latency). +Not shown: 65532 closed ports +Reason: 65532 port-unreaches +PORT STATE SERVICE REASON VERSION +53/udp open domain udp-response dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +|_dns-recursion: Recursion appears to be enabled +67/udp open|filtered dhcps no-response +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Mon May 27 21:55:17 2024 -- 1 IP address (1 host up) scanned in 131.35 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.xml new file mode 100644 index 0000000000000000000000000000000000000000..d33d6d2788ec35545eec7490bffcd561e01389b5 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/192.168.122.1udp.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +cpe:/a:thekelleys:dnsmasq:2.82 + + + + + + +cpe:/o:linux:linux_kernel:2.6.32 + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.gnmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.gnmap new file mode 100644 index 0000000000000000000000000000000000000000..74e75af0942e33bc199779cca6b62db27ac989e7 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.gnmap @@ -0,0 +1,5 @@ +# Nmap 7.80 scan initiated Mon May 27 21:50:45 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/195.6.26.33udp --host-timeout 360 195.6.26.33 +# Ports scanned: TCP(0;) UDP(65535;1-65535) SCTP(0;) PROTOCOLS(0;) +Host: 195.6.26.33 () Status: Up +Host: 195.6.26.33 () Ports: 9094/open|filtered/udp///// Ignored State: closed (65534) +# Nmap done at Mon May 27 21:52:42 2024 -- 1 IP address (1 host up) scanned in 117.06 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.nmap b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.nmap new file mode 100644 index 0000000000000000000000000000000000000000..9062c38dc320c1b53ba4f94b99f47b5eb47def1e --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.nmap @@ -0,0 +1,13 @@ +# Nmap 7.80 scan initiated Mon May 27 21:50:45 2024 as: nmap -sU -A -v --reason -p- -n -Pn -oA data/test/safety/195.6.26.33udp --host-timeout 360 195.6.26.33 +Nmap scan report for 195.6.26.33 +Host is up, received user-set (0.000018s latency). +Not shown: 65534 closed ports +Reason: 65534 port-unreaches +PORT STATE SERVICE REASON VERSION +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +# Nmap done at Mon May 27 21:52:42 2024 -- 1 IP address (1 host up) scanned in 117.06 seconds diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.xml b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3dbed872190b839baa2971e76af3bc1975c0c99 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/data/test/safety/195.6.26.33udp.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/env_OSVersion.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/env_OSVersion.sh new file mode 100644 index 0000000000000000000000000000000000000000..55c9c06cc713cdd3461db36edc3e8572e82c5cb4 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/env_OSVersion.sh @@ -0,0 +1,80 @@ +#!/bin/bash +################################## +#功能描述: 测试环境的操作系统版本检查 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +# 创建日志目录 +versions_osVersion() { + # 当前系统版本检查 + os_version_='unrecognized' + os_system_=$(uname -s) + LSB_RELEASE='/etc/lsb-release' + case ${os_system_} in + Linux) + if [[ -r '/etc/os-release' ]]; then + os_version_=$(awk -F= '$1~/PRETTY_NAME/{print $2}' /etc/os-release \ + |sed 's/"//g') + if echo "${os_version_}"|grep -i "CentOS" &> /dev/null ; then + if [[ -r '/etc/redhat-release' ]]; then + os_version_=$(cat /etc/redhat-release) + fi + fi + elif [[ -r '/etc/redhat-release' ]]; then + os_version_=$(cat /etc/redhat-release) + elif [[ -r '/etc/SuSE-release' ]]; then + os_version_=$(head -n 1 /etc/SuSE-release) + elif [[ -r "${LSB_RELEASE}" ]]; then + if grep -q 'DISTRIB_DESCRIPTION' "${LSB_RELEASE}"; then + # shellcheck disable=SC2002 + os_version_=$(cat "${LSB_RELEASE}" \ + |awk -F= '$1~/DISTRIB_DESCRIPTION/{print $2}' \ + |sed 's/"//g;s/ /-/g') + fi + fi + ;; + *) + write_messages e 0 1 "工具仅支持Linux系统" + exit + ;; + esac + Kylin_Build="" + if echo "${os_version_}"|grep -i -E "\|\" &> /dev/null; then + if [[ -f /var/log/messages ]];then + > /var/log/messages + fi + if hash nkvers 2>/dev/null; then + Kylin_Build=$(nkvers|sed -n -e '/Build/,/^$/'p|grep -Ev "Build:|#+") + Kylin_Build=$(echo ${Kylin_Build}) + fi + fi + + uos_edition_name="" + uos_edition_name_j="" + uos_edition_name_v="" + + if echo "${os_version_}"|grep -E -i "\|\" &> /dev/null; then + if [[ -f /var/log/messages ]];then + > /var/log/messages + fi + if [[ -r '/etc/os-version' ]]; then + uos_edition_name=$(cat /etc/os-version|grep 'EditionName\[zh_CN\]'|awk -F '=' '{print $NF}') + uos_edition_name_j=$(cat /etc/os-version|grep 'MajorVersion'|awk -F '=' '{print $NF}') + uos_edition_name_v=$(cat /etc/os-version|grep 'MinorVersion'|awk -F '=' '{print $NF}') + fi + fi + + + if [[ "${Kylin_Build}"x != ""x ]];then + os_version_=${Kylin_Build} + fi + if [[ "${uos_edition_name_v}"x != ""x ]]; then + os_version_="UnionTech OS Server"" V""${uos_edition_name_j}"" ""${uos_edition_name_v}""e" + fi + echo "${os_version_}" + unset os_system_ os_version_ + +} + +versions_osVersion \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/env_inspectation.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/env_inspectation.sh new file mode 100644 index 0000000000000000000000000000000000000000..795e300f2b9655ba1b243278a51ef96cf034349f --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/env_inspectation.sh @@ -0,0 +1,117 @@ +#!/bin/bash +################################## +#功能描述: 从CPU、内存、硬盘和网卡四个角度检查利用率是否过高,如果过高则提升当前环境非空闲 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## +# 创建日志目录 + + + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +# 空闲标记 +CPU_NOT_IDLE=0 +MEM_NOT_IDLE=0 +NET_NOT_IDLE=0 +DISK_NOT_IDLE=0 + +# 最大检查次数 +MAX_CPU_IDLE=10.00 +MAX_MEM_IDLE=5.00 +MAX_DISK_IDLE=5.00 +MAX_NET_CONNS=100 + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +sys_env_inspectation() { + # 环境自检,检查CPU、内存、硬盘和网卡是否利用率是否过高。 + # 脚本的PID + SCRIPTS_PID=$(ps -ef | grep -v grep | grep "$0" | awk '{print $2}') + + DISK_NAME=$(iostat -d -x |sed -n '4,$p'|wc -l) + IOS_LINE=$(( ( DISK_NAME + 1 )*4 +2 )) + + CPU_IDLE=$(top -n 1 -b | head -10 | tail -3 | awk '{if ($12 !~/top/ && $1!~/"${SCRIPTS_PID}"/) print $9}' | head -1) + if [[ -z "${CPU_IDLE}" ]]; then + write_messages e 0 3 "环境自检,检查CPU利用率出错,调用top命令出错" + elif [[ "$(echo "${CPU_IDLE}>${MAX_CPU_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "环境自检,检测到应用CPU利用率为:${CPU_IDLE}大于阈值,请使用top命令检查" + CPU_NOT_IDLE=1 + else + CPU_NOT_IDLE=0 + fi + MEM_IDLE=$(top -n 1 -b | head -10 | tail -3 | awk '{if ($12 !~/top/ && $1!~/"${SCRIPTS_PID}"/) print $10}' | head -1) + write_messages i 0 3 "环境自检,检测到应用内存利用率为:${MEM_IDLE}" + if [[ -z "${MEM_IDLE}" ]]; then + write_messages e 0 3 "环境自检,检查内存利用率出错,调用top命令出错" + elif [[ "$(echo "${MEM_IDLE}>${MAX_MEM_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "环境自检,检测到应用内存利用率为:${MEM_IDLE}大于阈值,请使用top命令检查" + MEM_NOT_IDLE=1 + else + MEM_NOT_IDLE=0 + fi + # 调用iostat检查硬盘的%util 设备的带宽利用率 + DISK_IDLE=$(iostat -d -x 1 5 |sed -n ''${IOS_LINE}',$p' |grep -v Device|awk '{print $NF}'|sort -nr|head -1) + write_messages i 0 3 "环境自检,检测到硬盘的带宽利用率为:${DISK_IDLE}" + if [[ -z "${DISK_IDLE}" ]]; then + write_messages e 0 3 "环境自检,检查硬盘利用率出错,调用iostat命令出错。" + elif [[ "$(echo "${DISK_IDLE}>${MAX_DISK_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "环境自检,检测到硬盘的带宽利用率为:${DISK_IDLE}大于阈值,请使用iostat -d -x命令检查" + DISK_NOT_IDLE=1 + else + DISK_NOT_IDLE=0 + fi + # 调用netstat检查网络连接情况 + NET_CONNECTIONS=$(netstat -n | awk '/^tcp/ {++S[$NF]}END{for(a in S) print S[a]}' | sort -nr | head -1) + write_messages i 0 3 "检测到网络连接数:${NET_CONNECTIONS}" + if [[ -z "${NET_CONNECTIONS}" ]]; then + write_messages e 0 3 "环境自检,检查网络连接数出错,调用nestat命令出错。" + elif [[ "${NET_CONNECTIONS}" -ge "${MAX_NET_CONNS}" ]]; then + write_messages e 0 3 "检测到网络连接数:${NET_CONNECTIONS},请使用 netstat -n|awk '/^tcp/{++S[\$NF]}END{for (a in S)print a , "\t",S[a]}'检查" + NET_NOT_IDLE=1 + else + NET_NOT_IDLE=0 + fi + + if [[ "${MEM_NOT_IDLE}" -eq 1 || "${CPU_NOT_IDLE}" -eq 1 || "${DISK_NOT_IDLE}" -eq 1 \ + || "${NET_NOT_IDLE}" -eq 1 ]]; then + exit 1 + else + exit 0 + fi + +} + +sys_env_inspectation \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/env_kunpengdeveloper.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/env_kunpengdeveloper.sh new file mode 100644 index 0000000000000000000000000000000000000000..873646559987f4c6bb5fa2780765b2300ee25090 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/env_kunpengdeveloper.sh @@ -0,0 +1,40 @@ +#!/bin/bash +################################## +#功能描述: 检查是否安装KunpengDeveloper工具,如果安装,测试期间停止该工具 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## +# 创建日志目录 + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +HAS_KUNPENG_DEVKIT=0 + +stop_or_start_kunpengdeveloper(){ + step=$1 + kit_list=("tuning_kit" "depende+" "porting" "hyper_tuner" ) + kit_service_list=("thor.service" "nginx_port.service" "gunicorn_port.service") + for kit in "${kit_list[@]}"; do + ps_result="$(pgrep -lf "${kit}") " + if [[ "${ps_result}" != ' ' ]]; then + HAS_KUNPENG_DEVKIT=1 + break + fi + done + if [[ ${HAS_KUNPENG_DEVKIT} -eq 1 && ${step} -eq 1 ]];then + for service in "${kit_service_list[@]}"; do + eval "systemctl stop ${service}" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 + done + fi + if [[ ${HAS_KUNPENG_DEVKIT} -eq 1 && ${step} -eq 10 ]];then + for service in "${kit_service_list[@]}"; do + eval "systemctl start ${service}" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 + done + fi +} + +stop_or_start_kunpengdeveloper $1 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/env_preparation.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/env_preparation.sh new file mode 100644 index 0000000000000000000000000000000000000000..6c0d6979c6e9e3eb67500fe03bb4357f632764cb --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/env_preparation.sh @@ -0,0 +1,145 @@ +#!/bin/bash +################################## +#功能描述: 工具的依赖软件检查和安装 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +# 创建日志目录 +source ~/.bashrc +shopt -s expand_aliases +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + + + +env_preparation() { + # 检查系统环境准备情况 + write_messages i 0 1 "请用户确保安装业务应用软件、测试工具及其依赖软件。" + software_list=(nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sar bc) + rpm_list=(nmap ipmitool dmidecode pciutils util-linux util-linux net-tools net-tools sysstat bc) + deb_list=(nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc) + software_des=('漏洞扫描' '功耗测试' '查看硬件信息' '查看PCI总线' '查看CPU信息' '查看硬盘分区' '查看网络接口' '网络连接数' '性能分析' '浮点计算' ) + suse_sys=(SuSE) + length=${#software_list[@]} + sys_id=0 + os_version=$(bash ${CURRENT_PATH}/env_OSVersion.sh) + + if ! hash apt-get 2>/dev/null; then + sys_id=1; + SYS_LOG_="messages" + else + sys_id=2; + SYS_LOG_="syslog" + fi + for item in "${suse_sys[@]}"; do + if echo "${os_version}"|grep -i "${item}" &> /dev/null; then + sys_id=3; + SYS_LOG_="messages" + fi + done + if [[ "${sys_id}" -eq 1 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + rpm_app=${rpm_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "现在安装${software_desc}软件${software_app},请稍等。" + if ! yum -y install "${rpm_app}"; then + write_messages e 0 1 "安装${software_desc}软件${software_app}失败,请检查网络环境和yum源配置,并安装nmap,ipmitool,dmidecode,net-tools,pciutils,util-linux,sysstat的RPM包。" + exit 1 + fi + else + write_messages i 0 1 "${software_desc}软件已安装" + fi + done + elif [[ "${sys_id}" -eq 2 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + software_deb=${deb_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "现在安装${software_desc}软件${software_app},请稍等。" + if ! apt -y install "${software_deb}"; then + write_messages e 0 1 "安装${software_desc}软件${software_app}失败,请检查网络环境和apt源配置,并安装nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc的deb包。" + exit 1 + fi + else + write_messages i 0 1 "${software_desc}软件已安装" + fi + done + elif [[ "${sys_id}" -eq 3 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + software_deb=${deb_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "现在安装${software_desc}软件${software_app},请稍等。" + if ! zypper install -y "${software_deb}"; then + write_messages e 0 1 "安装${software_desc}软件${software_app}失败,请检查网络环境和apt源配置,并安装nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc的deb包。" + exit 1 + fi + else + write_messages i 0 1 "${software_desc}软件已安装" + fi + done + else + write_messages c 31 1 "当前仅支持CentOS、Redhat、中标麒麟、Ubuntu、银河麒麟、UOS、openEuler 发行版本。" + exit 1 + fi +} + +smartctl_install(){ + # smartctl 软件安装 + if hash yum 2>/dev/null && ! hash smartctl 2>/dev/null; then + write_messages i 0 1 "现在安装硬盘版本号查看软件smartctl,请稍等。" + if ! yum install -y smartmontools; then + write_messages e 0 1 "安装硬盘版本号查看软件smartctl失败,请检查网络环境和yum源配置,并安装smartmontools的RPM包。" + exit 1 + fi + fi +} + +env_preparation +smartctl_install + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_linpack_test.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_linpack_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..b55f871f38eb24718739cc429924eaeb3068feb1 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_linpack_test.sh @@ -0,0 +1,233 @@ +#!/bin/bash +################################## +#HPC 基础性能测试-Linpack 计算性能测试 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-03-02 修改 +################################## + +CURRENT_PATH=$(pwd) +LIB_PATH=${CURRENT_PATH}/../lib/hpc/ +OPENMPI_PATH=/home/compatibility_testing/hpc/openMPI +OPENBALSE_PATH=/home/compatibility_testing/hpc/openBLAS + + +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +SYS_=0 + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +install_GCC(){ + sys_id=$1 + + if ! gcc -v ; then + write_messages e 31 10 "没有安装编译器套件GCC C 编译器,请安装GCC 9.3.0 的以上的版本。" + exit 1 + else + gcc_version=$(gcc --version |grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|head -1| awk -F'.' '{print $1}') + if [[ "${gcc_version}" -lt 9 ]] ;then + write_messages e 31 10 "请安装GCC 9.3.0 的以上的版本。" + exit 1 + fi + fi + + if ! g++ -v; then + write_messages e 31 10 "没有安装编译器套件GCC C++ 编译器,请安装GCC 9.3.0 的以上的版本。" + exit 1 + else + cpp_version=$(g++ --version |grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|head -1| awk -F'.' '{print $1}') + if [[ "${cpp_version}" -lt 9 ]]; then + write_messages e 31 10 "请安装GCC 9.3.0 的以上的版本。" + exit 1 + fi + fi + + if ! gfortran -v; then + write_messages e 31 10 "没有安装编译器套件GCC fortran 编译器,请安装GCC 9.3.0 的以上的版本。" + exit 1 + else + fortran_version=$(gfortran --version |grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|head -1| awk -F'.' '{print $1}') + if [[ "${fortran_version}" -lt 9 ]]; then + write_messages e 31 10 "请安装GCC 9.3.0 的以上的版本。" + exit 1 + fi + fi +} + +install_openMPI() { + tar_name="openmpi-4.0.3.tar.gz" + tar_path=${LIB_PATH}"${tar_name}" + + check_os_version + if ! mpirun --version ; then + install_GCC ${SYS_} + cd ${LIB_PATH} ||exit + + if [[ ! -e "${tar_name}" ]];then + write_messages e 31 10 "${tar_path}文件不存在,请检查下载的压缩包是否完整。" + exit 1 + fi + + if ! tar -zxvf "${tar_name}" ;then + write_messages e 31 10 "解压${tar_path}文件时出错,请检查下载的压缩包是否完整。" + exit 1 + fi + + cd openmpi-4.0.3/ + mkdir -p build + cd build + ../configure --prefix=${OPENMPI_PATH} --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default \ + --with-cma --enable-mpi1-compatibility + make && make install -j`nproc` + + sed -i -e '$a export PATH=$PATH:'${OPENMPI_PATH}'/bin' /etc/profile + sed -i -e '$a export LD_LIBRARY=$LD_LIBRARY:'${OPENMPI_PATH}'/lib' /etc/profile + sed -i -e '$a export INCLUDE=$INCLUDE:'${OPENMPI_PATH}'/include' /etc/profile + source /etc/profile + + cd "${CURRENT_PATH}"||exit + if ! mpirun --version ; then + write_messages e 31 10 "安装openMPI失败,请手动安装。" + exit + fi + + + + + fi +} + +check_os_version(){ + if ! hash apt-get 2>/dev/null; then + SYS_=1; + else + SYS_=2; + fi +} + +install_openBLAS(){ + tar_name="OpenBLAS-0.3.6.tar.gz" + tar_path=${LIB_PATH}"${tar_name}" + + cd ${LIB_PATH} ||exit + + if [[ ! -e "${tar_name}" ]];then + write_messages e 31 10 "${tar_path}文件不存在,请检查。" + exit 1 + fi + + if ! tar -zxvf "${tar_name}" ;then + write_messages e 31 10 "解压${tar_path}文件时出错,请检查。" + exit 1 + fi + + cd OpenBLAS-0.3.6/ ||exit + export CC=`which gcc` + export CXX=`which g++` + export FC=`which gfortran` + make -j`nproc` + make PREFIX=${OPENBALSE_PATH} install -j`nproc` + + sed -i -e '$a export PATH=$PATH:'${OPENBALSE_PATH}'/bin' /etc/profile + sed -i -e '$a export LD_LIBRARY=$LD_LIBRARY:'${OPENBALSE_PATH}'/lib' /etc/profile + sed -i -e '$a export INCLUDE=$INCLUDE:'${OPENBALSE_PATH}'/include' /etc/profile + source /etc/profile + + + cd ${CURRENT_PATH}|| exit + if ! find ${OPENBALSE_PATH}/lib -name "*.so" ;then + write_messages e 31 10 "安装OpenBLAS失败。" + exit 1 + fi + +} + +install_HPL(){ + declare -A cores_array=(["24"]="4*6" ["32"]="4*8" ["48"]="4*12" ["64"]="8*8" ["96"]="8*12" ["128"]="8*16" ["192"]="8*24" ["256"]="16*16") + tar_name="hpl-2.3.tar.gz" + tar_path=${LIB_PATH}"${tar_name}" + file_name=${CURRENT_PATH}/data/test/compatiable/test_hpc_linpack.log + + cd ${LIB_PATH} ||exit + + if [[ ! -e "${tar_name}" ]];then + write_messages e 31 10 "${tar_path}文件不存在,请检查。" + exit 1 + fi + + if ! tar -zxvf "${tar_name}" ;then + write_messages e 31 10 "解压${tar_path}文件时出错,请检查。" + exit 1 + fi + + cd hpl-2.3 ||exit + cp -f ./../Make.Linux_Arm . + sed -i -e 's:${HPL_PATH}:'${LIB_PATH}':g' -e 's:${OPENBLAS_PATH}:'${OPENBALSE_PATH}':g' ./Make.Linux_Arm + make arch=Linux_Arm -j`nproc` + + cd ${CURRENT_PATH} ||exit + if ! find ${LIB_PATH}/hpl-2.3/bin/Linux_Arm -name "HPL.dat" ;then + write_messages e 10 1 "安装HPL失败。" + exit 1 + else + memory_size=$(cat /proc/meminfo |grep MemTotal|awk '{print $2}') + ns_float=$(echo "sqrt(0.9 * $memory_size * 1024/8) * 0.8" |bc) + ns=$(echo ${ns_float} |awk -F'.' '{print $1}') + cpu_cores=$(lscpu |grep -E "^CPU(\(s\))?:"|awk -F':' '{print $2}') + cpu_cores=$(echo ${cpu_cores}) + grip=${cores_array[$cpu_cores]} + if [[ -z ${grip} ]];then + ps=2 + qs=$(echo ${cpu_cores}/2|bc ) + else + ps=$(echo ${grip} |awk -F'*' '{print $1}') + qs=$(echo ${grip} |awk -F'*' '{print $2}') + fi + sed -i -e 's/${ns}/'${ns}'/g' -e 's/${ps}/'${ps}'/g' -e 's/${qs}/'${qs}'/g' ${LIB_PATH}/HPL.dat + cp -f ${LIB_PATH}/HPL.dat ${LIB_PATH}/hpl-2.3/bin/Linux_Arm/HPL.dat + cd ${LIB_PATH}/hpl-2.3/bin/Linux_Arm/ ||exit + sleep 60 + mpirun --allow-run-as-root -npernode ${cpu_cores} -hostfile ${LIB_PATH}/hostfile -x OMP_NUM_THREADS=1 ${LIB_PATH}/hpl-2.3/bin/Linux_Arm/xhpl 2>&1 |tee ${file_name} + cd ${CURRENT_PATH} ||exit + fi +} + +remove_config(){ + + sed -i -e 's;^export PATH=$PATH:'${OPENBALSE_PATH}'/bin;;g' /etc/profile + sed -i -e 's;^export LD_LIBRARY=$LD_LIBRARY:'${OPENBALSE_PATH}'/lib;;g' /etc/profile + sed -i -e 's;^export INCLUDE=$INCLUDE:'${OPENBALSE_PATH}'/include;;g' /etc/profile + source /etc/profile +} + + +install_openMPI +install_openBLAS +echo 3 > /proc/sys/vm/drop_caches +install_HPL +remove_config \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_memory_bandwidth.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_memory_bandwidth.sh new file mode 100644 index 0000000000000000000000000000000000000000..6f9e54be5aec3d14da1e1f33cdc04f30a9852716 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/hpc_memory_bandwidth.sh @@ -0,0 +1,121 @@ +#!/bin/bash +################################## +#HPC内存带宽测试 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-03-02 创建 +################################## + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +LIB_PATH=${CURRENT_PATH}/../lib/hpc/ +SYS_=0 +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} + + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +install_GCC(){ + sys_id=$1 + if [[ "${sys_id}" -eq 1 ]];then + if ! gcc -v ; then + if ! yum install -y gcc; then + write_messages e 34 10 "安装编译器套件GCC C 编译器失败,请检查网络环境和yum源配置,并安装GCC的RPM包。" + fi + fi + else + if ! gcc -v ; then + if ! apt-get install -y gcc; then + write_messages e 34 10 "安装编译器套件GCC C 编译器失败,请检查网络环境和apt源配置,并安装GCC的RPM包。" + fi + fi + fi +} + +check_os_version(){ + if ! hash apt-get 2>/dev/null; then + SYS_=1; + else + SYS_=2; + fi +} + + +hpc_memory_bandwidth() { + + tar_name="STREAM-master.tar.gz" + stream_path="${LIB_PATH}/STREAM-master/" + file_path=/data/test/compatiable/ + + cd ${LIB_PATH} ||exit + if [[ ! -e "${tar_name}" ]];then + write_messages e 34 10 "${tar_name}文件不存在,缺少测试工具,请检查。" + exit 1 + fi + if ! tar -zxvf "${tar_name}";then + write_messages e 34 10 "解压文件时出错,请检查。" + exit 1 + fi + + cd "${stream_path}" || exit 1 + + write_messages i 31 10 "开始安装测试工具。" + if eval "make clean" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 ;then + eval "make" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 + write_messages i 31 10 "安装测试工具成功。" + else + write_messages e 34 10 "HPC测试工具STREAM安装失败。" + exit 1 + fi + + write_messages i 31 10 "开始执行内存带宽测试。" + if ! eval "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1;then + write_messages e 34 10 "HPC测试工具STREAM执行错误,请查看日志"; + exit 1 + fi + + if ! eval "echo never > /sys/kernel/mm/transparent_hugepage/defrag" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1;then + write_messages e 34 10 "HPC测试工具STEAM执行错误,请查看日志"; + exit 1 + fi + + file_name="test_hpc_memory_bandwidth_0.log" + write_messages i 31 10 "内存带宽工具执行测试" + if ! ./stream_c.exe | sed -n '25,31p' >> "${CURRENT_PATH}""${file_path}""${file_name}" 2>&1; then + write_messages e 34 10 "HPC内存带宽测试失败" + exit 1 + fi + eval "echo 3 > /proc/sys/vm/drop_caches" + write_messages i 31 10 "HPC内存带宽测试成功。" +} + +install_GCC +hpc_memory_bandwidth \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log.json b/component/CompatibilityTesting/compatibility_testing/Chinese/log.json new file mode 100644 index 0000000000000000000000000000000000000000..fcef928ce93358262d4ed798095771e6d3d793f9 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log.json @@ -0,0 +1 @@ +[{"evidence":"#2024-05-27 21:48:14#info#5#业务应用test1启动完成","id":"Compatibility_Application_Start","reason":"","result":"passed"},{"evidence":"#2024-05-27 21:55:49#info#8#可靠性测试,业务应用test1启动完成。可靠性测试成功","id":"Reliability_Exception_Kill","reason":"","result":"passed"},{"evidence":"#2024-05-27 21:46:54#info#4#进程test1不存在","id":"Compatibility_Application_Stop","reason":"","result":"passed"},{"evidence":"","id":"Compatibility_Hardware_Server","reason":"硬件包含鲲鹏芯片,符合要求","result":"passed"},{"evidence":"","id":"Compatibility_Software_Name","result":"passed"},{"evidence":"Average: all 0.44 0.00 0.06 0.00 0.00 99.50,Average: all 0.43 0.00 0.07 0.00 0.00 99.50,被测试软件启动前采集CPU资源利用率与被测试软件停止后CPU利用率之间的波动为0.00 %,小于 1.00 % .","id":"Compatibility_Idle_Cpu","result":"passed"},{"evidence":"Average: 144747733 161147051 67956757 29.19 1631595 16068821 79118997 33.38 63588971 11076480 2923,Average: 144173973 160610347 68474240 29.41 1631808 16116203 79342357 33.48 64113984 11098325 1621,被测试软件启动前采集内存资源利用率与被测试软件停止后内存利用率之间的波动为0.22 %,小于 1.00 % .","id":"Compatibility_Idle_Memory","result":"passed"},{"evidence":"Average: openEuler-home 0.40 0.00 3.47 0.00 8.67 0.00 0.00 0.00,Average: openEuler-home 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00,被测试软件启动前采集硬盘资源利用率与被测试软件停止后硬盘利用率之间的波动为0.00 %,小于 1.00 % .","id":"Compatibility_Idle_Disk","result":"passed"},{"evidence":"Average: enp125s0f0 5.60 5.60 0.36 0.75 0.00 0.00 0.00 0.00,Average: enp125s0f0 2.27 3.93 0.14 0.50 0.00 0.00 0.07 0.00,被测试软件启动前采集的网卡资源接收数据与被测软件停止后采集网卡资源接收数据之间的波动为0.00 %,接收测试前波动的1.00%.,Average: enp125s0f0 5.60 5.60 0.36 0.75 0.00 0.00 0.00 0.00,Average: enp125s0f0 2.27 3.93 0.14 0.50 0.00 0.00 0.07 0.00,被测试软件启动前采集的网卡资源发送数据与被测软件停止后采集网卡资源发送数据之间的波动为0.00 %,发送测试前波动的1.00%.","id":"Compatibility_Idle_Network","result":"passed"},{"evidence":"","id":"Reliability_Pressure_Cpu","reason":"未执行压力测试无 CPU 资源信息","result":"skipped"},{"evidence":"","id":"Reliability_Pressure_Memory","reason":"未执行压力测试无 内存 资源信息","result":"skipped"},{"evidence":"","id":"Reliability_Pressure_Disk","reason":"未执行压力测试无 硬盘 资源信息","result":"skipped"},{"evidence":"","id":"Reliability_Pressure_Network","reason":"未执行压力测试无 网卡 资源信息","result":"skipped"},{"evidence":"PROTOCOL协议扫描结果如下:,# Ports scanned: TCP(0;) UDP(0;) SCTP(0;) PROTOCOLS(256;0-255),Host: 192.168.122.1 ()\tStatus: Up,Host: 192.168.122.1 ()\tProtocols: 1/open/icmp/, 2/open|filtered/igmp/, 6/open/tcp/, 17/open/udp/, 103/open|filtered/pim/, 136/open|filtered/udplite/, 171/open//, 255/open|filtered//\tIgnored State: closed (248),UDP协议扫描结果如下:,# Ports scanned: TCP(0;) UDP(65535;1-65535) SCTP(0;) PROTOCOLS(0;),Host: 192.168.122.1 ()\tStatus: Up,Host: 192.168.122.1 ()\tPorts: 53/open/udp//domain//dnsmasq 2.82/, 67/open|filtered/udp//dhcps///, 9094/open|filtered/udp/////\tIgnored State: closed (65532),TCP协议扫描结果如下:,# Ports scanned: TCP(65535;1-65535) UDP(0;) SCTP(0;) PROTOCOLS(0;),Host: 175.6.26.33 ()\tStatus: Up,Host: 175.6.26.33 ()\tPorts: 22/open/tcp//ssh//OpenSSH 8.2 (protocol 2.0)/, 80/open/tcp//http//nginx/, 8060/open/tcp//http//nginx 1.24.0/, 9094/open/tcp/////\tIgnored State: closed (65531)\tOS: Linux 2.6.32\tSeq Index: 259\tIP ID Seq: All zeros","id":"Security_Base_Port","result":"passed"}] \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log.tar.gz b/component/CompatibilityTesting/compatibility_testing/Chinese/log.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4dfa9189ee85d9175d99810f3a1cd6dfb5625bd1 Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/Chinese/log.tar.gz differ diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240329 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240329 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240331 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240527 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/app_log.log_20240527 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240329 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240329 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240331 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240527 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/error.log_20240527 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240329 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240329 new file mode 100644 index 0000000000000000000000000000000000000000..6e555af7e247670d0c1e46909036a25d4ad483ad --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240329 @@ -0,0 +1,141 @@ +#2024-03-29 10:37:11#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-03-29 10:37:11#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-03-29 10:37:11#info#0#自动化测试采集工具开始执行。 +#2024-03-29 10:37:11#info#1#第 1 步:配置文件检查, 开始 +#2024-03-29 10:37:11#error#2#应用停止命令为空。 +#2024-03-29 10:37:11#error#2#压力测试工具启动命令为空。 +#2024-03-29 10:37:11#info#1#第 1 步:配置文件检查, 完成 +#2024-03-29 10:37:11#info#1#第 2 步:软件依赖检查,开始 +#2024-03-29 10:37:11#info#1#创建目录 +#2024-03-29 10:37:11#info#1#当前的操作系统版本是openEuler 20.03 (LTS-SP2)。 +#2024-03-29 10:37:11#info#1#请用户确保安装业务应用软件、测试工具及其依赖软件。 +#2024-03-29 10:37:11#info#1#漏洞扫描软件已安装 +#2024-03-29 10:37:11#info#1#功耗测试软件已安装 +#2024-03-29 10:37:11#info#1#查看硬件信息软件已安装 +#2024-03-29 10:37:11#info#1#查看PCI总线软件已安装 +#2024-03-29 10:37:11#info#1#查看CPU信息软件已安装 +#2024-03-29 10:37:11#info#1#查看硬盘分区软件已安装 +#2024-03-29 10:37:11#info#1#查看网络接口软件已安装 +#2024-03-29 10:37:11#info#1#网络连接数软件已安装 +#2024-03-29 10:37:11#info#1#性能分析软件已安装 +#2024-03-29 10:37:11#info#1#浮点计算软件已安装 +#2024-03-29 10:37:11#info#1#第 2 步:软件依赖检查,完成 +#2024-03-29 10:37:11#info#3#第 3 步:测试环境自检, 开始 +#2024-03-29 10:37:11#info#3#环境自检开始 +#2024-03-29 10:37:12#info#3#环境自检,检测到应用内存利用率为:0.0 +#2024-03-29 10:37:16#info#3#环境自检,检测到硬盘的带宽利用率为:0.00 +#2024-03-29 10:37:16#info#3#检测到网络连接数:7 +#2024-03-29 10:37:16#info#3#环境自检结束 +#2024-03-29 10:37:16#info#3#第 3 步:测试环境自检, 完成 +#2024-03-29 10:37:16#info#4#第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-03-29 10:37:16#info#4#调用命令dmidecode获取服务器型号完成 +#2024-03-29 10:37:16#info#4#调用命令lspci -nnvv获取pci信息完成 +#2024-03-29 10:37:16#info#4#调用命令lscpu获取CPU信息完成 +#2024-03-29 10:37:16#info#4#调用命令lsblk获取硬盘分区完成 +#2024-03-29 10:37:16#info#4#调用命令cat /proc/version获取内核信息完成 +#2024-03-29 10:37:25#info#4#进程test1不存在 +#2024-03-29 10:37:25#info#4#兼容性测试前采集:调用sar -u 5 3命令采集CPU指标 +#2024-03-29 10:37:40#info#4#兼容性测试前采集:调用sar -r 5 3命令采集内存指标 +#2024-03-29 10:37:55#info#4#兼容性测试前采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-03-29 10:38:10#info#4#兼容性测试前采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-03-29 10:38:25#info#4#兼容性测试前采集已完成 +#2024-03-29 10:38:25#info#4#兼容性测试前采集已完成 +#2024-03-29 10:38:25#info#4#第 4 步:应用启动前采集结束 +#2024-03-29 10:38:35#info#5#第 5 步:启动业务应用,可通过./log目录info.log查看进度,如果长时间未进行下一步,请检查配置文件填写的启动命令执行后是否会返回。 +#2024-03-29 10:38:35#info#5#进程test1不存在 +#2024-03-29 10:38:35#info#5#进程test1不存在 +#2024-03-29 10:39:26#error#5#启动业务应用test1失败,请用户检查启动脚本。 +#2024-03-29 10:40:28#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-03-29 10:40:28#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-03-29 10:40:28#info#0#自动化测试采集工具开始执行。 +#2024-03-29 10:40:28#info#1#第 1 步:配置文件检查, 开始 +#2024-03-29 10:40:28#error#2#应用停止命令为空。 +#2024-03-29 10:40:28#error#2#压力测试工具启动命令为空。 +#2024-03-29 10:40:28#info#1#第 1 步:配置文件检查, 完成 +#2024-03-29 10:40:28#info#1#第 2 步:软件依赖检查,开始 +#2024-03-29 10:40:28#info#1#创建目录 +#2024-03-29 10:40:28#info#1#当前的操作系统版本是openEuler 20.03 (LTS-SP2)。 +#2024-03-29 10:40:28#info#1#请用户确保安装业务应用软件、测试工具及其依赖软件。 +#2024-03-29 10:40:28#info#1#漏洞扫描软件已安装 +#2024-03-29 10:40:28#info#1#功耗测试软件已安装 +#2024-03-29 10:40:28#info#1#查看硬件信息软件已安装 +#2024-03-29 10:40:28#info#1#查看PCI总线软件已安装 +#2024-03-29 10:40:28#info#1#查看CPU信息软件已安装 +#2024-03-29 10:40:28#info#1#查看硬盘分区软件已安装 +#2024-03-29 10:40:28#info#1#查看网络接口软件已安装 +#2024-03-29 10:40:28#info#1#网络连接数软件已安装 +#2024-03-29 10:40:28#info#1#性能分析软件已安装 +#2024-03-29 10:40:28#info#1#浮点计算软件已安装 +#2024-03-29 10:40:29#info#1#第 2 步:软件依赖检查,完成 +#2024-03-29 10:40:29#info#3#第 3 步:测试环境自检, 开始 +#2024-03-29 10:40:29#info#3#环境自检开始 +#2024-03-29 10:40:29#error#3#环境自检,检测到应用CPU利用率为:11.8大于阈值,请使用top命令检查 +#2024-03-29 10:40:29#info#3#环境自检,检测到应用内存利用率为:0.0 +#2024-03-29 10:40:33#info#3#环境自检,检测到硬盘的带宽利用率为:0.00 +#2024-03-29 10:40:33#info#3#检测到网络连接数:8 +#2024-03-29 10:40:33#error#1#当前服务器的环境非空闲,请停止运行的业务软件,详细信息查看目录/home/compatibility_testing/Chinese//log/info.log 的日志 +#2024-03-29 10:40:33#info#3#环境自检,检测到应用内存利用率为:0.0 +#2024-03-29 10:40:37#info#3#环境自检,检测到硬盘的带宽利用率为:0.00 +#2024-03-29 10:40:37#info#3#检测到网络连接数:8 +#2024-03-29 10:40:37#info#3#环境自检结束 +#2024-03-29 10:40:37#info#3#第 3 步:测试环境自检, 完成 +#2024-03-29 10:40:37#info#4#第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-03-29 10:40:37#info#4#调用命令dmidecode获取服务器型号完成 +#2024-03-29 10:40:37#info#4#调用命令lspci -nnvv获取pci信息完成 +#2024-03-29 10:40:37#info#4#调用命令lscpu获取CPU信息完成 +#2024-03-29 10:40:37#info#4#调用命令lsblk获取硬盘分区完成 +#2024-03-29 10:40:37#info#4#调用命令cat /proc/version获取内核信息完成 +#2024-03-29 10:40:40#info#4#进程test1不存在 +#2024-03-29 10:40:40#info#4#兼容性测试前采集:调用sar -u 5 3命令采集CPU指标 +#2024-03-29 10:40:55#info#4#兼容性测试前采集:调用sar -r 5 3命令采集内存指标 +#2024-03-29 10:41:10#info#4#兼容性测试前采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-03-29 10:41:25#info#4#兼容性测试前采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-03-29 10:41:40#info#4#兼容性测试前采集已完成 +#2024-03-29 10:41:40#info#4#兼容性测试前采集已完成 +#2024-03-29 10:41:40#info#4#第 4 步:应用启动前采集结束 +#2024-03-29 10:41:50#info#5#第 5 步:启动业务应用,可通过./log目录info.log查看进度,如果长时间未进行下一步,请检查配置文件填写的启动命令执行后是否会返回。 +#2024-03-29 10:41:50#info#5#进程test1不存在 +#2024-03-29 10:41:51#info#5#进程test1不存在 +#2024-03-29 10:42:01#info#5#业务应用test1启动完成。 +#2024-03-29 10:42:01#info#5#第 5 步:启动业务应用完成 +#2024-03-29 10:42:01#info#6#第 6 步:安全测试,进行应用端口扫描,可通过./log目录的nmap.log查看进度 +#2024-03-29 10:42:01#info#6#现在进行端口安全测试 +#2024-03-29 10:42:01#info#6#安全测试采集:执行192.168.0.1的 TCP 端口扫描 +#2024-03-29 10:42:04#info#6#安全测试采集:执行192.168.0.1的 UCP 端口扫描 +#2024-03-29 10:42:07#info#6#安全测试采集:执行192.168.0.1的 protocol扫描 +#2024-03-29 10:42:08#info#6#安全测试采集:执行175.6.26.33的 TCP 端口扫描 +#2024-03-29 10:43:59#info#6#安全测试采集:执行175.6.26.33的 UCP 端口扫描 +#2024-03-29 10:44:02#info#6#安全测试采集:执行175.6.26.33的 protocol扫描 +#2024-03-29 10:44:04#info#6#安全测试采集:执行195.6.26.33的 TCP 端口扫描 +#2024-03-29 10:44:07#info#6#安全测试采集:执行195.6.26.33的 UCP 端口扫描 +#2024-03-29 10:44:10#info#6#安全测试采集:执行195.6.26.33的 protocol扫描 +#2024-03-29 10:44:11#info#6#安全测试采集:执行192.168.122.1的 TCP 端口扫描 +#2024-03-29 10:44:28#info#6#安全测试采集:执行192.168.122.1的 UCP 端口扫描 +#2024-03-29 10:46:26#info#6#安全测试采集:执行192.168.122.1的 protocol扫描 +#2024-03-29 10:46:27#info#6#端口安全测试结束 +#2024-03-29 10:46:27#info#6#端口安全测试结束 +#2024-03-29 10:46:27#info#6#第 6 步:安全测试结束 +#2024-03-29 10:46:27#info#7#第 7 步:进行业务压力下CPU、内存、硬盘和网卡系统资源采集 +#2024-03-29 10:46:27#info#7#第 7 步:压力测试采集结束. +#2024-03-29 10:46:27#info#8#第 8 步:进行可靠性测试,强制KILL应用后正常启动测试 +#2024-03-29 10:46:27#info#8#可靠性测试前检查,业务应用进程test1存在 +#2024-03-29 10:46:27#info#8#可靠性测试,执行强制杀死进程test1 +#2024-03-29 10:46:57#info#8#业务应用test1启动完成。 +#2024-03-29 10:46:57#info#8#可靠性测试,业务应用test1启动完成。可靠性测试成功 +#2024-03-29 10:46:57#info#8#第 8 步:可靠性测试结束. +#2024-03-29 10:46:57#info#9#第 9 步:应用停止后CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-03-29 10:46:57#info#9#进程test1存在 +#2024-03-29 10:46:57#info#9#进程test1不存在 +#2024-03-29 10:46:57#info#9#兼容性测试后采集:调用sar -u 5 3命令采集CPU指标 +#2024-03-29 10:47:12#info#9#兼容性测试后采集:调用sar -r 5 3命令采集内存指标 +#2024-03-29 10:47:27#info#9#兼容性测试后采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-03-29 10:47:42#info#9#兼容性测试后采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-03-29 10:47:57#info#9#兼容性测试后采集已完成 +#2024-03-29 10:47:57#info#9#兼容性测试后采集已完成 +#2024-03-29 10:48:07#info#9#第 9 步:应用停止后资源采集结束 +#2024-03-29 10:48:07#info#10#第 10 步:测试采集数据打包 +#2024-03-29 10:48:07#error#10#数据目录下的日志文件data/test/performance/test_perf_cpu_1.log不存在 +#2024-03-29 10:48:07#error#10#数据目录下的日志文件data/test/performance/test_perf_disk_1.log不存在 +#2024-03-29 10:48:07#error#10#数据目录下的日志文件data/test/performance/test_perf_mem_1.log不存在 +#2024-03-29 10:48:07#error#10#数据目录下的日志文件data/test/performance/test_perf_net_1.log不存在 +#2024-03-29 10:48:07#info#10#采集结束,日志打包完成,压缩包log.tar.gz存放在/home/lj/compatibility_testing/Chinese。 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240331 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e9f4fe26562bbd7c714a6249f4fec81fc2e5325e --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240331 @@ -0,0 +1,32 @@ +#2024-03-31 16:31:25#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-03-31 16:31:25#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-03-31 16:31:25#info#0#自动化测试采集工具开始执行。 +#2024-03-31 16:31:25#info#1#第 1 步:配置文件检查, 开始 +#2024-03-31 16:31:25#error#2#应用停止命令为空。 +#2024-03-31 16:31:25#error#2#压力测试工具启动命令为空。 +#2024-03-31 16:31:25#info#1#第 1 步:配置文件检查, 完成 +#2024-03-31 16:31:25#info#1#第 2 步:软件依赖检查,开始 +#2024-03-31 16:31:25#info#1#创建目录 +#2024-03-31 16:31:25#info#1#当前的操作系统版本是openEuler 20.03 (LTS-SP2)。 +#2024-03-31 16:31:25#info#1#请用户确保安装业务应用软件、测试工具及其依赖软件。 +#2024-03-31 16:31:25#info#1#漏洞扫描软件已安装 +#2024-03-31 16:31:25#info#1#功耗测试软件已安装 +#2024-03-31 16:31:25#info#1#查看硬件信息软件已安装 +#2024-03-31 16:31:25#info#1#查看PCI总线软件已安装 +#2024-03-31 16:31:25#info#1#查看CPU信息软件已安装 +#2024-03-31 16:31:25#info#1#查看硬盘分区软件已安装 +#2024-03-31 16:31:25#info#1#查看网络接口软件已安装 +#2024-03-31 16:31:25#info#1#网络连接数软件已安装 +#2024-03-31 16:31:25#info#1#性能分析软件已安装 +#2024-03-31 16:31:25#info#1#浮点计算软件已安装 +#2024-03-31 16:31:25#info#1#第 2 步:软件依赖检查,完成 +#2024-03-31 16:31:25#info#3#第 3 步:测试环境自检, 开始 +#2024-03-31 16:31:25#info#3#环境自检开始 +#2024-03-31 16:31:25#info#3#环境自检结束 +#2024-03-31 16:31:25#info#3#第 3 步:测试环境自检, 完成 +#2024-03-31 16:31:25#info#4#第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-03-31 16:31:25#info#4#调用命令dmidecode获取服务器型号完成 +#2024-03-31 16:31:25#info#4#调用命令lspci -nnvv获取pci信息完成 +#2024-03-31 16:31:25#info#4#调用命令lscpu获取CPU信息完成 +#2024-03-31 16:31:25#info#4#调用命令lsblk获取硬盘分区完成 +#2024-03-31 16:31:25#info#4#调用命令cat /proc/version获取内核信息完成 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240527 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240527 new file mode 100644 index 0000000000000000000000000000000000000000..29ee28643f852400424a868a265a4731ead59cce --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log/info.log_20240527 @@ -0,0 +1,123 @@ +#2024-05-27 20:48:28#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-05-27 20:48:28#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-05-27 20:48:28#info#0#自动化测试采集工具开始执行。 +#2024-05-27 20:48:28#info#1#第 1 步:配置文件检查, 开始 +#2024-05-27 20:48:28#error#2#应用停止命令为空。 +#2024-05-27 20:48:28#error#2#压力测试工具启动命令为空。 +#2024-05-27 20:48:28#info#1#第 1 步:配置文件检查, 完成 +#2024-05-27 20:48:28#info#1#第 2 步:软件依赖检查,开始 +#2024-05-27 20:48:28#info#1#创建目录 +#2024-05-27 20:48:28#info#1#当前的操作系统版本是openEuler 20.03 (LTS-SP2)。 +#2024-05-27 20:48:28#info#1#请用户确保安装业务应用软件、测试工具及其依赖软件。 +#2024-05-27 20:48:28#info#1#漏洞扫描软件已安装 +#2024-05-27 20:48:28#info#1#功耗测试软件已安装 +#2024-05-27 20:48:28#info#1#查看硬件信息软件已安装 +#2024-05-27 20:48:28#info#1#查看PCI总线软件已安装 +#2024-05-27 20:48:28#info#1#查看CPU信息软件已安装 +#2024-05-27 20:48:28#info#1#查看硬盘分区软件已安装 +#2024-05-27 20:48:28#info#1#查看网络接口软件已安装 +#2024-05-27 20:48:28#info#1#网络连接数软件已安装 +#2024-05-27 20:48:28#info#1#性能分析软件已安装 +#2024-05-27 20:48:28#info#1#浮点计算软件已安装 +#2024-05-27 20:48:28#info#1#第 2 步:软件依赖检查,完成 +#2024-05-27 20:48:28#info#3#第 3 步:测试环境自检, 开始 +#2024-05-27 20:48:28#info#3#环境自检开始 +#2024-05-27 20:48:28#info#3#环境自检结束 +#2024-05-27 20:48:28#info#3#第 3 步:测试环境自检, 完成 +#2024-05-27 20:48:28#info#4#第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-05-27 20:48:28#info#4#调用命令dmidecode获取服务器型号完成 +#2024-05-27 20:48:28#info#4#调用命令lspci -nnvv获取pci信息完成 +#2024-05-27 20:48:28#info#4#调用命令lscpu获取CPU信息完成 +#2024-05-27 20:48:28#info#4#调用命令lsblk获取硬盘分区完成 +#2024-05-27 20:48:28#info#4#调用命令cat /proc/version获取内核信息完成 +#2024-05-27 20:48:36#info#4#进程test1不存在 +#2024-05-27 20:48:36#info#4#兼容性测试前采集:调用sar -u 5 3命令采集CPU指标 +#2024-05-27 20:48:42#info#4#兼容性测试前采集:调用sar -r 5 3命令采集内存指标 +#2024-05-27 20:48:42#info#4#兼容性测试前采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-05-27 20:48:44#info#4#兼容性测试前采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-05-27 20:48:44#info#4#兼容性测试前采集已完成 +#2024-05-27 20:48:44#info#4#兼容性测试前采集已完成 +#2024-05-27 20:48:44#info#4#第 4 步:应用启动前采集结束 +#2024-05-27 21:46:47#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-05-27 21:46:47#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-05-27 21:46:47#info#0#自动化测试采集工具开始执行。 +#2024-05-27 21:46:47#info#1#第 1 步:配置文件检查, 开始 +#2024-05-27 21:46:47#error#2#应用停止命令为空。 +#2024-05-27 21:46:47#error#2#压力测试工具启动命令为空。 +#2024-05-27 21:46:47#info#1#第 1 步:配置文件检查, 完成 +#2024-05-27 21:46:47#info#1#第 2 步:软件依赖检查,开始 +#2024-05-27 21:46:47#info#1#创建目录 +#2024-05-27 21:46:47#info#1#当前的操作系统版本是openEuler 20.03 (LTS-SP2)。 +#2024-05-27 21:46:47#info#1#请用户确保安装业务应用软件、测试工具及其依赖软件。 +#2024-05-27 21:46:47#info#1#漏洞扫描软件已安装 +#2024-05-27 21:46:47#info#1#功耗测试软件已安装 +#2024-05-27 21:46:47#info#1#查看硬件信息软件已安装 +#2024-05-27 21:46:47#info#1#查看PCI总线软件已安装 +#2024-05-27 21:46:47#info#1#查看CPU信息软件已安装 +#2024-05-27 21:46:47#info#1#查看硬盘分区软件已安装 +#2024-05-27 21:46:47#info#1#查看网络接口软件已安装 +#2024-05-27 21:46:47#info#1#网络连接数软件已安装 +#2024-05-27 21:46:47#info#1#性能分析软件已安装 +#2024-05-27 21:46:47#info#1#浮点计算软件已安装 +#2024-05-27 21:46:47#info#1#第 2 步:软件依赖检查,完成 +#2024-05-27 21:46:47#info#3#第 3 步:测试环境自检, 开始 +#2024-05-27 21:46:47#info#3#环境自检开始 +#2024-05-27 21:46:47#info#3#环境自检结束 +#2024-05-27 21:46:47#info#3#第 3 步:测试环境自检, 完成 +#2024-05-27 21:46:47#info#4#第 4 步:应用启动前CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-05-27 21:46:47#info#4#调用命令dmidecode获取服务器型号完成 +#2024-05-27 21:46:47#info#4#调用命令lspci -nnvv获取pci信息完成 +#2024-05-27 21:46:47#info#4#调用命令lscpu获取CPU信息完成 +#2024-05-27 21:46:47#info#4#调用命令lsblk获取硬盘分区完成 +#2024-05-27 21:46:47#info#4#调用命令cat /proc/version获取内核信息完成 +#2024-05-27 21:46:54#info#4#进程test1不存在 +#2024-05-27 21:46:54#info#4#兼容性测试前采集:调用sar -u 5 3命令采集CPU指标 +#2024-05-27 21:47:09#info#4#兼容性测试前采集:调用sar -r 5 3命令采集内存指标 +#2024-05-27 21:47:24#info#4#兼容性测试前采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-05-27 21:47:39#info#4#兼容性测试前采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-05-27 21:47:54#info#4#兼容性测试前采集已完成 +#2024-05-27 21:47:54#info#4#兼容性测试前采集已完成 +#2024-05-27 21:47:54#info#4#第 4 步:应用启动前采集结束 +#2024-05-27 21:48:04#info#5#第 5 步:启动业务应用,可通过./log目录info.log查看进度,如果长时间未进行下一步,请检查配置文件填写的启动命令执行后是否会返回。 +#2024-05-27 21:48:04#info#5#进程test1不存在 +#2024-05-27 21:48:04#info#5#进程test1不存在 +#2024-05-27 21:48:14#info#5#业务应用test1启动完成。 +#2024-05-27 21:48:14#info#5#第 5 步:启动业务应用完成 +#2024-05-27 21:48:14#info#6#第 6 步:安全测试,进行应用端口扫描,可通过./log目录的nmap.log查看进度 +#2024-05-27 21:48:14#info#6#现在进行端口安全测试 +#2024-05-27 21:48:14#info#6#安全测试采集:执行175.6.26.33的 TCP 端口扫描 +#2024-05-27 21:48:30#info#6#安全测试采集:执行175.6.26.33的 UCP 端口扫描 +#2024-05-27 21:50:27#info#6#安全测试采集:执行175.6.26.33的 protocol扫描 +#2024-05-27 21:50:29#info#6#安全测试采集:执行195.6.26.33的 TCP 端口扫描 +#2024-05-27 21:50:45#info#6#安全测试采集:执行195.6.26.33的 UCP 端口扫描 +#2024-05-27 21:52:42#info#6#安全测试采集:执行195.6.26.33的 protocol扫描 +#2024-05-27 21:52:43#info#6#安全测试采集:执行192.168.122.1的 TCP 端口扫描 +#2024-05-27 21:53:06#info#6#安全测试采集:执行192.168.122.1的 UCP 端口扫描 +#2024-05-27 21:55:17#info#6#安全测试采集:执行192.168.122.1的 protocol扫描 +#2024-05-27 21:55:19#info#6#端口安全测试结束 +#2024-05-27 21:55:19#info#6#端口安全测试结束 +#2024-05-27 21:55:19#info#6#第 6 步:安全测试结束 +#2024-05-27 21:55:19#info#7#第 7 步:进行业务压力下CPU、内存、硬盘和网卡系统资源采集 +#2024-05-27 21:55:19#info#7#第 7 步:压力测试采集结束. +#2024-05-27 21:55:19#info#8#第 8 步:进行可靠性测试,强制KILL应用后正常启动测试 +#2024-05-27 21:55:19#info#8#可靠性测试前检查,业务应用进程test1存在 +#2024-05-27 21:55:19#info#8#可靠性测试,执行强制杀死进程test1 +#2024-05-27 21:55:49#info#8#业务应用test1启动完成。 +#2024-05-27 21:55:49#info#8#可靠性测试,业务应用test1启动完成。可靠性测试成功 +#2024-05-27 21:55:49#info#8#第 8 步:可靠性测试结束. +#2024-05-27 21:55:49#info#9#第 9 步:应用停止后CPU、内存、硬盘、网卡和功耗系统资源采集 +#2024-05-27 21:55:49#info#9#进程test1存在 +#2024-05-27 21:55:49#info#9#进程test1不存在 +#2024-05-27 21:55:49#info#9#兼容性测试后采集:调用sar -u 5 3命令采集CPU指标 +#2024-05-27 21:56:04#info#9#兼容性测试后采集:调用sar -r 5 3命令采集内存指标 +#2024-05-27 21:56:19#info#9#兼容性测试后采集:调用sar -n DEV 5 3命令采集网卡指标 +#2024-05-27 21:56:34#info#9#兼容性测试后采集:调用sar -d -p 5 3命令采集硬盘指标 +#2024-05-27 21:56:49#info#9#兼容性测试后采集已完成 +#2024-05-27 21:56:49#info#9#兼容性测试后采集已完成 +#2024-05-27 21:56:59#info#9#第 9 步:应用停止后资源采集结束 +#2024-05-27 21:56:59#info#10#第 10 步:测试采集数据打包 +#2024-05-27 21:56:59#error#10#数据目录下的日志文件data/test/performance/test_perf_cpu_1.log不存在 +#2024-05-27 21:56:59#error#10#数据目录下的日志文件data/test/performance/test_perf_disk_1.log不存在 +#2024-05-27 21:56:59#error#10#数据目录下的日志文件data/test/performance/test_perf_mem_1.log不存在 +#2024-05-27 21:56:59#error#10#数据目录下的日志文件data/test/performance/test_perf_net_1.log不存在 +#2024-05-27 21:56:59#info#10#采集结束,日志打包完成,压缩包log.tar.gz存放在/tmp/compatibility_testing/Chinese。 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240329 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240329 new file mode 100644 index 0000000000000000000000000000000000000000..f9bf5cc338aa829fd9a9bc0a7f31813786e13b20 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240329 @@ -0,0 +1,550 @@ +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:42 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating SYN Stealth Scan at 10:42 +Scanning 192.168.0.1 [65535 ports] +Discovered open port 22/tcp on 192.168.0.1 +Discovered open port 6002/tcp on 192.168.0.1 +Discovered open port 6000/tcp on 192.168.0.1 +Discovered open port 6001/tcp on 192.168.0.1 +Completed SYN Stealth Scan at 10:42, 0.92s elapsed (65535 total ports) +Initiating Service scan at 10:42 +Scanning 4 services on 192.168.0.1 +Completed Service scan at 10:42, 0.01s elapsed (4 services on 1 host) +Initiating OS detection (try #1) against 192.168.0.1 +NSE: Script scanning 192.168.0.1. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.10s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.01s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Nmap scan report for 192.168.0.1 +Host is up, received user-set (0.000013s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +6000/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6001/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6002/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 22.160 days (since Thu Mar 7 06:51:51 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=261 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 3.17 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131116 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:42 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating UDP Scan at 10:42 +Scanning 192.168.0.1 [65535 ports] +Completed UDP Scan at 10:42, 0.92s elapsed (65535 total ports) +Initiating Service scan at 10:42 +Initiating OS detection (try #1) against 192.168.0.1 +Retrying OS detection (try #2) against 192.168.0.1 +NSE: Script scanning 192.168.0.1. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Nmap scan report for 192.168.0.1 +Host is up, received user-set (0.000012s latency). +All 65535 scanned ports on 192.168.0.1 are closed because of 65535 port-unreaches +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 3.07 seconds + Raw packets sent: 65547 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:42 CST +Initiating IPProto Scan at 10:42 +Scanning 192.168.0.1 [256 ports] +Discovered open port 6/ip on 192.168.0.1 +Discovered open port 1/ip on 192.168.0.1 +Discovered open port 17/ip on 192.168.0.1 +Completed IPProto Scan at 10:42, 1.25s elapsed (256 total ports) +Nmap scan report for 192.168.0.1 +Host is up, received localhost-response (0.00027s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.29 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:42 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating NSE at 10:42 +Completed NSE at 10:42, 0.00s elapsed +Initiating SYN Stealth Scan at 10:42 +Scanning 175.6.26.33 [65535 ports] +Discovered open port 22/tcp on 175.6.26.33 +Discovered open port 6001/tcp on 175.6.26.33 +Discovered open port 9090/tcp on 175.6.26.33 +Discovered open port 6002/tcp on 175.6.26.33 +Discovered open port 6000/tcp on 175.6.26.33 +Discovered open port 8086/tcp on 175.6.26.33 +Completed SYN Stealth Scan at 10:42, 0.94s elapsed (65535 total ports) +Initiating Service scan at 10:42 +Scanning 6 services on 175.6.26.33 +Completed Service scan at 10:43, 107.72s elapsed (6 services on 1 host) +Initiating OS detection (try #1) against 175.6.26.33 +NSE: Script scanning 175.6.26.33. +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.12s elapsed +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.11s elapsed +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.00s elapsed +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000012s latency). +Not shown: 65529 closed ports +Reason: 65529 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +6000/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6001/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6002/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +8086/tcp open http syn-ack ttl 64 nginx +|_http-title: Error +9090/tcp open ssl/zeus-admin? syn-ack ttl 64 +| ssl-cert: Subject: commonName=Profiler Server Certificate/organizationName=Huawei Technologies Ltd./stateOrProvinceName=Shanghai/countryName=CN +| Subject Alternative Name: IP Address:175.6.26.33 +| Issuer: organizationName=Huawei Technologies Ltd./stateOrProvinceName=Shanghai/countryName=CN +| Public Key type: rsa +| Public Key bits: 3072 +| Signature Algorithm: sha384WithRSAEncryption +| Not valid before: 2024-03-23T17:35:25 +| Not valid after: 2034-03-24T17:35:25 +| MD5: a63c ab1d 43c7 ec0b 3e7f 316f ffd8 5669 +|_SHA-1: 2e4a 8546 55ce 0c7f dda4 8dbb 9e17 423e d039 826a +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 40.658 days (since Sat Feb 17 18:55:58 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=258 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.00s elapsed +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.00s elapsed +Initiating NSE at 10:43 +Completed NSE at 10:43, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 111.00 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131118 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:43 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating UDP Scan at 10:44 +Scanning 175.6.26.33 [65535 ports] +Completed UDP Scan at 10:44, 0.95s elapsed (65535 total ports) +Initiating Service scan at 10:44 +Initiating OS detection (try #1) against 175.6.26.33 +Retrying OS detection (try #2) against 175.6.26.33 +NSE: Script scanning 175.6.26.33. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000015s latency). +All 65535 scanned ports on 175.6.26.33 are closed because of 65535 port-unreaches +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 3.07 seconds + Raw packets sent: 65547 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +Initiating IPProto Scan at 10:44 +Scanning 175.6.26.33 [256 ports] +Discovered open port 17/ip on 175.6.26.33 +Discovered open port 1/ip on 175.6.26.33 +Discovered open port 6/ip on 175.6.26.33 +Completed IPProto Scan at 10:44, 1.24s elapsed (256 total ports) +Nmap scan report for 175.6.26.33 +Host is up, received localhost-response (0.0000080s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating SYN Stealth Scan at 10:44 +Scanning 195.6.26.33 [65535 ports] +Discovered open port 22/tcp on 195.6.26.33 +Discovered open port 6001/tcp on 195.6.26.33 +Discovered open port 6002/tcp on 195.6.26.33 +Discovered open port 6000/tcp on 195.6.26.33 +Completed SYN Stealth Scan at 10:44, 0.98s elapsed (65535 total ports) +Initiating Service scan at 10:44 +Scanning 4 services on 195.6.26.33 +Completed Service scan at 10:44, 0.01s elapsed (4 services on 1 host) +Initiating OS detection (try #1) against 195.6.26.33 +NSE: Script scanning 195.6.26.33. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.10s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.01s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Nmap scan report for 195.6.26.33 +Host is up, received user-set (0.000014s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +6000/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6001/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6002/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 21.659 days (since Thu Mar 7 18:55:14 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=261 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 3.21 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131116 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating UDP Scan at 10:44 +Scanning 195.6.26.33 [65535 ports] +Completed UDP Scan at 10:44, 0.96s elapsed (65535 total ports) +Initiating Service scan at 10:44 +Initiating OS detection (try #1) against 195.6.26.33 +Retrying OS detection (try #2) against 195.6.26.33 +NSE: Script scanning 195.6.26.33. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Nmap scan report for 195.6.26.33 +Host is up, received user-set (0.000015s latency). +All 65535 scanned ports on 195.6.26.33 are closed because of 65535 port-unreaches +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 3.11 seconds + Raw packets sent: 65547 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +Initiating IPProto Scan at 10:44 +Scanning 195.6.26.33 [256 ports] +Discovered open port 1/ip on 195.6.26.33 +Discovered open port 6/ip on 195.6.26.33 +Discovered open port 17/ip on 195.6.26.33 +Completed IPProto Scan at 10:44, 1.25s elapsed (256 total ports) +Nmap scan report for 195.6.26.33 +Host is up, received localhost-response (0.0000080s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.29 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating SYN Stealth Scan at 10:44 +Scanning 192.168.122.1 [65535 ports] +Discovered open port 22/tcp on 192.168.122.1 +Discovered open port 53/tcp on 192.168.122.1 +Discovered open port 6001/tcp on 192.168.122.1 +Discovered open port 6002/tcp on 192.168.122.1 +Discovered open port 6000/tcp on 192.168.122.1 +Completed SYN Stealth Scan at 10:44, 1.00s elapsed (65535 total ports) +Initiating Service scan at 10:44 +Scanning 5 services on 192.168.122.1 +Completed Service scan at 10:44, 6.01s elapsed (5 services on 1 host) +Initiating OS detection (try #1) against 192.168.122.1 +NSE: Script scanning 192.168.122.1. +Initiating NSE at 10:44 +Completed NSE at 10:44, 8.04s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.01s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000019s latency). +Not shown: 65530 closed ports +Reason: 65530 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +53/tcp open domain syn-ack ttl 64 dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +6000/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6001/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +6002/tcp open vnc syn-ack ttl 64 VNC (protocol 3.8) +| vnc-info: +| Protocol version: 3.8 +| Security types: +|_ VNC Authentication (2) +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 3.443 days (since Tue Mar 26 00:06:53 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=258 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 17.18 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131117 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:44 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating NSE at 10:44 +Completed NSE at 10:44, 0.00s elapsed +Initiating UDP Scan at 10:44 +Scanning 192.168.122.1 [65535 ports] +Completed UDP Scan at 10:44, 2.36s elapsed (65535 total ports) +Initiating Service scan at 10:44 +Scanning 2 services on 192.168.122.1 +Discovered open port 53/udp on 192.168.122.1 +Discovered open|filtered port 53/udp on 192.168.122.1 is actually open +Completed Service scan at 10:46, 97.60s elapsed (2 services on 1 host) +Initiating OS detection (try #1) against 192.168.122.1 +Retrying OS detection (try #2) against 192.168.122.1 +NSE: Script scanning 192.168.122.1. +Initiating NSE at 10:46 +Completed NSE at 10:46, 14.01s elapsed +Initiating NSE at 10:46 +Completed NSE at 10:46, 1.01s elapsed +Initiating NSE at 10:46 +Completed NSE at 10:46, 0.00s elapsed +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000013s latency). +Not shown: 65533 closed ports +Reason: 65533 port-unreaches +PORT STATE SERVICE REASON VERSION +53/udp open domain udp-response dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +|_dns-recursion: Recursion appears to be enabled +67/udp open|filtered dhcps no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 10:46 +Completed NSE at 10:46, 0.00s elapsed +Initiating NSE at 10:46 +Completed NSE at 10:46, 0.00s elapsed +Initiating NSE at 10:46 +Completed NSE at 10:46, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 117.11 seconds + Raw packets sent: 65549 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-29 10:46 CST +Initiating IPProto Scan at 10:46 +Scanning 192.168.122.1 [256 ports] +Discovered open port 1/ip on 192.168.122.1 +Discovered open port 17/ip on 192.168.122.1 +Discovered open port 6/ip on 192.168.122.1 +Completed IPProto Scan at 10:46, 1.24s elapsed (256 total ports) +Nmap scan report for 192.168.122.1 +Host is up, received localhost-response (0.0000080s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.29 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240331 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240527 b/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240527 new file mode 100644 index 0000000000000000000000000000000000000000..e0337a14102c4711d17c5a2b1a99d2a85f78b95b --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/log/nmap.log_20240527 @@ -0,0 +1,425 @@ +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:48 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating SYN Stealth Scan at 21:48 +Scanning 175.6.26.33 [65535 ports] +Discovered open port 22/tcp on 175.6.26.33 +Discovered open port 80/tcp on 175.6.26.33 +Discovered open port 9094/tcp on 175.6.26.33 +Discovered open port 8060/tcp on 175.6.26.33 +Completed SYN Stealth Scan at 21:48, 1.09s elapsed (65535 total ports) +Initiating Service scan at 21:48 +Scanning 4 services on 175.6.26.33 +Completed Service scan at 21:48, 11.01s elapsed (4 services on 1 host) +Initiating OS detection (try #1) against 175.6.26.33 +NSE: Script scanning 175.6.26.33. +Initiating NSE at 21:48 +Completed NSE at 21:48, 1.65s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.07s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000015s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +80/tcp open http syn-ack ttl 64 nginx +|_http-favicon: Unknown favicon MD5: FB20D21EB47D8BD317CAD0674A0DE53E +| http-methods: +|_ Supported Methods: GET HEAD POST OPTIONS +| http-robots.txt: 58 disallowed entries (15 shown) +| / /autocomplete/users /autocomplete/projects /search +| /admin /profile /dashboard /users /api/v* /help /s/ /-/profile +|_/-/user_settings/profile /-/ide/ /-/experiment +| http-title: \xE7\x99\xBB\xE5\xBD\x95 \xC2\xB7 GitLab +|_Requested resource was http://175.6.26.33/users/sign_in +|_http-trane-info: Problem with XML parsing of /evox/about +8060/tcp open http syn-ack ttl 64 nginx 1.24.0 +| http-methods: +|_ Supported Methods: GET HEAD POST +|_http-server-header: nginx/1.24.0 +|_http-title: 404 Not Found +9094/tcp open unknown syn-ack ttl 64 +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 19.470 days (since Wed May 8 10:31:24 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=259 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 15.99 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131116 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:48 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating NSE at 21:48 +Completed NSE at 21:48, 0.00s elapsed +Initiating UDP Scan at 21:48 +Scanning 175.6.26.33 [65535 ports] +Completed UDP Scan at 21:48, 2.28s elapsed (65535 total ports) +Initiating Service scan at 21:48 +Scanning 1 service on 175.6.26.33 +Completed Service scan at 21:50, 97.60s elapsed (1 service on 1 host) +Initiating OS detection (try #1) against 175.6.26.33 +Retrying OS detection (try #2) against 175.6.26.33 +NSE: Script scanning 175.6.26.33. +Initiating NSE at 21:50 +Completed NSE at 21:50, 14.01s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 1.01s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Nmap scan report for 175.6.26.33 +Host is up, received user-set (0.000021s latency). +Not shown: 65534 closed ports +Reason: 65534 port-unreaches +PORT STATE SERVICE REASON VERSION +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 117.03 seconds + Raw packets sent: 65548 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:50 CST +Initiating IPProto Scan at 21:50 +Scanning 175.6.26.33 [256 ports] +Discovered open port 17/ip on 175.6.26.33 +Discovered open port 6/ip on 175.6.26.33 +Discovered open port 1/ip on 175.6.26.33 +Completed IPProto Scan at 21:50, 1.26s elapsed (256 total ports) +Nmap scan report for 175.6.26.33 +Host is up, received localhost-response (0.000014s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.29 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:50 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating SYN Stealth Scan at 21:50 +Scanning 195.6.26.33 [65535 ports] +Discovered open port 22/tcp on 195.6.26.33 +Discovered open port 80/tcp on 195.6.26.33 +Discovered open port 8060/tcp on 195.6.26.33 +Discovered open port 9094/tcp on 195.6.26.33 +Completed SYN Stealth Scan at 21:50, 1.09s elapsed (65535 total ports) +Initiating Service scan at 21:50 +Scanning 4 services on 195.6.26.33 +Completed Service scan at 21:50, 11.01s elapsed (4 services on 1 host) +Initiating OS detection (try #1) against 195.6.26.33 +NSE: Script scanning 195.6.26.33. +Initiating NSE at 21:50 +Completed NSE at 21:50, 1.84s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.11s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Nmap scan report for 195.6.26.33 +Host is up, received user-set (0.000017s latency). +Not shown: 65531 closed ports +Reason: 65531 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +80/tcp open http syn-ack ttl 64 nginx +|_http-favicon: Unknown favicon MD5: FB20D21EB47D8BD317CAD0674A0DE53E +| http-methods: +|_ Supported Methods: GET HEAD POST OPTIONS +| http-robots.txt: 58 disallowed entries (15 shown) +| / /autocomplete/users /autocomplete/projects /search +| /admin /profile /dashboard /users /api/v* /help /s/ /-/profile +|_/-/user_settings/profile /-/ide/ /-/experiment +| http-title: \xE7\x99\xBB\xE5\xBD\x95 \xC2\xB7 GitLab +|_Requested resource was http://195.6.26.33/users/sign_in +|_http-trane-info: Problem with XML parsing of /evox/about +8060/tcp open http syn-ack ttl 64 nginx 1.24.0 +| http-methods: +|_ Supported Methods: GET HEAD POST +|_http-server-header: nginx/1.24.0 +|_http-title: 404 Not Found +9094/tcp open unknown syn-ack ttl 64 +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 26.420 days (since Wed May 1 11:45:43 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=251 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 16.17 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131116 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:50 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating NSE at 21:50 +Completed NSE at 21:50, 0.00s elapsed +Initiating UDP Scan at 21:50 +Scanning 195.6.26.33 [65535 ports] +Completed UDP Scan at 21:50, 2.27s elapsed (65535 total ports) +Initiating Service scan at 21:50 +Scanning 1 service on 195.6.26.33 +Completed Service scan at 21:52, 97.60s elapsed (1 service on 1 host) +Initiating OS detection (try #1) against 195.6.26.33 +Retrying OS detection (try #2) against 195.6.26.33 +NSE: Script scanning 195.6.26.33. +Initiating NSE at 21:52 +Completed NSE at 21:52, 14.01s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 1.01s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Nmap scan report for 195.6.26.33 +Host is up, received user-set (0.000018s latency). +Not shown: 65534 closed ports +Reason: 65534 port-unreaches +PORT STATE SERVICE REASON VERSION +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 117.06 seconds + Raw packets sent: 65548 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:52 CST +Initiating IPProto Scan at 21:52 +Scanning 195.6.26.33 [256 ports] +Discovered open port 1/ip on 195.6.26.33 +Discovered open port 17/ip on 195.6.26.33 +Discovered open port 6/ip on 195.6.26.33 +Completed IPProto Scan at 21:52, 1.25s elapsed (256 total ports) +Nmap scan report for 195.6.26.33 +Host is up, received localhost-response (0.0000090s latency). +Not shown: 249 closed protocols +Reason: 249 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:52 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Initiating NSE at 21:52 +Completed NSE at 21:52, 0.00s elapsed +Initiating SYN Stealth Scan at 21:52 +Scanning 192.168.122.1 [65535 ports] +Discovered open port 53/tcp on 192.168.122.1 +Discovered open port 80/tcp on 192.168.122.1 +Discovered open port 22/tcp on 192.168.122.1 +Discovered open port 8060/tcp on 192.168.122.1 +Discovered open port 9094/tcp on 192.168.122.1 +Completed SYN Stealth Scan at 21:52, 1.13s elapsed (65535 total ports) +Initiating Service scan at 21:52 +Scanning 5 services on 192.168.122.1 +Completed Service scan at 21:52, 11.01s elapsed (5 services on 1 host) +Initiating OS detection (try #1) against 192.168.122.1 +NSE: Script scanning 192.168.122.1. +Initiating NSE at 21:52 +Completed NSE at 21:53, 8.35s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.10s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000014s latency). +Not shown: 65530 closed ports +Reason: 65530 resets +PORT STATE SERVICE REASON VERSION +22/tcp open ssh syn-ack ttl 64 OpenSSH 8.2 (protocol 2.0) +53/tcp open domain syn-ack ttl 64 dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +80/tcp open http syn-ack ttl 64 nginx +|_http-favicon: Unknown favicon MD5: FB20D21EB47D8BD317CAD0674A0DE53E +| http-methods: +|_ Supported Methods: GET HEAD POST OPTIONS +| http-robots.txt: 58 disallowed entries (15 shown) +| / /autocomplete/users /autocomplete/projects /search +| /admin /profile /dashboard /users /api/v* /help /s/ /-/profile +|_/-/user_settings/profile /-/ide/ /-/experiment +| http-title: \xE7\x99\xBB\xE5\xBD\x95 \xC2\xB7 GitLab +|_Requested resource was http://192.168.122.1/users/sign_in +|_http-trane-info: Problem with XML parsing of /evox/about +8060/tcp open http syn-ack ttl 64 nginx 1.24.0 +| http-methods: +|_ Supported Methods: GET HEAD POST +|_http-server-header: nginx/1.24.0 +|_http-title: 404 Not Found +9094/tcp open unknown syn-ack ttl 64 +Device type: general purpose +Running: Linux 2.6.X +OS CPE: cpe:/o:linux:linux_kernel:2.6.32 +OS details: Linux 2.6.32 +Uptime guess: 28.997 days (since Sun Apr 28 21:57:10 2024) +Network Distance: 0 hops +TCP Sequence Prediction: Difficulty=263 (Good luck!) +IP ID Sequence Generation: All zeros + +NSE: Script Post-scanning. +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 22.71 seconds + Raw packets sent: 65557 (2.885MB) | Rcvd: 131117 (5.508MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:53 CST +NSE: Loaded 151 scripts for scanning. +NSE: Script Pre-scanning. +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Initiating NSE at 21:53 +Completed NSE at 21:53, 0.00s elapsed +Initiating UDP Scan at 21:53 +Scanning 192.168.122.1 [65535 ports] +Completed UDP Scan at 21:53, 2.56s elapsed (65535 total ports) +Initiating Service scan at 21:53 +Scanning 3 services on 192.168.122.1 +Discovered open port 53/udp on 192.168.122.1 +Discovered open|filtered port 53/udp on 192.168.122.1 is actually open +Service scan Timing: About 66.67% done; ETC: 21:55 (0:00:49 remaining) +Completed Service scan at 21:54, 97.60s elapsed (3 services on 1 host) +Initiating OS detection (try #1) against 192.168.122.1 +Retrying OS detection (try #2) against 192.168.122.1 +NSE: Script scanning 192.168.122.1. +Initiating NSE at 21:54 +Completed NSE at 21:55, 28.02s elapsed +Initiating NSE at 21:55 +Completed NSE at 21:55, 1.01s elapsed +Initiating NSE at 21:55 +Completed NSE at 21:55, 0.00s elapsed +Nmap scan report for 192.168.122.1 +Host is up, received user-set (0.000020s latency). +Not shown: 65532 closed ports +Reason: 65532 port-unreaches +PORT STATE SERVICE REASON VERSION +53/udp open domain udp-response dnsmasq 2.82 +| dns-nsid: +|_ bind.version: dnsmasq-2.82 +|_dns-recursion: Recursion appears to be enabled +67/udp open|filtered dhcps no-response +9094/udp open|filtered unknown no-response +Too many fingerprints match this host to give specific OS details +Network Distance: 0 hops + +NSE: Script Post-scanning. +Initiating NSE at 21:55 +Completed NSE at 21:55, 0.00s elapsed +Initiating NSE at 21:55 +Completed NSE at 21:55, 0.00s elapsed +Initiating NSE at 21:55 +Completed NSE at 21:55, 0.00s elapsed +Read data files from: /usr/bin/../share/nmap +OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . +Nmap done: 1 IP address (1 host up) scanned in 131.35 seconds + Raw packets sent: 65550 (1.840MB) | Rcvd: 131092 (5.513MB) +Starting Nmap 7.80 ( https://nmap.org ) at 2024-05-27 21:55 CST +Initiating IPProto Scan at 21:55 +Scanning 192.168.122.1 [256 ports] +Discovered open port 17/ip on 192.168.122.1 +Discovered open port 1/ip on 192.168.122.1 +Discovered open port 6/ip on 192.168.122.1 +Discovered open port 171/ip on 192.168.122.1 +Completed IPProto Scan at 21:55, 1.25s elapsed (256 total ports) +Nmap scan report for 192.168.122.1 +Host is up, received localhost-response (0.000010s latency). +Not shown: 248 closed protocols +Reason: 248 proto-unreaches +PROTOCOL STATE SERVICE REASON +1 open icmp proto-unreach ttl 64 +2 open|filtered igmp no-response +6 open tcp proto-response ttl 64 +17 open udp port-unreach ttl 64 +103 open|filtered pim no-response +136 open|filtered udplite no-response +171 open unknown proto-response ttl 50 +255 open|filtered unknown no-response + +Read data files from: /usr/bin/../share/nmap +Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds + Raw packets sent: 260 (5.284KB) | Rcvd: 512 (17.392KB) diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/logs/cloudTest_2024-05-27.0.log b/component/CompatibilityTesting/compatibility_testing/Chinese/logs/cloudTest_2024-05-27.0.log new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_server_perf.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_server_perf.sh new file mode 100644 index 0000000000000000000000000000000000000000..024046a70c481e9ad5a48b04e72767106974ec04 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_server_perf.sh @@ -0,0 +1,108 @@ +#!/bin/bash +################################## +#CPU、内存、硬盘、网卡和功耗指标采集 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +get_performance() { + # 进行CPU、内存、硬盘、网卡和功耗指标采集 + # 参数1:采集时间间隔 + # 参数2:采集时长 + # 参数3:采集序列,0:表示兼容测前采集,1:表示性能测试采集,2表示兼容测试后采集 + # 参数4:步骤 + frequency=$1 + seq=$3 + during_time=$2 + step=$4 + times=$((during_time * 60 / frequency)) + power_path="data/test/power/" + if [[ ! -d "${power_path}" ]]; then + mkdir -p "${power_path}" + fi + if [[ "${seq}" -eq 1 ]]; then + file_path="data/test/performance/" + file_seq=1 + times=$((times / 4)) + elif [[ "${seq}" -eq 0 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + times=$((times / 4)) + elif [[ "${seq}" -eq 3 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + times=$((times / 4)) + else + file_path="data/test/compatiable/" + file_seq=1 + times=$((times / 4)) + fi + desc_array=('兼容性测试前采集' '性能测试采集' '兼容性测试后采集') + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + file_name="test_perf_cpu_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:调用sar -u ${frequency} ${times}命令采集CPU指标" + + if ! sar -u "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "调用sar -u ${frequency} ${times}命令采集CPU指标失败" + write_messages s 0 "${step}" "${desc_array[${seq}]}调用sar -u ${frequency} ${times}命令采集CPU指标失败" + fi + file_name="test_perf_mem_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:调用sar -r ${frequency} ${times}命令采集内存指标" + if ! sar -r "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "调用sar -r ${frequency} ${times}命令采集内存指标失败" + write_messages s 0 "${step}" "${desc_array[${seq}]}调用sar -r ${frequency} ${times}命令采集内存指标失败" + fi + file_name="test_perf_net_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:调用sar -n DEV ${frequency} ${times}命令采集网卡指标" + if ! sar -n DEV "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "调用sar -n DEV ${frequency} ${times}命令采集网卡指标失败" + write_messages s 0 "${step}" "${desc_array[${seq}]}调用sar -n DEV ${frequency} ${times}命令采集网卡指标失败" + fi + file_name="test_perf_disk_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:调用sar -d -p ${frequency} ${times}命令采集硬盘指标" + if ! sar -d -p "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "调用sar -d -p ${frequency} ${times}命令采集硬盘指标失败" + write_messages s 0 "${step}" "${desc_array[${seq}]}调用sar -d -p ${frequency} ${times}命令采集硬盘指标失败" + fi + write_messages i 0 "${step}" "${desc_array[${seq}]}已完成" +} + +get_performance $1 $2 $3 $4 diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_service_info.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_service_info.sh new file mode 100644 index 0000000000000000000000000000000000000000..e964ad63cc95a4e634960c23bac05e44b1577b3e --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/obtain_service_info.sh @@ -0,0 +1,108 @@ +#!/bin/bash +################################## +#功能描述: 获取测试环境的硬件配置(服务器型号、硬盘版本、pci信息、CPU信息、内核版本) +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-03-01 修改 +################################## +# 创建日志目录 + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +get_service_info() { + #获取服务器信息 + path="data/hardware/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + path="data/software/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + file_name_list=("data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" "data/hardware/hardware_cpu.log" + "data/hardware/hardware_disk.log" "data/software/system_version.log") + command_list=("dmidecode" "lspci -nnvv" "lscpu" "lsblk" "cat /proc/version") + command_desc=("服务器型号" "pci信息" "CPU信息" "硬盘分区" "内核信息") + length=${#file_name_list[@]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + comm=${command_list[$i]} + desc=${command_desc[$i]} + if ! eval "${comm}" >"${file_name}"; then + write_messages e 0 4 "调用命令${comm}获取${desc}失败" + else + write_messages i 0 4 "调用命令${comm}获取${desc}完成" + fi + done + + if hash smartctl 2>/dev/null ; then + smatrt_file="data/hardware/hardware_smartctl.log" + OLD_IFS="${IFS}" + IFS=$'\n' + for device in $(smartctl --scan|awk -F"#" '{print $1}'); + do + smartctl_cmd="smartctl -a ${device}" + eval "${smartctl_cmd}" >> "${smatrt_file}" 2>> /dev/null; + done + IFS="${OLD_IFS}" + fi + + + gcc_file="data/software/system_version.log" + if hash gcc 2>/dev/null ; then + gcc_file="data/software/system_version.log" + echo -e "\n=============gcc=============" >>${gcc_file} 2>> /dev/null; + gcc --version >> ${gcc_file} 2>> /dev/null; + fi + + if hash clang 2>/dev/null ; then + echo -e "\n=============clang=============" >>${gcc_file} 2>> /dev/null; + clang --version >> ${gcc_file} 2>> /dev/null; + fi + + if hash java 2>/dev/null ; then + echo -e "\n=============java=============" >>${gcc_file} 2>> /dev/null; + java -version >> ${gcc_file} 2>> /dev/null 2>&1; + fi +} + + +get_service_info + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/security_clam_scan.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/security_clam_scan.sh new file mode 100644 index 0000000000000000000000000000000000000000..060c5d751469f47368e5cdafafd088f71c745dc1 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/security_clam_scan.sh @@ -0,0 +1,87 @@ +#!/bin/bash +################################## +#功能描述: 使用ClamAV进行防病毒扫描测试 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +source ~/.bashrc +shopt -s expand_aliases +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +clam_log_file=clam.log_${current_time} + + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +clam_scan(){ + scan_path=$1 + file_path="data/test/safety/" + if [ ! -d "${file_path}" ]; then + mkdir -p "${file_path}" + fi + # 更新病毒库 + freshclam + # 扫描目录 + if [ -f ${file_path}${clam_log_file} ];then + cat /dev/null > ${file_path}${clam_log_file} + fi + OLD_IFS="${IFS}" + IFS=',' + + for spath in "${scan_path[@]}"; do + if ! clamscan -r ${spath} --log=${file_path}${clam_log_file} 2>&1; then + write_messages c 34 6 "防病毒扫描测试扫描出错" + fi + done + IFS="${OLD_IFS}" +} + +clamav_install(){ + # 病毒扫描软件安装 + if hash yum 2>/dev/null && ! hash clamscan 2>/dev/null; then + if ! yum install -y clamav clamav-update; then + write_messages e 0 1 "安装病毒扫描软件clamAV失败,请检查网络环境和yum源配置,并安装clamav的RPM包。" + exit 1 + fi + fi + if hash apt-get 2>/dev/null && ! hash clamscan 2>/dev/null; then + if ! apt-get install -y clamav; then + write_messages e 0 1 "安装病毒扫描软件clamAV失败,请检查网络环境和yum源配置,并安装clamav的RPM包。" + exit 1 + fi + fi +} + +clamav_install +clam_scan $1 \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/security_cvecheck.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/security_cvecheck.sh new file mode 100644 index 0000000000000000000000000000000000000000..3e810f57ad9e5b21eaab22b2c51781c80eb4fbfb --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/security_cvecheck.sh @@ -0,0 +1,68 @@ +#!/bin/bash +################################## +#功能描述: 使用CVEcheck进行漏洞扫描测试 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +source ~/.bashrc +shopt -s expand_aliases +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +cvecheck_log_file=cvecheck.log_${current_time} + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +cve_check(){ + scan_path=$1 + file_path="data/test/safety/" + CURRENT_PATH=$(pwd) + LIB_PATH=${CURRENT_PATH}/../lib/ + OLD_IFS="${IFS}" + IFS=',' + if [[ -e ${LIB_PATH}/cvecheck ]] ; then + write_messages i 0 6 "现在CVE_CHECK漏洞扫描测试" + chmod +x ${LIB_PATH}/cvecheck + ${LIB_PATH}/cvecheck -u + ${LIB_PATH}/cvecheck -s + for spath in "${scan_path[@]}"; do + ${LIB_PATH}/cvecheck -d ${spath} >>./log/"${cvecheck_log_file}" + cat ${CURRENT_PATH}/cve_tmp/result/cvecheck-result.json >> ${file_path}/cvecheck-result.json 2>> /dev/null; + done + write_messages i 0 6 "漏洞扫描结束" + fi + IFS="${OLD_IFS}" +} + + +cve_check $1 \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/Chinese/security_port_scan.sh b/component/CompatibilityTesting/compatibility_testing/Chinese/security_port_scan.sh new file mode 100644 index 0000000000000000000000000000000000000000..bd0e72ac5e87e1942cfd7e557c42dd1da2cfa99e --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/Chinese/security_port_scan.sh @@ -0,0 +1,78 @@ +#!/bin/bash +################################## +#功能描述: 使用NMAP进行端口扫描 +#版本信息: 华为技术有限公司,版权所有(C) 2020-2022 +#修改记录:2022-02-10 修改 +################################## + +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +nmap_log_file=nmap.log_${current_time} + +write_messages() { + # 日志输出函数 + # 参数1:输出日志级别 + # 参数2:输出颜色,0-默认,31-红色,32-绿色,33-黄色,34-蓝色,35-紫色,36-天蓝色,3-白色。 + # 参数3:执行步骤。 + # 参数4:输出的日志内容。 + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +port_scan() { + # 安全扫描,使用nmap进行端口扫描 + file_path="data/test/safety/" + if [ ! -d "${file_path}" ]; then + mkdir -p "${file_path}" + fi + write_messages i 0 6 "现在进行端口安全测试" + ip_addrs=$(ifconfig -a | grep inet | grep -v '127.0.0.1\|172.17.0.1' | grep -v inet6 \ + | awk '{print $2}' | sed -e 's/addr://g') + if [ -z "${ip_addrs}" ]; then + write_messages e 0 6 "获取主机IP地址出错" + fi + + for ip in ${ip_addrs}; do + write_messages c 34 6 "安全测试采集:执行${ip}的 TCP 端口扫描" + if ! nmap -sS -A -v --reason -p- -n -Pn -oA ${file_path}"${ip}""tcp" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "${ip}的TCP 端口扫描出错" + fi + write_messages c 34 6 "安全测试采集:执行${ip}的 UCP 端口扫描" + if ! nmap -sU -A -v --reason -p- -n -Pn -oA ${file_path}"${ip}""udp" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "${ip}的UDP 端口扫描出错" + fi + write_messages c 34 6 "安全测试采集:执行${ip}的 protocol扫描" + if ! nmap -sO -v --reason -n -oA ${file_path}"${ip}""protocol" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "${ip}的Protocol 端口扫描出错" + fi + done + write_messages i 0 6 "端口安全测试结束" +} + +port_scan diff --git a/component/CompatibilityTesting/compatibility_testing/English/README b/component/CompatibilityTesting/compatibility_testing/English/README new file mode 100644 index 0000000000000000000000000000000000000000..655d0e79ed513f91a205c92470d13da9eb290080 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/README @@ -0,0 +1,131 @@ +======================================================================= +#Function description: A tool used for performing compatibility and performance tests and collecting performance indicators and run logs. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +======================================================================= + +#########################Environment Dependency###################################### +1. System version: CentOS 7.6, NeoKylin V7Update6, Ubuntu 18.0.1, or Kylin 4.0.2, +UOS 20 SP1, SUSE 12-SP5, and openEuler 20.03 (LTS) + +2. Install the RPM package. +nmap-ncat,nmap,ipmitool,dmidecode,net-tools,pciutils,util-linux,sysstat +bc. + +3. If a cluster contains multiple nodes, configure SSH password-free login for each node and mutual trust between nodes. + + + +#########################Procedure###################################### +1. Modify the compatibility_testing.conf configuration file by setting the following information: + + +# Enter the name of the application software. Use commas (,) to separate multiple application names. +# Run the ps or docker top command to query the background process name in the CMD column. +application_names= +# Enter the command for starting the application software. Use commas (,) to separate the startup commands of multiple applications. +start_app_commands= +# Enter the command for stopping the application software. Use commas (,) to separate the stop commands of multiple applications. +stop_app_commands= +# (Optional) Enter the command for starting the pressure test tool of the tested application software. +start_performance_scripts= +# For Kubernetes cluster, enter Y. For other environments, leave it blank. +kubernetes_env= + +# For multi-node cluster deployment, fill in the information as required, which is not required for single-node deployment. +# List of IP addresses in the cluster. Use commas (,) to separate IP addresses from each other. Do not add the IP address of +# the server where the current script is located. +cluster_ip_lists= + +# Set this parameter for the Validated certification tests. You do not need to set this parameter for Compatible certification tests. +# CVE vulnerability scan directory. Use commas (,) to separate multiple directories. A CVE vulnerability check tool is already available +# for Validated certification tests. You do not need to set this parameter for Validated certification tests. +# In a cluster, set the directory of the server where the script is not located to 'IP:directory', for example, '192.168.2.2:/root/tomcat'. +cve_scan_path= +# CLamAV antivirus scan directory. Use commas (,) to separate multiple directories. Commercial antivirus software is already available for +# Validated certification tests. You do not need to set this parameter for Validated certification tests. +# In a cluster, set the directory of the server where the script is not located to 'IP:directory', for example, '192.168.2.2:/root/tomcat'. +clamav_scan_path= + +2. After confirming the settings, run the collection tool as the root user. + +Usage +On the CentOS, NeoKylin, SUSE, or openEuler operating system, run the sh compatibility_testing.sh +On the Ubuntu, Kylin, or UOS operating system, run the bash compatibility_testing.sh +If a cluster contains multiple nodes, execute the script on the control node(primary node). + + + +The automatic test tool starts to execute the script. The script consists of 10 steps and takes about 50 minutes. + The procedure is as follows: +*********************************************************************** +Step 1: Start checking the software dependency. +Step 1: Finish checking the software dependency. +Step 2: Start checking the configuration file. +Step 2: Finish checking the configuration file. +Step 3: Start checking the test environment. +Step 3: Finish checking the test environment. +Step 4: Collect data related to system resources, such as CPUs, memory, drives, NICs, and power consumption, before starting the application. +Step 4: Finish the collection before the application is started. +Step 5: Start the service application. +Step 5: Finish starting the service application. +Step 6: Perform a security test by scanning the listening port when the application is running. +Step 6: Finish scanning the listening port. +Step 7: Collect data related to system resources such as CPUs, memory, drives, and NICs under service pressure. +Step 7: Finish collecting the data. +Step 8: Perform a reliability test. Start the application after it is forcibly terminated. +Step 8: Finish the reliability test. +Step 9: Collect data related to system resources, such as CPUs, memory, drives, NICs, and power consumption, after the application is stopped. +Step 9: Finish collecting the data after the application is stopped. +Step 10: Package the collected test data. +After the collection is complete, the log package log_yyyymmddHHMMSS.tar.gz is stored in the directory +/data/monitor. + +*********************************************************************** + + +#########################Directory Structure of the Log Package######################## +├── compatibility_testing.conf +├── hardware +│   ├── hardware_cpu.log +│   ├── hardware_disk.log +│   ├── hardware_info.log +│   └── hardware_pcie.log +├── others +│   └── info.log_yyyymmdd +├── product +│   └── product_name.log +├── software +│   └── system_version.log +├── system +│   └── message.log +└── test + ├── compatible + │   ├── test_perf_cpu_0.log + │   ├── test_perf_cpu_1.log + │   ├── test_perf_disk_0.log + │   ├── test_perf_disk_1.log + │   ├── test_perf_mem_0.log + │   ├── test_perf_mem_1.log + │   ├── test_perf_net_0.log + │   └── test_perf_net_1.log + ├── dfx + ├── function + ├── performance + │   ├── test_perf_cpu_1.log + │   ├── test_perf_disk_1.log + │   ├── test_perf_mem_1.log + │   └── test_perf_net_1.log + ├── power + │   ├── test_power_0.log + │   └── test_power_1.log + └── safety + ├── {ip}protocol.gnmap + ├── {ip}protocol.nmap + ├── {ip}protocol.xml + ├── {ip}tcp.gnmap + ├── {ip}tcp.nmap + ├── {ip}tcp.xml + ├── {ip}udp.gnmap + ├── {ip}udp.nmap + └── {ip}1udp.xml diff --git a/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.conf b/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.conf new file mode 100644 index 0000000000000000000000000000000000000000..bd2c7bd9133aed563210eef517cd1a580801b026 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.conf @@ -0,0 +1,43 @@ +################################################################################## +#Function description: An indicator collection tool used for compatibility and performance tests. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-08-17 +#Usage: Before performing automatic collection, configure compatibility_testing.conf. +# Enter the name of the application to be tested in application_names. +# Set the command for starting the application to be tested in start_app_commands. +# Set the command for stopping the application to be tested in stop_app_commands. +# Set the command for starting the pressure test tool of the tested application software in start_performance_scripts. +# Confirm the settings. +# On the CentOS, NeoKylin, SUSE, or openEuler operating system, run the sh compatibility_testing.sh +# On the Ubuntu, Kylin, or UOS operating system, run the bash compatibility_testing.sh +# If a cluster contains multiple nodes, configure SSH password-free login for each node and mutual trust between nodes. +# Execute the script on the control node(primary node). +################################################################################### + + +# Name of the application software to be tested. Use commas (,) to separate multiple application names. +# Run the ps or docker top command to query the background process name in the CMD column. +application_names= +# Command for starting the application software to be tested. Use commas (,) to separate the startup commands of multiple applications. +start_app_commands= +# Command for stopping the application software to be tested. Use commas (,) to separate the stop commands of multiple applications. +stop_app_commands= +# Command for starting the pressure test tool of the tested application software. +start_performance_scripts= +# For Kubernetes cluster, enter Y. For other environments, leave it blank. +kubernetes_env= + +# For multi-node cluster deployment, fill in the information as required, which is not required for single-node deployment. +# List of IP addresses in the cluster. Use commas (,) to separate IP addresses from each other. Do not add the IP address of +# the server where the current script is located. +cluster_ip_lists= + +# Set this parameter for the Validated certification tests. You do not need to set this parameter for Compatible certification tests. +# CVE vulnerability scan directory. Use commas (,) to separate multiple directories. A CVE vulnerability check tool is already available +# for Validated certification tests. You do not need to set this parameter for Validated certification tests. +# In a cluster, set the directory of the server where the script is not located to 'IP:directory', for example, '192.168.2.2:/root/tomcat'. +cve_scan_path= +# CLamAV antivirus scan directory. Use commas (,) to separate multiple directories. Commercial antivirus software is already available for +# Validated certification tests. You do not need to set this parameter for Validated certification tests. +# In a cluster, set the directory of the server where the script is not located to 'IP:directory', for example, '192.168.2.2:/root/tomcat'. +clamav_scan_path= diff --git a/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.sh b/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.sh new file mode 100644 index 0000000000000000000000000000000000000000..f9cb916eb0fd27199bc960a689322cb57bdb5d26 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/compatibility_testing.sh @@ -0,0 +1,1238 @@ +#!/bin/bash +################################## +#Function description: An indicator collection tool used for compatibility and performance tests. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2023 +#Change history: Modified on 2023-04-08 +################################## +# Create a log directory. +clear +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +LIB_PATH=${CURRENT_PATH}/../lib/ +REMOTE_EXECUTIVE_PATH=/home/compatibility_testing/Chinese/ +REMOTE_LIB_PATH=/home/compatibility_testing/lib/ +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +nmap_log_file=nmap.log_${current_time} +# Clear all log files. +log_files=( "${CURRENT_PATH}"/log/"${error_file}" "${CURRENT_PATH}"/log/"${app_log_file}" "${CURRENT_PATH}"/log/"${nmap_log_file}") +for file in "${log_files[@]}"; do + if [[ -e "${file}" ]]; then + cat /dev/null >"${file}" + else + touch ${file} + fi +done + +# Check whether the command for starting the test tool is available. +TEST_TOOL_COMM=0 +# Check whether the command for starting the application is available. +START_APP_COMM=0 +# Check whether the command for stopping the application is available. +STOP_APP_COMM=0 +# Manually stop the application after the command fails to be executed. +HAND_STOP_APP=0 +# Manually start the application after the command fails to be executed. +HAND_START_APP=0 +# Manually start the test tool after the command fails to be executed. +HAND_START_TEST=0 +# Check whether Kunpeng DevKit has been installed +HAS_KUNPENG_DEVKIT=0 +SYS_LOG_="messages" +DEBUG=0 +# Check whether the application is deployed as a cluster. +HAS_CLUSTER_ENV=0 +KUBERNETES_ENV=0 +CLAMAV_SCAN=0 +CVE_SCAN=0 +CURRENT_SYS="" +O_S_VERSION="" +declare -a product_result_array +declare -a snapshot_result_array +declare -a performance_test_pid_array + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case ${level_info} in + i) echo "#${DATE}#info#${step}#${messages}" >> ./log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> ./log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> ./log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> ./log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;${colors}m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> ./log/"${log_file}" + ;; + esac +} + +notice_users() { + write_messages c 34 0 "Before starting automatic collection, you must configure compatibility_testing.conf. Please refer to the README for instructions." + write_messages c 34 0 "The automatic test tool starts to execute the script. The script consists of 10 steps and takes about 50 minutes." + write_messages i 0 0 "The automatic test tool starts to run." +} + +production_env_waring() { + write_messages c 31 0 "Do not run the compatibility test tool in the production environment because the application to be tested will be repeatedly started\ + and stopped during the test. Confirm whether the current environment is a production environment. If yes, enter Y. If no, enter N." + read -r INPUT_ + write_messages c 31 0 "You've entered ${INPUT_} " + if [[ "${INPUT_}" == "Y" || "${INPUT_}" == "y" ]]; then + exit + fi +} + + +check_configuration() { + # Check whether any mandatory configuration item is empty. + config_file="${CURRENT_PATH}""/compatibility_testing.conf" + + if [[ -f "${config_file}" ]]; then + application_names=$(sed '/^application_names=/!d;s/application_names=//' "${config_file}") + start_app_commands=$(sed '/^start_app_commands=/!d;s/start_app_commands=//' "${config_file}") + stop_app_commands=$(sed '/^stop_app_commands=/!d;s/stop_app_commands=//' "${config_file}") + start_performance_scripts=$(sed '/^start_performance_scripts=/!d;s/start_performance_scripts=//' "${config_file}") + cluster_ip_lists=$(sed '/^cluster_ip_lists=/!d;s/cluster_ip_lists=//' "${config_file}") + kubernetes_env=$(sed '/^kubernetes_env=/!d;s/kubernetes_env=//' "${config_file}") + cve_scan_path=$(sed '/^cve_scan_path=/!d;s/cve_scan_path=//' "${config_file}") + clamav_scan_path=$(sed '/^clamav_scan_path=/!d;s/clamav_scan_path=//' "${config_file}") + if [[ -z "${application_names}" ]]; then + write_messages e 31 2 "The application name in the configuration file is empty. Enter a correct name and restart the script." + exit + fi + if [[ -z "${start_app_commands}" ]]; then + write_messages e 31 2 "The command for starting the application is empty." + START_APP_COMM=1 + fi + if [[ -z "${stop_app_commands}" ]]; then + write_messages e 31 2 "The command for stopping the application is empty." + STOP_APP_COMM=1 + fi + if [[ -z "${start_performance_scripts}" ]]; then + write_messages e 31 2 "The command for starting the pressure test tool is empty." + TEST_TOOL_COMM=1 + fi + if [[ -n "${cluster_ip_lists}" ]]; then + HAS_CLUSTER_ENV=1 + fi + if [[ -n "${kubernetes_env}" && "${kubernetes_env}" == "Y" ]];then + KUBERNETES_ENV=1 + fi + if [[ -n "${cve_scan_path}" ]];then + CVE_SCAN=1 + fi + if [[ -n "${clamav_scan_path}" ]];then + CLAMAV_SCAN=1 + fi + else + write_messages e 31 2 "The configuration file does not exist." + exit + fi +} + +create_result_dir() { + # Create Directory + write_messages i 0 1 "Create Directory" + result_dirs=("data/hardware/" "data/software/" "data/system/" "data/product/" + "data/test/performance/" "data/test/compatiable/" "data/test/function/" + "data/test/power/" "data/test/safety" "data/test/dfx" "data/others") + for dir in "${result_dirs[@]}"; do + if [[ ! -d "${dir}" ]]; then + mkdir -p "${dir}" + else + find ./"${dir}" -type f -name "*.log*" -exec rm {} \; + fi + done + # Delete files from the remote server. + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@${ip_addr} "if [ -d ${REMOTE_EXECUTIVE_PATH} ];then cd ${REMOTE_EXECUTIVE_PATH}; rm -rf data log;fi" + done + fi + IFS="${OLD_IFS}" +} + +get_service_info() { + # Obtain Server Info + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + path="data/hardware/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + path="data/software/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + scp -r ${CURRENT_PATH}/obtain_service_info.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + scp -r ${CURRENT_PATH}/../lib/* ${ip_addr}:${REMOTE_LIB_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x obtain_service_info.sh; bash obtain_service_info.sh" + done + bash obtain_service_info.sh + else + bash obtain_service_info.sh + fi + file_name_list=("data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" "data/hardware/hardware_cpu.log" + "data/hardware/hardware_disk.log" "data/software/system_version.log") + smartctl_file_name="data/hardware/hardware_smartctl.log" + command_desc=("Server Model" "pci Info" "CPU Info" "Partition Drive" "Kernel Info") + length=${#file_name_list[@]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + if [[ -f ${file_name} ]]; then + product_result_array[$i]='True' + else + product_result_array[$i]='False' + fi + done + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + ip_length=${#ip_list[@]} + for ((j =0;j<"${ip_length}";j++));do + ip_addr=${ip_list[$j]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + index=$((length * (j + 1) + i)) + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_name} ${file_name}_${ip_addr} >/dev/null + if [[ $? -eq 0 ]];then + product_result_array[$index]='True' + else + product_result_array[$index]='False' + fi + done + + + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${smartctl_file_name} ${smartctl_file_name}_${ip_addr} >/dev/null + + done + fi + IFS="${OLD_IFS}" +} + +get_ps_snapshot() { + # Obtain Server Process Snapshot + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + file_path="data/product/" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + file_name='product_name.log' + index=0 + if ! ps aux >${file_path}${file_name}; then + snapshot_result_array[$index]='False' + write_messages e 0 5 "Failed to obtain the server process snapshot by invoking the ps -aux command." + else + snapshot_result_array[$index]='True' + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + index=$(( index + 1 )) + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; mkdir -p ${file_path}; ps aux >${file_path}${file_name}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + if [[ $? -eq 0 ]];then + snapshot_result_array[$index]='True' + else + snapshot_result_array[$index]='False' + fi + done + fi + IFS="${OLD_IFS}" +} + +check_system_message() { + # Check System Log + # Parameter 1: begnning time. + # Parameter 1: ending time. + start_time=$1 + end_time=$2 + file_path="data/system/" + file_name="message.log" + error_file_name="err_messages.log" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + system_message_result='True' + if [[ ${start_time}x == ""x || ${end_time}x == ""x ]]; then + grep -i -E 'fail|error' /var/log/"${SYS_LOG_}" > "${file_path}""${error_file_name}" + else + if ! sed -n /"${start_time}"/,/"${end_time}"/p /var/log/"${SYS_LOG_}" >"${file_path}""${file_name}"; then + system_message_result='False' + write_messages e 0 9 "Failed to obtain server logs." + write_messages s 0 9 "Failed to run sed -n '/${start_time}/,/${end_time}/p' /var/log/${SYS_LOG_} command." + else + grep -i -E 'fail|error' "${file_path}""${file_name}" > "${file_path}""${error_file_name}" + fi + fi +} + +tar_output() { + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + current_time=$(date "+%Y%m%d%H%M%S") + # Check whether the file exists. + result_files=("data/hardware/hardware_cpu.log" "data/hardware/hardware_disk.log" + "data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" + "data/product/product_name.log" "data/software/system_version.log" + "data/test/performance/test_perf_cpu_1.log" "data/test/performance/test_perf_disk_1.log" + "data/test/performance/test_perf_mem_1.log" "data/test/power/test_power_1.log" + "data/test/performance/test_perf_net_1.log" "data/test/compatiable/test_perf_cpu_0.log" + "data/test/compatiable/test_perf_cpu_1.log" "data/test/compatiable/test_perf_disk_0.log" + "data/test/compatiable/test_perf_disk_1.log" "data/test/compatiable/test_perf_mem_0.log" + "data/test/compatiable/test_perf_mem_1.log" "data/test/compatiable/test_perf_net_0.log" + "data/test/compatiable/test_perf_net_1.log" "data/test/power/test_power_0.log") + for data_file in "${result_files[@]}"; do + if [[ ! -f "${data_file}" ]]; then + write_messages e 0 10 "The log file ${data_file} does not exist in the directory." + fi + done + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + for data_file in "${result_files[@]}"; do + data_file=${data_file}_${ip_addr} + if [[ ! -f "${data_file}" ]]; then + write_messages e 0 10 "The log file ${data_file} does not exist in the directory." + fi + done + done + fi + + record_log_file=( "${error_file}" "${app_log_file}" "${log_file}") + for file in "${record_log_file[@]}"; do + if [[ -f ./log/"${file}" ]]; then + cp ./log/"${file}" ./data/others/ + else + write_messages e 0 10 "The ${file} file does not exist in the ./log/ directory." + fi + done + if [[ -f "${config_file}" ]]; then + cp "${config_file}" ./data/ + fi + if ! tar -czf log_"${current_time}".tar.gz data; then + write_messages e 0 10 "An error occurred when compressing the file." + fi + write_messages c 34 10 "After the collection is complete, the log package log_${current_time}.tar.gz is stored in $CURRENT_PATH." + IFS=${OLD_IFS} +} + +check_error() { + # Check whether any exception occurs during the collection. + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + for ((i = 0; i < ${#product_result_array[@]}; i++)); do + if [[ "${product_result_array[i]}" = 'False' ]]; then + index=$(($i/5)) + sub_index=$(($i%5)) + if [[ ${index} -eq 0 ]]; then + desc="this server" + else + desc=${ip_list[$(($index-1))]} + fi + case ${sub_index} in + 0) write_messages e 0 10 "Failed to obtain the server model by running the command from ${desc}." ;; + 1) write_messages e 0 10 "Failed to run the pcie command from ${desc}." ;; + 2) write_messages e 0 10 "Failed to run the lscpu command from ${desc}." ;; + 3) write_messages e 0 10 "Failed to run the lsblk command from ${desc}." ;; + 4) write_messages e 0 10 "Failed to obtain information about the operation system kernel version from ${desc}." ;; + esac + fi + done + if [[ "${system_message_result}" = 'False' ]]; then + write_messages e 0 10 "Failed to check system logs. Check whether you have permission to query /var/log/${SYS_LOG_}." + fi + for ((i = 0; i < ${#snapshot_result_array[@]}; i++)); do + if [[ "${snapshot_result_array[i]}" = 'False' ]];then + if [[ ${i} -eq 0 ]]; then + write_messages e 0 10 "Failed to query the process by running the ps command on this server." + else + index=$(( $i -1)) + write_messages e 0 10 "Failed to query the process by running the ps command on ${ip_list[index]}" + fi + + fi + done + + if [[ -f ./log/"${error_file}" ]]; then + while read -r line; do + echo "${line}" | awk -F'#' '{if($5~/sar/) print $5}' + done <./log/"${error_file}" + fi + IFS="${OLD_IFS}" +} + +# In the cluster environment, check whether the IP addresses can communicate with each other and obtain the operating system version. +check_connection_and_OS() { + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH};mkdir -p ${REMOTE_LIB_PATH};" + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "${ip_addr} has not established a password-free mutual trust with the current server. Configure the mutual trust and re-execute the script." + exit + fi + scp -r ${CURRENT_PATH}/env_OSVersion.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + os_version_=$(ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_OSVersion.sh; bash env_OSVersion.sh") + if [[ ${O_S_VERSION}x == ""x ]];then + O_S_VERSION=${os_version_} + else + O_S_VERSION="${O_S_VERSION}"";""${os_version_}" + fi + done + + fi + os_version_=$(chmod +x *.sh; bash env_OSVersion.sh) + if [[ ${O_S_VERSION}x == ""x ]];then + O_S_VERSION=${os_version_} + else + O_S_VERSION="${O_S_VERSION}"";""${os_version_}" + fi + write_messages i 0 1 "The current OS version is ${O_S_VERSION}." + IFS="${OLD_IFS}" +} + +# Ensure that the service application software, test tools, and dependent software are installed. +env_preparation() { + check_connection_and_OS + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}" + scp -r ${CURRENT_PATH}/env_preparation.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} > /dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_preparation.sh; bash env_preparation.sh " + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "Failed to install the dependencies at ${ip_addr}. You can log in to the server and check for the cause on ${REMOTE_EXECUTIVE_PATH}/log/info.log" + exit + fi + done + bash env_preparation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "Failed to install the dependency. Check for the cause on ${REMOTE_EXECUTIVE_PATH}/log/info.log" + exit + fi + + else + bash env_preparation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "Failed to install the dependency. Check for the cause on ${REMOTE_EXECUTIVE_PATH}/log/info.log" + exit + fi + + fi + IFS="${OLD_IFS}" +} + +HCS8_PREFIX="172.36.0.10:58089/rest/v2/virtualMachine/verifyIsHCS?mac=" +HCS803_PREFIX="173.64.11.52:58088/rest/v2/virtualMachine/verifyIsHCS?mac=" +check_physical_system(){ + # Check whether the current system runs on a physical server. + OLD_IFS="${IFS}" + IFS=',' + CURRENT_SYS="" + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + CURRENT_SYS_=$(ssh root@"${ip_addr}" "dmidecode -s system-product-name") + if [[ ${CURRENT_SYS}x == ""x ]];then + CURRENT_SYS="${CURRENT_SYS_}" + else + CURRENT_SYS="${CURRENT_SYS}"";""${CURRENT_SYS_}" + fi + done + fi + IFS="${OLD_IFS}" + CURRENT_SYS_=$(dmidecode -s system-product-name) + if [[ ${CURRENT_SYS}x == ""x ]];then + CURRENT_SYS="${CURRENT_SYS_}" + else + CURRENT_SYS="${CURRENT_SYS}"";""${CURRENT_SYS_}" + fi + if echo "${CURRENT_SYS_}" |grep -i "virtual" ; then + CURRENT_MAC=$(dmidecode -s system-uuid) + SYSTEM_UUID=$(dmidecode -s system-uuid) + HCS_CHECK_FLAG=$(curl --connect-timeout 5 ${HCS8_PREFIX}${CURRENT_MAC}\&serverId=${SYSTEM_UUID} 2> /dev/null) + + if [[ ${HCS_CHECK_FLAG} == "" ]]; then + HCS_CHECK_FLAG=$(curl --connect-timeout 5 ${HCS803_PREFIX}${CURRENT_MAC}\&serverId=${SYSTEM_UUID} 2> /dev/null) + fi + + if [[ ${HCS_CHECK_FLAG} == "" ]]; then + write_messages i 0 1 "KVM type: Non-flagship store HCS VMs" + else + write_messages i 0 1 "KVM type: ${HCS_CHECK_FLAG}" + fi + fi +} + +stop_or_start_kunpengdeveloper(){ + step=$1 + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}" + scp -r ${CURRENT_PATH}/env_kunpengdeveloper.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_kunpengdeveloper.sh; bash env_kunpengdeveloper.sh ${step}" + done + bash env_kunpengdeveloper.sh ${step} + + else + bash env_kunpengdeveloper.sh ${step} + + fi + IFS="${OLD_IFS}" +} + +sys_env_inspectation() { + # Check whether the usage of the CPU, memory, drive and NIC is too high. If the usage is too high, a message will be + # displayed indicating that the current environment is no idle. + write_messages i 0 3 "Environment self-check." + OLD_IFS="${IFS}" + IFS=',' + ENV_NOT_IDLE=0 + exam_time=0 + read -r -a ip_list <<< "$cluster_ip_lists" + while [[ "${exam_time}" -lt 5 ]]; do + ENV_NOT_IDLE=0 + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}" + scp -r ${CURRENT_PATH}/env_inspectation.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x env_inspectation.sh; bash env_inspectation.sh" + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "The environment of the server ${ip_addr} is not idle. Stop the running services and log in to the server to check details on ${REMOTE_EXECUTIVE_PATH}/log/info.log." + ENV_NOT_IDLE=1 + fi + done + bash env_inspectation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "The environment on this server is not idle. Stop the running services and log in to the server to check details on ${REMOTE_EXECUTIVE_PATH}/log/info.log." + ENV_NOT_IDLE=1 + fi + else + bash env_inspectation.sh + if [[ $? -ne 0 ]]; then + write_messages e 0 1 "The environment is not idle. Stop the running services and log in to the server to check details on ${REMOTE_EXECUTIVE_PATH}/log/info.log." + ENV_NOT_IDLE=1 + fi + fi + if [[ "${ENV_NOT_IDLE}" -eq 1 ]] ; then + write_messages c 34 3 "The current environment is not idle. Confirm that no service applications and dependency is running and enter Y to continue." + read -r SYS_IS_CLEAN + write_messages c 34 3 "You've entered ${SYS_IS_CLEAN} " + if [[ "${SYS_IS_CLEAN}" == "Y" || "${SYS_IS_CLEAN}" == "y" ]]; then + exam_time=$((exam_time + 1)) + else + exam_time=$((exam_time + 1)) + fi + else + write_messages i 0 3 "The environment self-check is complete." + break + fi + done + if [[ "${exam_time}" -eq 5 ]]; then + write_messages e 0 3 "The environment self-check did not pass. Please ensure that all services \ +and their dependencies have been stopped and then re-run the script. If you need to skip the \ +environment self-check, please enter Y. Be careful that skipping the environment self-check may \ +result in inaccurate test results. To exit the self-check program, please enter N." + read -r INPUT_ + write_messages e 0 3 "You've entered ${INPUT_} " + if [[ "${INPUT_}" == "Y" || "${INPUT_}" == "y" ]]; then + write_messages i 0 3 "Environment self-test skipped" + else + exit + fi + fi + IFS="${OLD_IFS}" +} + +port_scan() { + # Security scan: Run the NMAP command to scan listening ports. + OLD_IFS="${IFS}" + IFS=',' + scan_pid="" + scan_process="" + read -r -a ip_list <<< "$cluster_ip_lists" + file_path="data/test/safety/" + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + { + scp ${CURRENT_PATH}/security_port_scan.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_port_scan.sh; bash security_port_scan.sh" + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}${file_path}; for file in \$(find . -type f -name '*.nmap' -exec basename {} \; );do mv \${file} ${ip_addr}_\${file};done" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${ip_addr}*.nmap ${file_path} >/dev/null + } & + scan_pid=$! + if [[ -n ${scan_process} ]];then + scan_process="${scan_process},${scan_pid}" + else + scan_process=${scan_pid} + fi + done + for pid in ${scan_process};do + wait ${pid} + done + fi + bash security_port_scan.sh + write_messages i 0 6 "The port security test is complete." + IFS="${OLD_IFS}" +} + +validated_clamav_scan(){ + if [[ "${CLAMAV_SCAN}" -eq 1 ]]; then + write_messages i 0 6 "Perform antivirus scanning test now." + scan_path_parser 1 + write_messages i 0 6 "Antivirus scan completed." + fi +} + + +validated_cvecheck(){ + if [[ "${CVE_SCAN}" -eq 1 ]]; then + # Use CVE for vulnerability scan + write_messages i 0 6 "Perform vulnerability scanning test now." + scan_path_parser 2 + write_messages i 0 6 "Vulnerability scan completed." + fi +} + +scan_path_parser(){ + step=$1 + OLD_IFS="${IFS}" + IFS=',' + scan_pid="" + scan_process="" + scan_ip_desc=":" + current_server_path="" + file_path="data/test/safety/" + declare -A multiple_path_array + read -r -a ip_list <<< "$cluster_ip_lists" + if [[ "${step}" -eq 1 ]]; then + read -r -a scan_path_list <<< "$clamav_scan_path" + file_name=clam.log_${current_time} + else + read -r -a scan_path_list <<< "$cve_scan_path" + file_name=cvecheck-result.json + fi + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + for scan_path in "${scan_path_list[@]}"; do + if [[ ${scan_path} == *${scan_ip_desc}* ]]; then + ip=${scan_path%:*} + path=${scan_path#*:} + if [[ "${ip_list[@]}"=~"${ip}" ]]; then + if [[ -n ${multiple_path_array[$ip]} ]];then + multiple_path_array[$ip]="${multiple_path_array[$ip]},${path}" + else + multiple_path_array[$ip]=${path} + fi + fi + else + if [[ -n ${current_server_path} ]];then + current_server_path="${current_server_path},${scan_path}" + else + current_server_path=${scan_path} + fi + fi + done + + for ip_addr in "${ip_list[@]}"; do + if [[ -n ${multiple_path_array[$ip_addr]} ]]; then + if [[ "${step}" -eq 1 ]]; then + { + scp ${CURRENT_PATH}/security_clam_scan.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_clam_scan.sh; bash security_clam_scan.sh ${multiple_path_array[$ip_addr]}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + } & + else + { + scp ${CURRENT_PATH}/security_cvecheck.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x security_cvecheck.sh; bash security_cvecheck.sh ${multiple_path_array[$ip_addr]}" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + } & + fi + scan_pid=$! + if [[ -n ${scan_process} ]];then + scan_process="${scan_process},${scan_pid}" + else + scan_process=${scan_pid} + fi + fi + done + for pid in ${scan_process};do + wait ${pid} + done + IFS="${OLD_IFS}" + if [[ -n ${current_server_path} ]];then + if [[ "${step}" -eq 1 ]]; then + bash security_clam_scan.sh ${current_server_path} + else + bash security_cvecheck.sh ${current_server_path} + fi + fi + unset scan_pid + unset scan_process + unset scan_ip_desc + unset current_server_path + unset multiple_path_array +} + +check_process(){ + # Check whether the service application exists. + OLD_IFS="${IFS}" + IFS=',' + read -r -a ip_list <<< "$cluster_ip_lists" + process_name=$1 + process_name=$(echo ${process_name} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_results="" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + if [[ ${KUBERNETES_ENV} -eq 1 ]];then + ps_result="$(ssh root@${ip_addr} "kubectl get all --all-namespaces |grep -i ${process_name} 2>/dev/null")" + else + ps_result="$(ssh root@${ip_addr} "pgrep -lf ${process_name}")" + fi + if [[ "${ps_result}" != '' ]]; then + ps_results="${ps_results}"";""${ps_result}" + fi + done + fi + if [[ ${KUBERNETES_ENV} -eq 1 ]];then + ps_result=$(kubectl get all --all-namespaces |grep -i ${process_name} 2>/dev/null) + else + ps_result=$(pgrep -lf "${process}") + fi + if [[ "${ps_result}" != '' ]]; then + ps_results="${ps_results}"";""${ps_result}" + fi + echo "${ps_results}" + IFS="${OLD_IFS}" +} + +check_process_exits_stop() { + # Check whether the service application exists. If so, stop the process. + step=$1 + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a stop_comm_list <<< "$stop_app_commands" + length=${#app_list[@]} + sleep_time=10 + CURRENT_PATH=$(pwd) + STOP_APP_FLAG=0 + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 34 "${step}" "The ${process} process exists." + STOP_APP_FLAG=1 + else + if [[ ${step} -ne 4 ]]; then + write_messages i 34 "${step}" "The ${process} process does not exist." + fi + fi + done + if [[ "${step}" -eq 9 && "${STOP_APP_FLAG}" -eq 0 ]] ; then + for stop_comm in "${stop_comm_list[@]}"; do + eval "${stop_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 + if [[ "$?" -ne 0 ]]; then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${step}" "An error occurred when running the ${stop_comm} command." + else + cd "${CURRENT_PATH}"||exit + fi + done + fi + if [[ "${STOP_APP_COMM}" -eq 0 && "${STOP_APP_FLAG}" -eq 1 ]] ; then + for stop_comm in "${stop_comm_list[@]}"; do + eval "${stop_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 + if [[ "$?" -ne 0 ]]; then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${step}" "An error occurred when running the ${stop_comm} command." + else + cd "${CURRENT_PATH}"||exit + fi + done + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + check_times=5 + while [[ ${check_times} -gt 0 ]];do + sleep "${sleep_time}" + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages e 0 "${step}" "After running the ${stop_comm} command, wait for ${sleep_time} seconds. The ${process} process exists." + kill_process ${process} + check_times=$((check_times -1)) + else + if [[ ${step} -ne 4 ]]; then + write_messages i 34 "${step}" "The ${process} process does not exist." + fi + break + fi + done + ps_result="$(check_process ${process})" + if [[ ${check_times} -le 0 ]] ; then + write_messages e 0 "${start_step}" "Failed to stop the service application ${process}. Check the stop script." + HAND_STOP_APP=1 + fi + done + fi + if [[ "${STOP_APP_COMM}" -eq 1 ]] || [[ "${HAND_STOP_APP}" -eq 1 ]]; then + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + check_times=5 + while [[ "${ps_result}" != "" ]] && [[ ${check_times} -gt 0 ]]; do + write_messages c 31 "${step}" "The application is still being started. Stop the application and press any key to continue." + read -r process_is_on + ps_result="$(check_process ${process})" + check_times=$((check_times -1)) + done + if [[ ${check_times} -le 0 ]]; then + write_messages e 0 "${step}" "The application is still being started and fails to be stopped. Stop the application and then run the script." + exit + else + write_messages i 0 "${step}" "The ${process} process does not exist." + fi + done + fi + IFS="${OLD_IFS}" +} + +kill_process() { + # kill process + OLD_IFS="${IFS}" + IFS=',' + process_name=$1 + kill_results="" + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + kill_result="$(ssh root@${ip_addr} "pgrep -f "${process}" | xargs kill -9")" + if [[ "${ps_result}" != '' ]]; then + kill_results="${kill_result}"";""${kill_result}" + fi + done + fi + kill_result="$(pgrep -f "${process}" | xargs kill -9 >>./log/"${log_file}" 2>&1)" + if [[ "${kill_result}" != '' ]]; then + kill_results="${kill_result}"";""${kill_result}" + fi + IFS="${OLD_IFS}" +} + +counting_time(){ + ds=$1 + ( + tput sc + for ((dsec = "${ds}"; dsec > 0; dsec--)); do + min=$((dsec / 60)) + se=$((dsec % 60)) + tput rc + tput ed + echo -ne "\r Remaining time: ${min}:${se}\r" + sleep 1 + done + ) & +} + + + +get_performance() { + # Collect indicator data related to the CPU, memory, drive, NIC, and power consumption. + # Parameter 1: collection interval + # Parameter 2: collection duration + # Parameter 3: collection sequence. The value 0 indicates collection before the compatibility test, 1 indicates collection during the performance test, and 2 indicates collection after the compatibility test + # Parameter 4: step + OLD_IFS="${IFS}" + IFS=',' + frequency=$1 + seq=$3 + during_time=$2 + step=$4 + times=$((during_time * 60 / frequency)) + seconds=$((during_time * 60)) + if [[ "${seq}" -eq 1 ]]; then + file_path="data/test/performance/" + file_seq=1 + d_seconds=$((during_time * 60 *4)) + elif [[ "${seq}" -eq 0 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + d_seconds=$((during_time * 60 *5)) + else + file_path="data/test/compatiable/" + file_seq=1 + d_seconds=$((during_time * 60 *5)) + fi + power_path="data/test/power/" + if [[ ! -d "${power_path}" ]]; then + mkdir -p "${power_path}" + fi + desc_array=('Collect data before the compatibility test' 'Collect data during the performance test' 'Collect data after the compatibility test') + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + for ip_addr in "${ip_list[@]}"; do + { + ssh root@"${ip_addr}" "mkdir -p ${REMOTE_EXECUTIVE_PATH}; pgrep -f obtain_server_perf.sh | xargs kill -9 " + scp -r ${CURRENT_PATH}/obtain_server_perf.sh ${ip_addr}:${REMOTE_EXECUTIVE_PATH} >/dev/null + ssh root@"${ip_addr}" "cd ${REMOTE_EXECUTIVE_PATH}; chmod +x obtain_server_perf.sh; bash obtain_server_perf.sh ${frequency} ${during_time} ${seq} ${step}" + }& + done + fi + counting_time d_seconds + bash obtain_server_perf.sh ${frequency} ${during_time} ${seq} ${step} + file_list=("test_perf_cpu_${file_seq}.log" "test_perf_mem_${file_seq}.log" "test_perf_net_${file_seq}.log" "test_perf_disk_${file_seq}.log") + if [[ "${HAS_CLUSTER_ENV}" -eq 1 ]]; then + ip_length=${#ip_list[@]} + for ((j =0;j<"${ip_length}";j++));do + ip_addr=${ip_list[$j]} + for ((i = 0; i < 4; i++)); do + file_name=${file_list[$i]} + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${file_path}${file_name} ${file_path}${file_name}_${ip_addr} >/dev/null + done + if [[ "${seq}" -ne 1 ]]; then + file_name="test_power_${file_seq}.log" + scp ${ip_addr}:${REMOTE_EXECUTIVE_PATH}${power_path}${file_name} ${power_path}${file_name}_${ip_addr} >/dev/null + fi + done + fi + write_messages i 0 "${step}" "${desc_array[${seq}]} has been finished." + IFS="${OLD_IFS}" +} + +start_app(){ + # Start the application + start_step=$1 + if [[ ${start_step} -eq 5 ]];then + check_process_exits_stop "${start_step}" + fi + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a start_comm_list <<< "$start_app_commands" + length=${#app_list[@]} + START_APP_FLAG=0 + SLEEP_TIME=10 + if [[ ${START_APP_COMM} -eq 0 ]];then + for start_comm in "${start_comm_list[@]}"; do + if ! eval "${start_comm}" >> "${CURRENT_PATH}"/log/"${app_log_file}" 2>&1 ;then + cd "${CURRENT_PATH}"||exit + write_messages e 0 "${start_step}" "An error occurred when running the ${start_comm} command. Manually run the command to start the application." + START_APP_FLAG=1 + fi + cd "${CURRENT_PATH}"||exit + done + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + check_times=5 + while [[ ${check_times} -gt 0 ]];do + sleep "${SLEEP_TIME}" + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 "${start_step}" "Succeeded in starting the application ${process}." + break + else + check_times=$((check_times -1)) + fi + done + if [[ ${check_times} -le 0 ]]; then + write_messages e 0 "${start_step}" "Failed to start the application ${process}. Check the startup script." + START_APP_FLAG=1 + + fi + done + fi + if [[ "${start_step}" -eq 5 ]];then + if [[ ${START_APP_FLAG} -eq 1 || ${START_APP_COMM} -eq 1 ]]; then + for ((i = 0; i < "${length}"; i++)); do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + start_times=5 + if [[ "${ps_result}" != "" ]]; then + write_messages c 34 "${start_step}" "Succeeded in starting the application ${process}." + fi + while [[ ${start_times} -gt 0 && "${ps_result}" == "" ]] + do + # Manually start the application + HAND_START_APP=1 + write_messages c 31 "${start_step}" "Manually start the application ${process}. If it is started successfully, type \"Y\". Otherwise, type \"N\" :" + read -r process_is_on + write_messages i 0 "${start_step}" "You've entered ${process_is_on} " + if [[ "${process_is_on}" == "Y" || "${process_is_on}" == "y" ]]; then + sleep "${SLEEP_TIME}" + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages c 34 "${start_step}" "Manual startup of the application ${process} is complete." + break + else + write_messages e 0 "${start_step}" "The application process ${process} does not exist. Please try again." + start_times=$((start_times -1)) + fi + else + start_times=$((start_times -1)) + fi + done + if [[ ${start_times} -le 0 ]]; then + write_messages e 0 "${start_step}" "The application failed to be started. Check the application and try again." + exit + fi + done + fi + fi + IFS="${OLD_IFS}" +} + +start_performance_test(){ + # Invoke the pressure test command to perform the pressure test. + PERF_TEST_FLAG=0 + write_messages i 0 7 "Start the pressure test tool" + if [[ ${TEST_TOOL_COMM} -eq 0 ]];then + OLD_IFS="${IFS}" + IFS=',' + read -r -a start_performance_scripts <<< "$start_performance_scripts" + length=${#start_performance_scripts[@]} + for ((i = 0; i < "${length}"; i++)); do + start_script=${start_performance_scripts[$i]} + pattern='&$' + if [[ $start_script =~ $pattern ]];then + eval "${start_script}" >> ./log/"${app_log_file}" 2>&1 + PID=$! + cd "${CURRENT_PATH}"||exit + else + eval "(${start_script})&" >> ./log/"${app_log_file}" 2>&1 + PID=$! + cd "${CURRENT_PATH}"||exit + fi + + if ! ps -fp "${PID}"> /dev/null; then + write_messages e 0 7 "Failed to start the test tool by invoking the ${start_script} command. Manually start the test tool." + HAND_START_TEST=1 + PERF_TEST_FLAG=0 + else + performance_test_pid_array[$i]="${PID}" + PERF_TEST_FLAG=1 + fi + done + IFS="${OLD_IFS}" + fi + start_times=5 + if [[ ${TEST_TOOL_COMM} -eq 1 || ${PERF_TEST_FLAG} -eq 0 ]];then + while [[ ${start_times} -gt 0 ]] + do + write_messages c 31 7 "Manually start the pressure test tool. If it is started successfully, type \"Y\". Otherwise, type \"N\":" + read -r performance_is_on + if [[ "${performance_is_on}" == "Y" || "${performance_is_on}" == "y" ]]; then + write_messages c 31 7 "You've entered ${performance_is_on} " + break + else + write_messages c 31 7 "You've entered ${performance_is_on}" + start_times=$((start_times -1)) + fi + done + fi + if [[ ${start_times} -le 0 ]]; then + write_messages e 0 5 "Pressure test requires you to manually increase the pressure or start the pressure test tool. Confirm that you want to perform the pressure test before starting the pressure test tool." + exit + fi +} + +reliablity_test(){ + # Reliability test + OLD_IFS="${IFS}" + IFS=',' + read -r -a app_list <<< "$application_names" + read -r -a start_comm_list <<< "$start_app_commands" + SLEEP_TIME=20 + RELIABLE_TEST_FLAG=0 + if [[ ${HAND_START_TEST} -eq 1 || ${TEST_TOOL_COMM} -eq 1 ]];then + write_messages c 31 8 "Reliability test: The pressure test tool has been manually started. As the pressure test is complete, stop the pressure test tool and press any key to continue." + read -r process_is_on + write_messages c 31 8 "You've entered ${process_is_on}" + else + for pid in "${performance_test_pid_array[@]}" + do + # All subprocesses of the pid + sub_pids=$(pgrep -P ${pid}) + for subpid in ${sub_pids}; + do + kill -9 "${subpid}" >>./log/"${log_file}" 2>&1 + done + disown "${pid}" + kill -9 "${pid}" >>./log/"${log_file}" 2>&1 + if [[ $? -ne 0 ]] ; then + write_messages e 0 8 "Failed to stop the pressure test tool. Manually stop it. Press any key to continue." + read -r process_is_on + write_messages c 31 8 "You've entered ${process_is_on}" + continue + fi + sleep "${SLEEP_TIME}" + done + fi + if [[ ${KUBERNETES_ENV} -eq 0 && ${HAND_START_APP} -eq 0 && ${START_APP_COMM} -eq 0 ]];then + length=${#app_list[@]} + for ((i = 0; i < "${length}"; i++)); + do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 8 "Before performing reliability test, check whether the application process ${process} exists." + if ! kill_process ${process} >>./log/"${log_file}" 2>&1 ; then + write_messages e 0 8 "Reliability test: An error occurred when forcibly killing the ${process} process. The reliability test failed." + RELIABLE_TEST_FLAG=1 + else + write_messages i 0 8 "Reliability test: The ${process} process was forcibly killed." + fi + else + write_messages e 31 8 "Before the reliability test, the application ${process} has been stopped. The reliability test failed." + RELIABLE_TEST_FLAG=1 + fi + done + sleep "${SLEEP_TIME}" + if [[ ${RELIABLE_TEST_FLAG} -eq 0 ]]; then + start_app 8 + for ((i = 0; i < "${length}"; i++)); + do + process=${app_list[$i]} + process=$(echo ${process} | awk '{gsub(/^\s+|\s+$/, "");print}') + ps_result="$(check_process ${process})" + if [[ "${ps_result}" != "" ]]; then + write_messages i 0 8 "Reliability test: The startup of the ${process} process is complete. The reliability test is successful." + else + write_messages e 31 8 "Reliability test: The reliability test failed because the application ${process} failed to be started." + fi + done + fi + elif [[ ${KUBERNETES_ENV} -eq 1 ]]; then + write_messages c 31 8 "This test case is not supported because the application is kubernetes cluster." + else + write_messages c 31 8 "This test case is not supported because the application was manually started." + fi + IFS="${OLD_IFS}" +} + + +notice_users +production_env_waring + +if [[ "$(id -u)" -ne 0 ]]; then + write_messages c 31 0 "Run the script as the root user. Otherwise, you do not have the permission to query system logs." +fi + +# 1. Check whether the configuration file is correct. +write_messages c 34 1 "Step 1: Start checking the configuration file." +check_configuration +write_messages c 34 1 "Step 1: Finish checking the configuration file." +# Initialize the system and create a collection directory tree. +write_messages c 34 1 "Step 2: Start checking the software dependency." +create_result_dir + +# Prepare the environment and check the user environment. +env_preparation +check_physical_system +# Check whether the Kunpeng DevKit exists. If so, stop the it. +stop_or_start_kunpengdeveloper 1 + +message_start_time="$(tail -1 /var/log/${SYS_LOG_}| awk -F' ' '{for(i=1;i<=3;i++) printf $i OFS}')" +write_messages c 34 1 "Step 2: Finish checking the software dependency." + +# 2. Perform environment self-check. +write_messages c 34 3 "Step 3: Start checking the test environment." +sys_env_inspectation +write_messages c 34 3 "Step 3: Finish checking the test environment." + +write_messages c 34 4 "Step 4: Collect data related to system resources, such as CPU, memory, drive, NIC, and power consumption, before starting the application." +# 3. Collect system information. +get_service_info + +# 4. Collect indicator data before starting the application. +# 4.1 Check for the application process. If the process exists, stop it. +check_process_exits_stop 4 +# 4.2 Collect indicator data +get_performance 5 2 0 4 +write_messages c 34 4 "Step 4: Finish the collection before the application is started." +sleep 10 +# 5. Start the application. +write_messages c 34 5 "Step 5: Start the application. You can view the progress on the info.log file in the ./log directory. \ +If the next step is pending for a long time, check whether the startup script in the configuration file is executed with output returned." +start_app 5 +get_ps_snapshot +write_messages c 34 5 "Step 5: Finish starting the application." + +# Perform security check. +write_messages c 34 6 "Step 6: Perform a security test by scanning the application's port. You can view the progress in the nmap.log file in the ./log directory." +port_scan +validated_clamav_scan +validated_cvecheck +write_messages c 34 6 "Step 6: Finish the security test." + +# 7.1 Perform the pressure test. +write_messages c 34 7 "Step 7: Collect data related to system resources such as CPU, memory, drive, and NIC under service pressure." +start_performance_test + +# 7.2 Collect data for the pressure test. +sleep 2 +get_performance 5 5 1 7 +sleep 20 +write_messages c 34 7 "Step 7: Finish collecting the data for the pressure test." + + +# 8. Perform the reliability test +write_messages c 34 8 "Step 8: Perform a reliability test. Start the application after it is forcibly killed." +reliablity_test +write_messages c 34 8 "Step 8: Finish the reliability test." + +# 9. Collect indicator data after the application is stopped. +write_messages c 34 9 "Step 9: Collect data related to system resources, such as CPU, memory, drive, NIC, and power consumption, after the application is stopped." +check_process_exits_stop 9 +get_performance 5 2 2 9 +sleep 10 +write_messages c 34 9 "Step 9: Finish collecting the data after the application is stopped." + +write_messages c 34 10 "Step 10: Package the collected test data." +stop_or_start_kunpengdeveloper 10 +message_end_time="$(tail -1 /var/log/${SYS_LOG_}| awk -F' ' '{for(i=1;i<=3;i++) printf $i OFS}')" +check_system_message "${message_start_time}" "${message_end_time}" +# Check whether any error occurs during the preceding collections. +check_error +tar_output +exit diff --git a/component/CompatibilityTesting/compatibility_testing/English/env_OSVersion.sh b/component/CompatibilityTesting/compatibility_testing/English/env_OSVersion.sh new file mode 100644 index 0000000000000000000000000000000000000000..1fcd494c402240aa72e4f44b185a83fc7c7d7b2e --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/env_OSVersion.sh @@ -0,0 +1,79 @@ +#!/bin/bash +################################## +#Function description: Check the Current OS Version +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +versions_osVersion() { + # Check the Current OS Version + os_version_='unrecognized' + os_system_=$(uname -s) + LSB_RELEASE='/etc/lsb-release' + case ${os_system_} in + Linux) + if [[ -r '/etc/os-release' ]]; then + os_version_=$(awk -F= '$1~/PRETTY_NAME/{print $2}' /etc/os-release \ + |sed 's/"//g') + if echo "${os_version_}"|grep -i "CentOS" &> /dev/null ; then + if [[ -r '/etc/redhat-release' ]]; then + os_version_=$(cat /etc/redhat-release) + fi + fi + elif [[ -r '/etc/redhat-release' ]]; then + os_version_=$(cat /etc/redhat-release) + elif [[ -r '/etc/SuSE-release' ]]; then + os_version_=$(head -n 1 /etc/SuSE-release) + elif [[ -r "${LSB_RELEASE}" ]]; then + if grep -q 'DISTRIB_DESCRIPTION' "${LSB_RELEASE}"; then + # shellcheck disable=SC2002 + os_version_=$(cat "${LSB_RELEASE}" \ + |awk -F= '$1~/DISTRIB_DESCRIPTION/{print $2}' \ + |sed 's/"//g;s/ /-/g') + fi + fi + ;; + *) + write_messages e 0 1 "The tool can run only on the Linux operating system." + exit + ;; + esac + Kylin_Build="" + if echo "${os_version_}"|grep -i -E "\|\" &> /dev/null; then + if [[ -f /var/log/messages ]];then + > /var/log/messages + fi + if hash nkvers 2>/dev/null; then + Kylin_Build=$(nkvers|sed -n -e '/Build/,/^$/'p|grep -Ev "Build:|#+") + Kylin_Build=$(echo ${Kylin_Build}) + fi + fi + + uos_edition_name="" + uos_edition_name_j="" + uos_edition_name_v="" + + if echo "${os_version_}"|grep -E -i "\|\" &> /dev/null; then + if [[ -f /var/log/messages ]];then + > /var/log/messages + fi + if [[ -r '/etc/os-version' ]]; then + uos_edition_name=$(cat /etc/os-version|grep 'EditionName\[zh_CN\]'|awk -F '=' '{print $NF}') + uos_edition_name_j=$(cat /etc/os-version|grep 'MajorVersion'|awk -F '=' '{print $NF}') + uos_edition_name_v=$(cat /etc/os-version|grep 'MinorVersion'|awk -F '=' '{print $NF}') + fi + fi + + + if [[ "${Kylin_Build}"x != ""x ]];then + os_version_=${Kylin_Build} + fi + if [[ "${uos_edition_name_v}"x != ""x ]]; then + os_version_="UnionTech OS Server"" V""${uos_edition_name_j}"" ""${uos_edition_name_v}""e" + fi + echo "${os_version_}" + unset os_system_ os_version_ + +} + +versions_osVersion \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/English/env_inspectation.sh b/component/CompatibilityTesting/compatibility_testing/English/env_inspectation.sh new file mode 100644 index 0000000000000000000000000000000000000000..f2dea793a4403f67277bc7bbe7d4f4b1f9b67024 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/env_inspectation.sh @@ -0,0 +1,118 @@ +#!/bin/bash +################################## +#Function description: Check whether the usage of the CPU, memory, drive and NIC is too high. If the usage is too high, +# a message will be displayed indicating that the current environment is not idle. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + + +# Create a log directory. +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +# marked idle +CPU_NOT_IDLE=0 +MEM_NOT_IDLE=0 +NET_NOT_IDLE=0 +DISK_NOT_IDLE=0 + +# maximum check times +MAX_CPU_IDLE=10.00 +MAX_MEM_IDLE=5.00 +MAX_DISK_IDLE=5.00 +MAX_NET_CONNS=100 + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +sys_env_inspectation() { + # Environment self-check: Check whether the usage of the CPU, memory, drive and NIC is too high. + # script PID + SCRIPTS_PID=$(ps -ef | grep -v grep | grep "$0" | awk '{print $2}') + + DISK_NAME=$(iostat -d -x |sed -n '4,$p'|wc -l) + IOS_LINE=$(( ( DISK_NAME + 1 )*4 +2 )) + + CPU_IDLE=$(top -n 1 -b | head -10 | tail -3 | awk '{if ($12 !~/top/ && $1!~/"${SCRIPTS_PID}"/) print $9}' | head -1) + write_messages i 0 3 "Environment self-check: CPU used ${CPU_IDLE}" + if [[ -z "${CPU_IDLE}" ]]; then + write_messages e 0 3 "Environment self-check: Check whether an error occurs when querying the CPU usage or invoking the top command." + elif [[ "$(echo "${CPU_IDLE}>${MAX_CPU_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "Environment self-check: When detecting that the CPU usage ${CPU_IDLE} of the application exceeds the threshold, run the top command to check the usage." + CPU_NOT_IDLE=1 + else + CPU_NOT_IDLE=0 + fi + MEM_IDLE=$(top -n 1 -b | head -10 | tail -3 | awk '{if ($12 !~/top/ && $1!~/"${SCRIPTS_PID}"/) print $10}' | head -1) + write_messages i 0 3 "Environment self-check: memory used ${MEM_IDLE}" + if [[ -z "${MEM_IDLE}" ]]; then + write_messages e 0 3 "Environment self-check: Check whether an error occurs when querying the memory usage or invoking the top command." + elif [[ "$(echo "${MEM_IDLE}>${MAX_MEM_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "Environment self-check: When detecting that the memory usage ${MEM_IDLE} of the application exceeds the threshold, run the top command to check the usage." + MEM_NOT_IDLE=1 + else + MEM_NOT_IDLE=0 + fi + # run the iostat command to detect the bandwidth of the drive + DISK_IDLE=$(iostat -d -x 1 5 |sed -n ''${IOS_LINE}',$p' |grep -v Device|awk '{print $NF}'|sort -nr|head -1) + write_messages i 0 3 "Environment self-check: drive used ${DISK_IDLE}" + if [[ -z "${DISK_IDLE}" ]]; then + write_messages e 0 3 "Environment self-check: Check whether an error occurs when querying the drive usage or invoking the iostat command." + elif [[ "$(echo "${DISK_IDLE}>${MAX_DISK_IDLE}" | bc)" -eq 1 ]]; then + write_messages e 0 3 "Environment self-check: When detecting that the bandwidth usage ${DISK_IDLE} of the drive exceeds the threshold, run the iostat -d -x command to check the usage." + DISK_NOT_IDLE=1 + else + DISK_NOT_IDLE=0 + fi + # Number of detected network connections + NET_CONNECTIONS=$(netstat -n | awk '/^tcp/ {++S[$NF]}END{for(a in S) print S[a]}' | sort -nr | head -1) + write_messages i 0 3 "Environment self-check: Number of network connections ${NET_CONNECTIONS}" + if [[ -z "${NET_CONNECTIONS}" ]]; then + write_messages e 0 3 "Environment self-check: Check whether an error occurs when querying the number of network connections or invoking the netstat command." + elif [[ "${NET_CONNECTIONS}" -ge "${MAX_NET_CONNS}" ]]; then + write_messages e 0 3 "Number of detected network connections: ${NET_CONNECTIONS}. Run the netstat -n|awk '/^tcp/{++S[\$NF]}END{for (a in S)print a , "\t",S[a]}' command to check the number." + NET_NOT_IDLE=1 + else + NET_NOT_IDLE=0 + fi + + if [[ "${MEM_NOT_IDLE}" -eq 1 || "${CPU_NOT_IDLE}" -eq 1 || "${DISK_NOT_IDLE}" -eq 1 \ + || "${NET_NOT_IDLE}" -eq 1 ]]; then + exit 1 + else + exit 0 + fi + +} + +sys_env_inspectation \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/English/env_kunpengdeveloper.sh b/component/CompatibilityTesting/compatibility_testing/English/env_kunpengdeveloper.sh new file mode 100644 index 0000000000000000000000000000000000000000..e7e616eb04bd42ee2612cc84d2f0ff6df895eeed --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/env_kunpengdeveloper.sh @@ -0,0 +1,40 @@ +#!/bin/bash +################################## +#Function description: Check Whether Kunpeng Devkit is running. If yes, stop it during the test. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +# Create a log directory. +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +HAS_KUNPENG_DEVKIT=0 + +stop_or_start_kunpengdeveloper(){ + step=$1 + kit_list=("tuning_kit" "depende+" "porting" "hyper_tuner") + kit_service_list=("thor.service" "nginx_port.service" "gunicorn_port.service") + for kit in "${kit_list[@]}"; do + ps_result="$(pgrep -lf "${kit}") " + if [[ "${ps_result}" != ' ' ]]; then + HAS_KUNPENG_DEVKIT=1 + break + fi + done + if [[ ${HAS_KUNPENG_DEVKIT} -eq 1 && ${step} -eq 1 ]];then + for service in "${kit_service_list[@]}"; do + eval "systemctl stop ${service}" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 + done + fi + if [[ ${HAS_KUNPENG_DEVKIT} -eq 1 && ${step} -eq 10 ]];then + for service in "${kit_service_list[@]}"; do + eval "systemctl start ${service}" >> "${CURRENT_PATH}"/log/"${log_file}" 2>&1 + done + fi +} + +stop_or_start_kunpengdeveloper $1 diff --git a/component/CompatibilityTesting/compatibility_testing/English/env_preparation.sh b/component/CompatibilityTesting/compatibility_testing/English/env_preparation.sh new file mode 100644 index 0000000000000000000000000000000000000000..5a069cd86c1e59af12aa0a5fd8e783f7bda9065c --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/env_preparation.sh @@ -0,0 +1,145 @@ +#!/bin/bash +################################## +#Function description: Check and install dependencies of the tool. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +# Create a log directory. +source ~/.bashrc +shopt -s expand_aliases +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + + + +env_preparation() { + # Ensure that the service application software, test tools, and dependent software are installed. + write_messages i 0 1 "Ensure that the service application software, test tools, and dependent software are installed." + software_list=(nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sar bc) + rpm_list=(nmap ipmitool dmidecode pciutils util-linux util-linux net-tools net-tools sysstat bc) + deb_list=(nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc) + software_des=('Vulnerability Scan' 'Power Consumption Test' 'Check Hardware Info' 'Check PCI Bus' 'Check CPU Info' 'Check Drive Partitions' 'Check NIC' 'Number of Network Connections' 'Performance Analysis' 'Floating-Point Computing' ) + suse_sys=(SuSE) + length=${#software_list[@]} + sys_id=0 + os_version=$(bash ${CURRENT_PATH}/env_OSVersion.sh) + + if ! hash apt-get 2>/dev/null; then + sys_id=1; + SYS_LOG_="messages" + else + sys_id=2; + SYS_LOG_="syslog" + fi + for item in "${suse_sys[@]}"; do + if echo "${os_version}"|grep -i "${item}" &> /dev/null; then + sys_id=3; + SYS_LOG_="messages" + fi + done + if [[ "${sys_id}" -eq 1 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + rpm_app=${rpm_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "Installing the ${software_desc} software ${software_app}... Please wait." + if ! yum -y install "${rpm_app}"; then + write_messages e 0 1 "Failed to install the ${software_desc} software ${software_app}. Check whether the Internet is accessible and the yum source is configured, and install the RPM packages of nmap, ipmitool, dmidecode, net-tools, pciutils, util-linux, sysstat." + exit 1 + fi + else + write_messages i 0 1 "The ${software_desc} software has been installed." + fi + done + elif [[ "${sys_id}" -eq 2 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + software_deb=${deb_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "Installing the ${software_desc} software ${software_app}... Please wait." + if ! apt -y install "${software_deb}"; then + write_messages e 0 1 "Failed to install the ${software_desc} software ${software_app}. Check whether the Internet is accessible and the apt source is configured, and install the DEB packages nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc." + exit 1 + fi + else + write_messages i 0 1 "The ${software_desc} software has been installed." + fi + done + elif [[ "${sys_id}" -eq 3 ]];then + for ((i = 0; i < "${length}"; i++)); do + software_app=${software_list[$i]} + software_deb=${deb_list[$i]} + software_desc=${software_des[$i]} + if ! hash "${software_app}" 2>/dev/null; then + write_messages i 0 1 "Installing the ${software_desc} software ${software_app}... Please wait." + if ! zypper install -y "${software_deb}"; then + write_messages e 0 1 "Failed to install the ${software_desc} software ${software_app}. Check whether the Internet is accessible and the zypper source is configured, and install the DEB packages nmap ipmitool dmidecode lspci lscpu lsblk ifconfig netstat sysstat bc." + exit 1 + fi + else + write_messages i 0 1 "The ${software_desc} software has been installed." + fi + done + else + write_messages c 31 1 "Currently, only the released OS versions of CentOS, Redhat, NeoKylin, Ubuntu, Kylin, UOS and openEuler are supported." + exit 1 + fi +} + +smartctl_install(){ + # install smartctl + if hash yum 2>/dev/null && ! hash smartctl 2>/dev/null; then + write_messages i 0 1 "Installing the Control and Monitor Utility for SMART Disks software ... Please wait." + if ! yum install -y smartmontools; then + write_messages e 0 1 "Failed to install the Control and Monitor Utility for SMART Disks software. Check whether the Internet is accessible and the yum source is configured, and install the RPM packages of smartmontools" + exit 1 + fi + fi +} + +env_preparation +smartctl_install + + + + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/English/obtain_server_perf.sh b/component/CompatibilityTesting/compatibility_testing/English/obtain_server_perf.sh new file mode 100644 index 0000000000000000000000000000000000000000..4b14a000c6ab738d386cca5dbffec61fe0980fd8 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/obtain_server_perf.sh @@ -0,0 +1,116 @@ +#!/bin/bash +################################## +#Function description: Collect indicator data related to the CPU, memory, drive, NIC, and power consumption. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +get_performance() { + # Collect indicator data related to the CPU, memory, drive, NIC, and power consumption. + # Parameter 1: collection interval + # Parameter 2: collection duration + # Parameter 3: collection sequence. The value 0 indicates collection before the compatibility test, 1 indicates collection during the performance test, and 2 indicates collection after the compatibility test + # Parameter 4: step + frequency=$1 + seq=$3 + during_time=$2 + step=$4 + times=$((during_time * 60 / frequency)) + power_path="data/test/power/" + if [[ ! -d "${power_path}" ]]; then + mkdir -p "${power_path}" + fi + if [[ "${seq}" -eq 1 ]]; then + file_path="data/test/performance/" + file_seq=1 + elif [[ "${seq}" -eq 0 ]]; then + file_path="data/test/compatiable/" + file_seq=0 + else + file_path="data/test/compatiable/" + file_seq=1 + fi + desc_array=('Collect data before the compatibility test' 'Collect data during the performance test' 'Collect data after the compatibility test') + if [[ ! -d "${file_path}" ]]; then + mkdir -p "${file_path}" + fi + file_name="test_perf_cpu_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:Run the sar -u ${frequency} ${times} command to collect indicator data related to the CPU." + + if ! sar -u "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "Failed to collect indicator data related to the CPU by invoking the sar -u ${frequency} ${times} command." + write_messages s 0 "${step}" "${desc_array[${seq}]} Failed to collect indicator data related to the CPU by invoking the sar -u ${frequency} ${times} command." + fi + file_name="test_perf_mem_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:Run the sar -r ${frequency} ${times} command to collect indicator data related to the Memory." + if ! sar -r "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "Failed to collect indicator data related to the Memory by invoking the sar -r ${frequency} ${times} command." + write_messages s 0 "${step}" "${desc_array[${seq}]}Failed to collect indicator data related to the Memory by invoking the sar -r ${frequency} ${times} command." + fi + file_name="test_perf_net_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:Run the sar -n DEV ${frequency} ${times} command to collect indicator data related to the NIC." + if ! sar -n DEV "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "Failed to collect indicator data related to the NIC by invoking the sar -n DEV ${frequency} ${times} command." + write_messages s 0 "${step}" "${desc_array[${seq}]}Failed to collect indicator data related to the NIC by invoking the sar -n DEV ${frequency} ${times} command." + fi + file_name="test_perf_disk_${file_seq}.log" + write_messages i 0 "${step}" "${desc_array[${seq}]}:Run the sar -d -p ${frequency} ${times} command to collect indicator data related to the drive." + if ! sar -d -p "${frequency}" ${times} >"${file_path}""${file_name}"; then + write_messages e 0 "${step}" "Failed to collect indicator data related to the drive by invoking the sar -d -p ${frequency} ${times} command." + write_messages s 0 "${step}" "${desc_array[${seq}]}Failed to collect indicator data related to the drive by invoking the sar -d -p ${frequency} ${times} command." + fi + if [[ "${seq}" -ne 1 ]];then + write_messages i 0 "${step}" "${desc_array[${seq}]}:run ipmitool command to collect indicator data related to power consumption." + file_name="test_power_${file_seq}.log" + times=$((during_time * 60 / frequency)) + while [[ ${times} -gt 0 ]]; + do + if ! ipmitool -I open sensor get 'Power'|grep 'Sensor Reading '|awk '{print $4}' \ + >>"${power_path}""${file_name}"; then + write_messages e 0 "${step}" "ailed to collect indicator data related to the power consumption by ipmitool -I open sensor get 'Power' command." + fi + sleep "${frequency}" + times=$((times-1)) + done + write_messages i 0 "${step}" "Finish power consumption test." + fi + write_messages i 0 "${step}" "${desc_array[${seq}]} has been finished." +} + +get_performance $1 $2 $3 $4 \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/English/obtain_service_info.sh b/component/CompatibilityTesting/compatibility_testing/English/obtain_service_info.sh new file mode 100644 index 0000000000000000000000000000000000000000..6685a2e47deaba25f9e8cdf11a134d908c4b0049 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/obtain_service_info.sh @@ -0,0 +1,106 @@ +#!/bin/bash +################################## +#Function description: Obtain the hardware configuration of the test environment, such as the server model, drive version, +# kernel version, and information about the PCI and CPU. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-03-02 +################################## + +if [[ ! -d "./log" ]]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +get_service_info() { + # Obtain Server Info + path="data/hardware/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + path="data/software/" + if [[ ! -d "${path}" ]]; then + mkdir -p "${path}" + fi + file_name_list=("data/hardware/hardware_info.log" "data/hardware/hardware_pcie.log" "data/hardware/hardware_cpu.log" + "data/hardware/hardware_disk.log" "data/software/system_version.log") + command_list=("dmidecode" "lspci -nnvv" "lscpu" "lsblk" "cat /proc/version") + command_desc=("Server Model" "pci Info" "CPU Info" "Partition Drive" "Kernel Info") + length=${#file_name_list[@]} + for ((i = 0; i < "${length}"; i++)); do + file_name=${file_name_list[$i]} + comm=${command_list[$i]} + desc=${command_desc[$i]} + if ! eval "${comm}" >"${file_name}"; then + write_messages e 0 4 "Failed to obtain ${desc} by invoking the ${comm} command." + else + write_messages i 0 4 "Succeed to obtain ${desc} by invoking the ${comm} command." + fi + done + + if hash smartctl 2>/dev/null ; then + smatrt_file="data/hardware/hardware_smartctl.log" + OLD_IFS="${IFS}" + IFS=$'\n' + for device in $(smartctl --scan|awk -F"#" '{print $1}'); + do + smartctl_cmd="smartctl -a ${device}" + eval "${smartctl_cmd}" >> "${smatrt_file}" 2>> /dev/null; + done + IFS="${OLD_IFS}" + fi + + gcc_file="data/software/system_version.log" + if hash gcc 2>/dev/null ; then + gcc_file="data/software/system_version.log" + echo -e "\n=============gcc=============" >>${gcc_file} 2>> /dev/null; + gcc --version >> ${gcc_file} 2>> /dev/null; + fi + + if hash clang 2>/dev/null ; then + echo -e "\n=============clang=============" >>${gcc_file} 2>> /dev/null; + clang --version >> ${gcc_file} 2>> /dev/null; + fi + + if hash java 2>/dev/null ; then + echo -e "\n=============java=============" >>${gcc_file} 2>> /dev/null; + java -version >> ${gcc_file} 2>> /dev/null 2>&1; + fi +} + +get_service_info + + + + + diff --git a/component/CompatibilityTesting/compatibility_testing/English/security_clam_scan.sh b/component/CompatibilityTesting/compatibility_testing/English/security_clam_scan.sh new file mode 100644 index 0000000000000000000000000000000000000000..d0d4bcb96735222d8bf127d14bd79db93eafc4d2 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/security_clam_scan.sh @@ -0,0 +1,90 @@ +#!/bin/bash +################################## +#Function description: Use ClamAV to scan for viruses. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +source ~/.bashrc +shopt -s expand_aliases +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +clam_log_file=clam.log_${current_time} + + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +clam_scan(){ + scan_path=$1 + file_path="data/test/safety/" + if [ ! -d "${file_path}" ]; then + mkdir -p "${file_path}" + fi + write_messages i 0 6 "Perform antivirus scanning test now" + # update virus database + freshclam + # scan directory + if [ -f ${file_path}${clam_log_file} ];then + cat /dev/null > ${file_path}${clam_log_file} + fi + OLD_IFS="${IFS}" + IFS=',' + + for spath in "${scan_path[@]}"; do + if ! clamscan -r ${spath} --log=${file_path}${clam_log_file} 2>&1; then + write_messages c 34 6 "An error occurs during the antivirus scanning." + fi + done + IFS="${OLD_IFS}" +} + +clamav_install(){ + # Install the virus scan software + if hash yum 2>/dev/null && ! hash clamscan 2>/dev/null; then + if ! yum install -y clamav clamav-update; then + write_messages e 0 1 "Failed to install the virus scan software ClamAV. Check the network environment and \ +yum source configuration, and install the RPM package of ClamAV." + exit 1 + fi + fi + if hash apt-get 2>/dev/null && ! hash clamscan 2>/dev/null; then + if ! apt-get install -y clamav; then + write_messages e 0 1 "Failed to install the virus scan software ClamAV. Check the network environment and \ +apt source configuration, and install the DEB package of ClamAV." + exit 1 + fi + fi +} + +clamav_install +clam_scan $1 \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/English/security_cvecheck.sh b/component/CompatibilityTesting/compatibility_testing/English/security_cvecheck.sh new file mode 100644 index 0000000000000000000000000000000000000000..d6a58ad6f52fbe4430506f52347c969cdda57622 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/security_cvecheck.sh @@ -0,0 +1,68 @@ +#!/bin/bash +################################## +#Function description: Use CVE for vulnerabilities scan. +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + +source ~/.bashrc +shopt -s expand_aliases +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +cvecheck_log_file=cvecheck.log_${current_time} + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +cve_check(){ + scan_path=$1 + file_path="data/test/safety/" + CURRENT_PATH=$(pwd) + LIB_PATH=${CURRENT_PATH}/../lib/ + OLD_IFS="${IFS}" + IFS=',' + if [[ -e ${LIB_PATH}/cvecheck ]] ; then + write_messages i 0 6 "Scan for CVE vulnerabilities now." + chmod +x ${LIB_PATH}/cvecheck + ${LIB_PATH}/cvecheck -u + ${LIB_PATH}/cvecheck -s + for spath in "${scan_path[@]}"; do + ${LIB_PATH}/cvecheck -d ${spath} >>./log/"${cvecheck_log_file}" + cat ${CURRENT_PATH}/cve_tmp/result/cvecheck-result.json >> ${file_path}/cvecheck-result.json 2>> /dev/null; + done + write_messages i 0 6 "Scan completed." + fi + IFS="${OLD_IFS}" +} + + +cve_check $1 \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/English/security_port_scan.sh b/component/CompatibilityTesting/compatibility_testing/English/security_port_scan.sh new file mode 100644 index 0000000000000000000000000000000000000000..4026b99db3d0eeb7428dbc8d07f70fc06ad81fdb --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/English/security_port_scan.sh @@ -0,0 +1,79 @@ +#!/bin/bash +################################## +#Function description: Run the NMAP command to scan listening ports +#Version information: Copyright © Huawei Technologies Co., Ltd. 2020–2022 +#Change history: Modified on 2022-02-10 +################################## + + +if [ ! -d "./log" ]; then + mkdir ./log +fi +CURRENT_PATH=$(pwd) +current_time=$(date "+%Y%m%d") +log_file=info.log_${current_time} +error_file=error.log_${current_time} +app_log_file=app_log.log_${current_time} +nmap_log_file=nmap.log_${current_time} + +write_messages() { + # Log output function + # Parameter 1: specifies a log level. + # Parameter 2: specifies a color. The value 0 indicates the default color, 31 indicates red, 32 indicates green, 33 indicates yellow, 34 indicates blue, 35 indicates purple, 36 indicates sky blue, and 3 indicates white. + # Parameter 3: specifies the execution procedure. + # Parameter 4: specifies the log content. + DATE=$(date "+%Y-%m-%d %H:%M:%S") + messages=$4 + step=$3 + level_info=$1 + colors=$2 + case $level_info in + i) echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + e) echo "#${DATE}#error#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + m) echo "#${DATE}#value#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" ;; + s) echo "#${DATE}#serious#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${error_file}" + echo -e "\033[1;31m${messages}\033[0m" + ;; + c) echo -e "\033[1;34m${messages}\033[0m" + echo "#${DATE}#info#${step}#${messages}" >> "${CURRENT_PATH}"/log/"${log_file}" + ;; + esac +} + +port_scan() { + # Security scan: Run the NMAP command to scan listening ports. + file_path="data/test/safety/" + if [ ! -d "${file_path}" ]; then + mkdir -p "${file_path}" + fi + write_messages i 0 6 "Perform port security test now" + ip_addrs=$(ifconfig -a | grep inet | grep -v '127.0.0.1\|172.17.0.1' | grep -v inet6 \ + | awk '{print $2}' | sed -e 's/addr://g') + if [ -z "${ip_addrs}" ]; then + write_messages e 0 6 "An error occurred when obtaining the host IP address." + fi + + for ip in ${ip_addrs}; do + write_messages c 34 6 "Security test collection: Scan the TCP port whose IP address is ${ip}." + if ! nmap -sS -A -v --reason -p- -n -Pn -oA ${file_path}"${ip}""tcp" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "An error occurred when scanning the TCP port whose IP address is ${ip}." + fi + write_messages c 34 6 "Security test collection: Scan the UDP port whose IP address is ${ip}." + if ! nmap -sU -A -v --reason -p- -n -Pn -oA ${file_path}"${ip}""udp" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "An error occurred when scanning the UDP port whose IP address is ${ip}." + fi + write_messages c 34 6 "Security test collection: Scan the protocol port whose IP address is ${ip}." + if ! nmap -sO -v --reason -n -oA ${file_path}"${ip}""protocol" "${ip}" --host-timeout 360\ + >>./log/"${nmap_log_file}" 2>&1; then + write_messages e 0 6 "An error occurred when scanning the protocol port whose IP address is ${ip}." + fi + done + write_messages i 0 6 "The port security test is complete." +} + +port_scan diff --git a/component/CompatibilityTesting/compatibility_testing/bin/compatibility_test b/component/CompatibilityTesting/compatibility_testing/bin/compatibility_test new file mode 100644 index 0000000000000000000000000000000000000000..04b74dbf022c52c8e6e716260a7dd8269faf0169 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/bin/compatibility_test @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +bin_dir=$(cd $(dirname $0); pwd) +root_dir=`realpath $bin_dir/../` + +ct_sh_path=${root_dir}/Chinese/compatibility_testing.sh +cloud_jar=${root_dir}/cloudTest.jar + +cd ${root_dir}/Chinese/ +sh $ct_sh_path + +java -jar $cloud_jar & +sleep 15 +jar_pid=$! +curl --location --request GET 'http://127.0.0.1:10037/api/v1/report?savePath='${root_dir}'/Chinese/log.json&file='${root_dir}'/Chinese/log.tar.gz' +kill -9 $jar_pid +cp -rf ${root_dir}/template.html.bak ${root_dir}/template.html +cd ${root_dir} +python3 ${root_dir}/json2html.py + diff --git a/component/CompatibilityTesting/compatibility_testing/check_report_result.py b/component/CompatibilityTesting/compatibility_testing/check_report_result.py new file mode 100644 index 0000000000000000000000000000000000000000..b97cfe8e3549979beb1efd3d471132b352a4934c --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/check_report_result.py @@ -0,0 +1,18 @@ +import os +import json + +COMPATIBILITY_REPORT_ENTRIES = ["id", "result", "reason", "evidence"] +COMPATIBILITY_REPORT_TEMPLATE_HOLDER = "/** compatibility-test-report **/" +COMPATIBILITY_JSON_NAME = "log.json" + +flag = 0 +with open(os.path.join(os.getcwd(), "Chinese", COMPATIBILITY_JSON_NAME), "r") as file: + data = json.load(file) + for each in data: + for each_key in COMPATIBILITY_REPORT_ENTRIES: + if each_key == "result": + if each.get(each_key) and each.get(each_key) == "failed": + flag = -1 + break + +print(flag) \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/cloudTest.jar b/component/CompatibilityTesting/compatibility_testing/cloudTest.jar new file mode 100644 index 0000000000000000000000000000000000000000..e37f9f9d3af711d3d5f40d897174ff8874b81ade Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/cloudTest.jar differ diff --git a/component/CompatibilityTesting/compatibility_testing/json2html.py b/component/CompatibilityTesting/compatibility_testing/json2html.py new file mode 100644 index 0000000000000000000000000000000000000000..014fae2e16b537277de4847d32af2844160b6495 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/json2html.py @@ -0,0 +1,26 @@ +import os +import json + +COMPATIBILITY_REPORT_ENTRIES = ["id", "result", "reason", "evidence"] +COMPATIBILITY_REPORT_TEMPLATE_HOLDER = "/** compatibility-test-report **/" +COMPATIBILITY_JSON_NAME = "log.json" + + +def compatibility_result_to_html(): + compatibility_result = [] + compatibility_result.extend(COMPATIBILITY_REPORT_ENTRIES) + with open(os.path.join(os.getcwd(), "Chinese", COMPATIBILITY_JSON_NAME), "r") as file: + data = json.load(file) + + for item in data: + compatibility_result.extend([item.get(entry) for entry in COMPATIBILITY_REPORT_ENTRIES]) + + compatibility_report = json.dumps(compatibility_result) + with open(os.path.join(os.getcwd(), "template.html"), "r") as file: + html_lines = file.readlines() + res = [sub.replace(COMPATIBILITY_REPORT_TEMPLATE_HOLDER, compatibility_report) for sub in html_lines] + with open(os.path.join(os.getcwd(), "compatibility_report.html"), "w") as f: + f.writelines(res) + + +compatibility_result_to_html() \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/lib/cvecheck b/component/CompatibilityTesting/compatibility_testing/lib/cvecheck new file mode 100644 index 0000000000000000000000000000000000000000..33b70109ca5ca26b55f494d50ff37447a81970da Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/lib/cvecheck differ diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/HPL.dat b/component/CompatibilityTesting/compatibility_testing/lib/hpc/HPL.dat new file mode 100644 index 0000000000000000000000000000000000000000..695787a04d00a9fa8bc4ec9d1e0bee6980c9f201 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/lib/hpc/HPL.dat @@ -0,0 +1,31 @@ +HPLinpack benchmark input file +Innovative Computing Laboratory, University of Tennessee +HPL.out output file name (if any) +6 device out (6=stdout,7=stderr,file) +1 # of problems sizes (N) +${ns} Ns +1 # of NBs +192 NBs +0 PMAP process mapping (0=Row-,1=Column-major) +1 # of process grids (P x Q) +${ps} Ps +${qs} Qs +16.0 threshold +1 # of panel fact +0 1 2 PFACTs (0=left, 1=Crout, 2=Right) +1 # of recursive stopping criterium +2 NBMINs (>= 1) +1 # of panels in recursion +2 NDIVs +1 # of recursive panel fact. +0 1 2 RFACTs (0=left, 1=Crout, 2=Right) +1 # of broadcast +0 BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM) +1 # of lookahead depth +0 DEPTHs (>=0) +2 SWAP (0=bin-exch,1=long,2=mix) +64 swapping threshold +0 L1 in (0=transposed,1=no-transposed) form +0 U in (0=transposed,1=no-transposed) form +1 Equilibration (0=no,1=yes) +8 memory alignment in double (> 0) diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/Make.Linux_Arm b/component/CompatibilityTesting/compatibility_testing/lib/hpc/Make.Linux_Arm new file mode 100644 index 0000000000000000000000000000000000000000..9223d5f653477a9fe11148910fbbecc155660928 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/lib/hpc/Make.Linux_Arm @@ -0,0 +1,79 @@ +SHELL = /bin/sh + +CD = cd + +CP = cp + +LN_S = ln -fs + +MKDIR = mkdir -p + +RM = /bin/rm -f + +TOUCH = touch + + + +ARCH = Linux_Arm + +HOME = ${HPL_PATH} + +TOPdir = $(HOME)/hpl-2.3 + +INCdir = $(TOPdir)/include + +BINdir = $(TOPdir)/bin/$(ARCH) + +LIBdir = $(TOPdir)/lib/$(ARCH) + +HPLlib = $(LIBdir)/libhpl.a + + + +LAdir = ${OPENBLAS_PATH} + +ifndef LAinc + +LAinc = $(LAdir)/include + +endif + +ifndef LAlib + +LAlib = ${OPENBLAS_PATH}/lib/libopenblas.a + +endif + + + +F2CDEFS = -DAdd__ -DF77_INTEGER=int -DstringSunStyle + +HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) -I$(LAinc) $(MPinc) + +HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib) + +HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT + +HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES) + + + +CC = mpicc + +CCNOOPT = $(HPL_DEFS) + +OMP_DEFS = -fopenmp + +CCFLAGS = $(HPL_DEFS) -O3 + +LINKER = $(CC) + +LINKFLAGS = $(CCFLAGS) $(OMP_DEFS) + + + +ARCHIVER = ar + +ARFLAGS = r + +RANLIB = echo diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/OpenBLAS-0.3.6.tar.gz b/component/CompatibilityTesting/compatibility_testing/lib/hpc/OpenBLAS-0.3.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..74723b8dcaf6d39c50aea7ede9528063accac17f Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/lib/hpc/OpenBLAS-0.3.6.tar.gz differ diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/STREAM-master.tar.gz b/component/CompatibilityTesting/compatibility_testing/lib/hpc/STREAM-master.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ae93cdeb6cfd5e1002a79edc32767d6e540f344f Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/lib/hpc/STREAM-master.tar.gz differ diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/hostfile b/component/CompatibilityTesting/compatibility_testing/lib/hpc/hostfile new file mode 100644 index 0000000000000000000000000000000000000000..2fbb50c4a8dc7dae6bd07d08c3f7d02ccb2818b0 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/lib/hpc/hostfile @@ -0,0 +1 @@ +localhost diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/hpl-2.3.tar.gz b/component/CompatibilityTesting/compatibility_testing/lib/hpc/hpl-2.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..15bb1fedcf090fc06b086b0161f265e49a44a105 Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/lib/hpc/hpl-2.3.tar.gz differ diff --git a/component/CompatibilityTesting/compatibility_testing/lib/hpc/openmpi-4.0.3.tar.gz b/component/CompatibilityTesting/compatibility_testing/lib/hpc/openmpi-4.0.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3af6dcd870e15be1380426fdf497f3b9238dc674 Binary files /dev/null and b/component/CompatibilityTesting/compatibility_testing/lib/hpc/openmpi-4.0.3.tar.gz differ diff --git a/component/CompatibilityTesting/compatibility_testing/log/app_log.log_20240331 b/component/CompatibilityTesting/compatibility_testing/log/app_log.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/log/error.log_20240331 b/component/CompatibilityTesting/compatibility_testing/log/error.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/log/info.log_20240331 b/component/CompatibilityTesting/compatibility_testing/log/info.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..81e354614ac67d38d22888224f9d4e346f5034a0 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/log/info.log_20240331 @@ -0,0 +1,5 @@ +#2024-03-31 16:27:52#info#0#自动化兼容性测试开始前,请用户先填写配置文件compatibility_testing.conf,填写说明请参考README +#2024-03-31 16:27:52#info#0#自动化兼容性测试开始执行,脚本分为10个步骤,运行时间约15分钟,请耐心等待。 +#2024-03-31 16:27:52#info#0#自动化测试采集工具开始执行。 +#2024-03-31 16:27:52#info#1#第 1 步:配置文件检查, 开始 +#2024-03-31 16:27:52#error#2#配置文件不存在,请检查。 diff --git a/component/CompatibilityTesting/compatibility_testing/log/nmap.log_20240331 b/component/CompatibilityTesting/compatibility_testing/log/nmap.log_20240331 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/logs/cloudTest_2024-03-28.0.log b/component/CompatibilityTesting/compatibility_testing/logs/cloudTest_2024-03-28.0.log new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/logs/cloudTest_2024-03-29.0.log b/component/CompatibilityTesting/compatibility_testing/logs/cloudTest_2024-03-29.0.log new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/component/CompatibilityTesting/compatibility_testing/report_result.sh b/component/CompatibilityTesting/compatibility_testing/report_result.sh new file mode 100644 index 0000000000000000000000000000000000000000..9f546ea0018864c1ed48ddaced4bfa141c2839f8 --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/report_result.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# SourceCode build script +# Copyright: Copyright (c) Huawei Technologies Co., Ltd. All rights reserved. + +cd ${HOME}/.local/compatibility_testing/ +result=`python3 ${HOME}/.local/compatibility_testing/check_report_result.py` + +if [ "$result" == "-1" ]; then + exit 1 +fi \ No newline at end of file diff --git a/component/CompatibilityTesting/compatibility_testing/template.html.bak b/component/CompatibilityTesting/compatibility_testing/template.html.bak new file mode 100644 index 0000000000000000000000000000000000000000..6b1410255ac2fe4daa9e91523f3ba3a2b6863bae --- /dev/null +++ b/component/CompatibilityTesting/compatibility_testing/template.html.bak @@ -0,0 +1,296 @@ + + + + + + Kunpeng DevKit + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + diff --git a/component/build_component.sh b/component/build_component.sh index 8a4de57bba47bd2c9e7c4f2822418e5775addba1..ea219e0d173a0c02b81f49dca9eb76435e57aa5a 100644 --- a/component/build_component.sh +++ b/component/build_component.sh @@ -22,6 +22,12 @@ function build_devkit_installer() { bash "${current_dir}"/DevKitWeb/build_devkit_installer.sh } +function handle_compatibility_testing() { + mkdir -p "${final_component_dir}"/CompatibilityTesting + cp "${current_dir}"/CompatibilityTesting/install.sh "${final_component_dir}"/CompatibilityTesting + cp "${current_dir}"/CompatibilityTesting/check_install_result.sh "${final_component_dir}"/CompatibilityTesting +} + function main() { if [[ -d ${final_component_dir} ]]; then rm -rf "${final_component_dir}" @@ -31,16 +37,17 @@ function main() { component_arrays=( "BiShengCompiler" "BiShengJDK8" "BiShengJDK17" "GCCforOpenEuler" - "CompatibilityTesting" "NonInvasiveSwitching" "A-FOT" + "NonInvasiveSwitching" "A-FOT" "DevKitCLI" "ClamAV" ) for element in "${component_arrays[@]}"; do cp -rf "${current_dir}/${element}" "${final_component_dir}" done - rm -fr "${final_component_dir}/{DevKitTester, DevKitWeb, OpenEulerMirrorISO}" + rm -fr "${final_component_dir}/{CompatibilityTesting, DevKitTester, DevKitWeb, OpenEulerMirrorISO}" build_devkit_tester build_devkit_installer + handle_compatibility_testing } main "$@"