实用干货!嵌入式开发学习必备-RK3562演示Linux常用系统查询命令(上)

360影视 2024-12-31 18:30 3

摘要:本文介绍Linux系统查看硬件配置及常用调试命令,方便开发者快速了解开发板硬件信息及进行相关调试。触觉智能RK3562开发板演示,搭载4核A53处理器,主频高达2.0GHz;内置独立1Tops算力NPU,可应用于物联网网关、平板电脑、智能家居、教育电子、工业显

本文介绍Linux系统查看硬件配置及常用调试命令,方便开发者快速了解开发板硬件信息及进行相关调试。触觉智能RK3562开发板演示,搭载4核A53处理器,主频高达2.0GHz;内置独立1Tops算力NPU,可应用于物联网网关、平板电脑、智能家居、教育电子、工业显示与控制等行业。

查看DDR

获取内存信息

下面数字以MB为单位。

root@ido:/# free -m

total used free shared buff/cache available

Mem: 1970 287 1316 19 366 1638

Swap: 0 0 0

更详细信息可以使用下面命令查看

root@ido:/# cat /proc/meminfo

MemTotal: 2017532 kB #总内存的大小

MemFree: 1347508 kB #系统当前可用的空闲内存大小

MemAvailable: 1677712 kB #系统当前可用的内存大小,这包括空闲内存和缓存的内存。

Buffers: 32500 kB

Cached: 309484 kB

SwapCached: 0 kB

Active: 108648 kB

Inactive: 433624 kB

Active(anon): 1080 kB

Inactive(anon): 219252 kB

Active(file): 107568 kB

Inactive(file): 214372 kB

Unevictable: 8132 kB

Mlocked: 0 kB

SwapTotal: 0 kB

SwapFree: 0 kB

Dirty: 0 kB

Writeback: 0 kB

AnonPages: 208420 kB

Mapped: 189896 kB

Shmem: 20044 kB

KReclaimable: 33300 kB

Slab: 74908 kB

SReclaimable: 33300 kB

SUnreclaim: 41608 kB

KernelStack: 5328 kB

PageTables: 7736 kB

NFS_Unstable: 0 kB

Bounce: 0 kB

WritebackTmp: 0 kB

CommitLimit: 1008764 kB

Committed_AS: 1675032 kB

VmallocTotal: 263061440 kB

VmallocUsed: 11944 kB

VmallocChunk: 0 kB

Percpu: 720 kB

CmaTotal: 16384 kB

CmaAllocated: 1600 kB

CmaReleased: 14784 kB

CmaFree: 2088 kB

查看DDR频率

下面数字以hz为单位。

root@ido:/# free -m

total used free shared buff/cache available

Mem: 1970 287 1316 19 366 1638

Swap: 0 0 0

查看存储

查看物理存储空间

root@ido:~# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

mmcblk2 179:0 0 14.6G 0 disk

├─mmcblk2p1 179:1 0 4M 0 part

├─mmcblk2p2 179:2 0 4M 0 part

├─mmcblk2p3 179:3 0 64M 0 part

├─mmcblk2p4 179:4 0 128M 0 part

├─mmcblk2p5 179:5 0 32M 0 part

├─mmcblk2p6 179:6 0 2G 0 part /media/ido/userdata

├─mmcblk2p7 179:7 0 128M 0 part /media/ido/oem

└─mmcblk2p8 179:8 0 12.2G 0 part /

mmcblk2boot0 179:32 0 4M 1 disk

mmcblk2boot1 179:64 0 4M 1 disk

查看文件系统空间

root@ido:/# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/root 12G 3.5G 8.0G 31% /

devtmpfs 974M 8.0K 974M 1% /dev

tmpfs 985M 0 985M 0% /dev/shm

tmpfs 197M 7.6M 190M 4% /run

tmpfs 5.0M 4.0K 5.0M 1% /run/lock

tmpfs 985M 0 985M 0% /sys/fs/cgroup

tmpfs 197M 0 197M 0% /run/user/0

tmpfs 197M 8.0K 197M 1% /run/user/1001

/dev/mmcblk2p7 121M 12M 101M 11% /media/ido/oem

/dev/mmcblk2p6 2.0G 36K 1.8G 1% /media/ido/userdata

查看CPU

查看CPU频率

下面数字以kHz为单位。

root@ido:/# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

408000

408000

408000

408000

查看CPU温度

下面数字以毫摄氏度为单位,需要除以1000即35摄氏度。

root@ido:/# cat /sys/class/thermal/thermal_zone0/temp

34375

查看网络信息

查看网络节点及IP

root@ido:~# ifconfig

enp1s0: flags=4163 mtu 1500

inet 192.168.0.96 netmask 255.255.255.0 broadcast 192.168.0.255

inet6 fe80::a60a:bffe:32d2:8a02 prefixlen 64 scopeid 0x20

ether 9a:55:02:97:d9:a2 txqueuelen 1000 (Ethernet)

RX packets 121 bytes 12817 (12.8 KB)

RX errors 0 dropped 2 overruns 0 frame 0

TX packets 31 bytes 5749 (5.7 KB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device interrupt 90 base 0xd000

eth0: flags=4099 mtu 1500

ether 8a:18:a3:a0:63:c9 txqueuelen 1000 (Ethernet)

RX packets 0 bytes 0 (0.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 0 bytes 0 (0.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device interrupt 71

eth2: flags=4099 mtu 1500

ether 8e:18:a3:a0:63:c9 txqueuelen 1000 (Ethernet)

RX packets 0 bytes 0 (0.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 0 bytes 0 (0.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device interrupt 75

lo: flags=73 mtu 65536

inet 127.0.0.1 netmask 255.0.0.0

inet6 ::1 prefixlen 128 scopeid 0x10

loop txqueuelen 1000 (Local Loopback)

RX packets 192 bytes 14785 (14.7 KB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 192 bytes 14785 (14.7 KB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099 mtu 1500

ether c0:f5:35:12:5a:40 txqueuelen 1000 (Ethernet)

RX packets 0 bytes 0 (0.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 0 bytes 0 (0.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@ido:~# route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp1s0

192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp1s0

更多Linux常用系统查询命令,请关注下集。

来源:Industio触觉智能

相关推荐