5.5.3. 常用操作

5.5.3.1. 查看开发板镜像版本

​使用 uname -a 命令可以查看到系统的版本,执行命令后如下代码块所示,

root@x3dvbx3-micron1G-3200:/userdata# uname -a
Linux x3dvbx3-micron1G-3200 4.14.74 #2 SMP PREEMPT Fri Oct 23 10:47:39 CST 2020 aarch64 GNU/Linux

注解

  • SMP 代表该系统支持对称多处理(Symmetrical Multi-Processing)。

  • PREEMPT 代表系统支持抢占式内核。

  • Oct 23 10:47:39 CST 2020 代表系统镜像发布时间。

  • aarch64 代表系统支持平台为aarch64平台。

5.5.3.2. 查看系统日志

​使用 dmesg 命令可以查看系统日志 x3 Yocoto镜像结果,如下图所示:

root@x3dvbx3-micron1G-3200:/userdata# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.74 (jenkins@sysgbj8) (gcc version 6.5.0 (Linaro GCC 6.5-2018.12)) #2 SMP PREEMPT Fri Oct 23 10:47:39 CST 2020
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Hobot X3 SOC MP DVB
[    0.000000] earlycon: hobot0 at MMIO 0x00000000a5000000 (options '')
[    0.000000] bootconsole [hobot0] enabled
...

xj3 ubuntu系统镜像效果,如下图所示:

root@xj3ubuntu:/userdata# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.87 (root@sysgbj9) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #2 SMP PREEMPT RT Thu Mar 24 20:46:18 CST 2022
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Hobot XJ3 SOC SDB
[    0.000000] earlycon: hobot0 at MMIO 0x00000000a5000000 (options '')
[    0.000000] bootconsole [hobot0] enabled
...

在上板运行程序的时候,假如发生系统错误(比如程序被killed或者mem分配失败等),执行 dmesg 后可以看到系统发生错误的具体原因。

5.5.3.3. 查看BPU使用率

​使用 hrut_somstatus 命令可以查看当前开发板的BPU使用率,执行命令后如下所示:

=====================1=====================
temperature-->
  BOARD    : 31.5 (C)
  CPU      : 33.7 (C)
cpu frequency-->
        min       cur     max
  cpu0: 240000        1200000 1200000
  cpu1: 240000        1200000 1200000
  cpu2: 240000        1200000 1200000
  cpu3: 240000        1200000 1200000
bpu status information---->
        min         cur       max       ratio
  bpu0: 400000000     1000000000      1000000000      0      // bpu核0使用率
  bpu1: 400000000     1000000000      1000000000      0      // bpu核1使用率
root@x3dvbx3-micron1G-3200:~#