HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
  • GM-3568JHF

    • 1. Introduction

      • GM-3568JHF Introduction
    • 2. Quick Start

      • 01 Environment Construction
      • 02 Compilation Instructions
      • 03 Burning Guide
      • 04 Debugging Tools
      • 05 Software Update
      • 06 View information
      • 07 Test Command
      • 08 Application Compilation
      • 09 Source code acquisition
    • 3. Peripherals and Interfaces

      • USB
      • Display and touch
      • Ethernet
      • WIFI
      • Bluetooth
      • TF-Card
      • Audio
      • Serial Port
      • CAN
      • RTC
    • 4. Application Development

      • 01 UART read and write case
      • 02 Key detection case
      • 03 LED light flashing case
      • 04 MIPI screen detection case
      • 05 Read USB device information example
      • 06 FAN Detection Case
      • 07 FPGA FSPI Communication Case
      • 08 FPGA DMA read and write case
      • 09 GPS debugging case
      • 10 Ethernet Test Cases
      • 11 RS485 reading and writing examples
      • 12 FPGA IIC read and write examples
      • 13 PN532 NFC card reader case
      • 14 TF card reading and writing case
    • 5. QT Development

      • 01 ARM64 cross compiler environment construction
      • 02 QT program added automatic startup service
    • 6. Others

      • 01 Modification of the root directory file system
      • 02 System auto-start service

06 View information

Most of the content introduced in this chapter is not only applicable to the board, but also to the Ubuntu system in the development host. Please try to execute related commands on both platforms to view the information and compare the differences.

1 A preliminary exploration of the /proc directory

Linux does not provide a task manager like Windows, but it records system operation information in files under the /proc directory. Users can obtain corresponding system information by accessing files in this directory.

Please execute the following command in the terminal of the board to view the contents of the /proc directory:

Execute the following command in the terminal of the board: ls /proc

PROC

The information contained in each file in this directory is shown in the following table.

Table/proc file structure

file nameeffect
pid*Usually a number, indicating the PID number of the process. Each running process in the system has a corresponding directory (such as /proc/1234), which is used to record all information about the process. The operating system regards each application as a process.
selfSoft link, pointing to the directory of the current process. You /proc/self/can directly obtain the current process information by accessing it without manually querying the PID.
thread-selfSoft link, pointing to the current thread. Accessing this file is equivalent to accessing 当前进程PID/task/当前线程TIDthe content of . A process can contain multiple threads, and the threads jointly support the operation of the process.
versionRecord the currently running kernel version, which can uname –rbe viewed through the command.
cpuinfoRecord the configuration information of the CPU in the system, such as the provider, model, number of cores, frequency, etc.
modulesRecords the kernel module information currently loaded by the system.
meminfoRecords system memory usage (such as free/used memory). freeThe command obtains data by reading this file.
filesystemsRecords the file system types supported by the kernel. If no file system is specified when mounting a device, mountthe types listed in this file will be tried (excluding nodevfile systems marked with ).

By accessing the contents of the /proc folder, we can get the system information we want.

2 View CPU information

The /proc/cpuinfo file stores CPU information and can be viewed using the following command:

cat /proc/cpuinfo
PROC_2

3 Check the kernel version

The /proc/version file stores the kernel version information, which we can obtain through the following command.

cat /proc/version
PROC_3

From the above picture we can see that the currently used kernel version is 6.1.99.

You can also get it through the following command:

uname -a
PROC_4

4 View memory information

The kernel records memory usage in the /proc/meminfo file. We can understand our memory usage by reading the contents of this file:

The following is the case with 2GB of memory

cat /proc/meminfo
PROC_5

In actual applications, we generally do not read the contents of the file directly, but use the following command to obtain relevant information about the memory.

Use the free command to view the system's memory size:

free
PROC_6

5 Check the memory capacity

The /proc/partitions file contains the partition information of the memory. You can check the partition information to understand the capacity of the onboard FLASH memory.

You can use the following command to view:

cat /proc/partitions

The following figure shows the command output information using a 32GB eMMC board.

PROC_7

The data blocks starting with mmcblk belong to the eMMC memory.

6 Check task progress

There are many folders named with numbers under the /proc folder. These folders are used to record the status of the currently running processes. The file names are their pid numbers. Each process corresponds to a pid number for identification. The contents contained in these process folders are basically the same. Use the ls command to view the contents of the folder with pid 1, as shown in the figure below. Among them, fd records the file description used by the current process, mountinfo records the mount information, and mem records the memory usage of the process.

ls /proc/1
PROC_8

In addition to the above method, the top command is also commonly used. The function of this command is similar to the Windows Task Manager. The execution effect is shown in the figure above. This command can update the usage of each process in real time. Press the "q" key or "Ctrl + C" to exit the command.

top
PROC_9

7 View supported file systems

/proc/filesystems can be used to view the file system types supported by the kernel, as shown in the figure above. In the figure, some file systems are preceded by the "nodev" sign, indicating that these file systems do not need to mount block devices, such as network file systems nfs/nfs4, pseudo file systems sysfs, etc.

cat /proc/filesystems
PROC_10

8 Check the current CPU frequency

In addition to the /proc directory, you can also view some system-related information in the /sys directory. For example, the file /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq contains the current frequency information of CPU0. If the system has this file, you can output its content to view it:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
PROC_11

As shown in the output in the figure above, it means that the current main frequency of CPU0 is 408MHz.

The CPU of LubanCat-RK3562/RK3566/RK3568 series boards has the function of frequency modulation. When your load is low, it will automatically reduce the frequency to save energy. When a high load is required, it will automatically increase the frequency to improve performance.

ls -g /sys/devices/system/cpu/cpu0/cpufreq/
PROC_12
Edit this page on GitHub
Last Updated:
Contributors: zsl, zwhuang
Prev
05 Software Update
Next
07 Test Command