• 基于openEuler系统执行Linux内核性能测试脚本(lkp-tests)的流程


    【原文链接】基于openEuler系统执行Linux内核性能测试脚本(lkp-tests)的流程

    (1)若没有openEuler操作系统的虚拟机,则可以参考 VMware安装openEuler-22.03-LTS版本的虚拟机 安装一台openEuler操作系统的虚拟机

    (1)下载lkp-tests测试代码

    cd /opt
    git clone https://gitee.com/wu_fengguang/lkp-tests.git
    
    • 1
    • 2

    (2)安装基础依赖

    cd lkp-tests
    make install
    
    • 1
    • 2

    (3)验证lkp是否安装成功

    如下,可以查看到帮助信息,表示lkp已经安装成功了

    [root@openEuler-1 lkp-tests]# lkp help
    Usage: lkp <command> [options]
    
    INSTALLATION
    
            install JOB                     install binary dependencies for JOB
    
    JOB
    
            split JOB                       split JOB matrix
            compile JOB                     compile JOB into shell script
    
    TESTING
    
            run JOB                         run test JOB locally
            qemu JOB                        run test JOB in QEMU virtual machine
    
    RESULT
    
            result|rt|_rt|__rt PATTERNs     show result dirs
            ls|ll PATTERNs                  ls result dirs
            rm-path result                  remove result dirs
            _rm PATTERNs                    remove _result dirs
    
            stat [options]                  show result stats
            compare [options]               compare result stats
    
    DEBUG
    
            irb                             run irb with lib/*.rb loaded
            pry                             run pry with lib/*.rb loaded
    
    More commands can be found in /opt/lkp-tests/{bin,sbin,tools}/
    [root@openEuler-1 lkp-tests]# 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34

    (4)安装lkp-tests的依赖

    lkp install
    
    • 1

    (5)查看当前可执行的任务

    [root@openEuler-1 lkp-tests]# ls jobs/
    boot-trace.yaml  borrow-30d.yaml         debug.yaml                  local-tests                      nfs-iozone.yaml         pbzip2.yaml      rdma-pyverbs.yml         send-email.yaml
    boot.yaml        build-linux.yaml        hibernate-stress.yaml       mariadb.yaml                     nfs-test.yaml           perf-batch.yaml  README.md                ssh-on-fail.yaml
    borrow-10d.yaml  ceph.yaml               hibernate.yaml              multi-docker.yaml                oltp.yaml               pgbench.yaml     replace-repo.yaml        ssh.yaml
    borrow-1d.yaml   cgroup2-test.yaml       install-iso-firstboot.yaml  multi-qemu-docker-selftest.yaml  os-matrix-aarch64.yaml  pixz.yaml        rocksdb.yaml             stop_firewalld.yaml
    borrow-1h.yaml   cgroup2.yaml            install-iso.yaml            multi-qemu-docker.yaml           os-matrix-dc.yaml       plzip.yaml       secrets_info.yaml        yocto.yaml
    borrow-1w.yaml   cluster-ssh-trust.yaml  intel-ipsec-mb              multi-qemu.yaml                  os-matrix-x86.yaml      pxz.yaml         send-email-on-fail.yaml  yum-update.yaml
    [root@openEuler-1 lkp-tests]#
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    (6)比如执行 nfs-test.yaml的job,首先分割任务

    [root@openEuler-1 lkp-tests]# lkp split-job jobs/nfs-test.yaml
    jobs/nfs-test.yaml => ./nfs-test-30.yaml
    [root@openEuler-1 lkp-tests]# 
    
    • 1
    • 2
    • 3

    (7)安装子任务的依赖

    [root@openEuler-1 lkp-tests]# lkp split-job jobs/nfs-test.yaml
    jobs/nfs-test.yaml => ./nfs-test-30.yaml
    [root@openEuler-1 lkp-tests]# lkp install ./nfs-test-30.yaml
    make -C /opt/lkp-tests/bin/event
    make: 进入目录“/opt/lkp-tests/bin/event”
    gcc    -c -o wakeup.o wakeup.c
    gcc -static  wakeup.o   -o wakeup
    make: 离开目录“/opt/lkp-tests/bin/event”
    Installing packages procps-ng
    [root@openEuler-1 lkp-tests]#
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    (8)执行子任务

    [root@openEuler-1 lkp-tests]# lkp run ./nfs-test-30.yaml
    RESULT_ROOT=/root/.cache/lkp/result/nfs-test/30/0
    sleep started
    kill 71979 vmstat --timestamp -n 10
    kill 71975 dmesg --follow --decode
    wait for background processes: 71984 71973 meminfo nfs-hang
    Job results saved to /root/.cache/lkp/result/nfs-test/30/0
    [root@openEuler-1 lkp-tests]#
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    (9)根据上述提示,执行的结果均存放在 /root/.cache/lkp/result/nfs-test/30/0 目录,主要生成以下文件

    [root@openEuler-1 lkp-tests]# ls /root/.cache/lkp/result/nfs-test/30/0
    dmesg.json  job.sh    kmsg       matrix.csv      meminfo.gz       nfs-hang      sleep       sleep.time       stats.csv   time
    heartbeat   job.yaml  kmsg.json  matrix.json.gz  meminfo.json.gz  program_list  sleep.json  sleep.time.json  stats.json  time.json
    [root@openEuler-1 lkp-tests]#
    
    • 1
    • 2
    • 3
    • 4
  • 相关阅读:
    C++17 std::filesystem
    (二十五)大数据实战——kafka集群及Kafka-Eagle控制台安装与部署
    富格林:可信技巧隔绝遭遇欺诈
    抖音矩阵系统源码定制开发。
    Python使用contextvars模块传递上下文的底层原理
    常见数据结构
    Python —— 深拷贝&浅拷贝
    走近棒球运动·亚洲职棒大赛·MLB棒球创造营
    Apache Spark 的基本概念和在大数据分析中的应用
    Generalizable NeRF in ICCV‘23
  • 原文地址:https://blog.csdn.net/redrose2100/article/details/127921469