加入星計(jì)劃,您可以享受以下權(quán)益:

  • 創(chuàng)作內(nèi)容快速變現(xiàn)
  • 行業(yè)影響力擴(kuò)散
  • 作品版權(quán)保護(hù)
  • 300W+ 專業(yè)用戶
  • 1.5W+ 優(yōu)質(zhì)創(chuàng)作者
  • 5000+ 長期合作伙伴
立即加入
  • 正文
  • 相關(guān)推薦
申請(qǐng)入駐 產(chǎn)業(yè)圖譜

實(shí)用干貨!嵌入式開發(fā)學(xué)習(xí)必備-RK3562演示Linux常用系統(tǒng)查詢命令(上)觸覺智能出品

2024/12/31
235
加入交流群
掃碼加入
獲取工程師必備禮包
參與熱點(diǎn)資訊討論

本文介紹Linux系統(tǒng)查看硬件配置及常用調(diào)試命令,方便開發(fā)者快速了解開發(fā)板硬件信息及進(jìn)行相關(guān)調(diào)試。觸覺智能RK3562開發(fā)板演示,搭載4核A53處理器,主頻高達(dá)2.0GHz;內(nèi)置獨(dú)立1Tops算力NPU,可應(yīng)用于物聯(lián)網(wǎng)網(wǎng)關(guān)、平板電腦、智能家居、教育電子、工業(yè)顯示與控制等行業(yè)。

查看DDR
獲取內(nèi)存信息
下面數(shù)字以MB為單位。

root@ido:/# free -m
total used free shared buff/cache available
Mem: 1970 287 1316 19 366 1638
Swap: 0 0 0
更詳細(xì)信息可以使用下面命令查看
root@ido:/# cat /proc/meminfo
MemTotal: 2017532 kB #總內(nèi)存的大小
MemFree: 1347508 kB #系統(tǒng)當(dāng)前可用的空閑內(nèi)存大小
MemAvailable: 1677712 kB #系統(tǒng)當(dāng)前可用的內(nèi)存大小,這包括空閑內(nèi)存和緩存的內(nèi)存。
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頻率
下面數(shù)字以hz為單位。
root@ido:/# free -m
total used free shared buff/cache available
Mem: 1970 287 1316 19 366 1638
Swap: 0 0 0

圖片

圖片
查看存儲(chǔ)
查看物理存儲(chǔ)空間
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
查看文件系統(tǒng)空間

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頻率
下面數(shù)字以kHz為單位。

root@ido:/# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
408000
408000
408000
408000
查看CPU溫度

下面數(shù)字以毫攝氏度為單位,需要除以1000即35攝氏度。
root@ido:/# cat /sys/class/thermal/thermal_zone0/temp
34375

圖片圖片
查看網(wǎng)絡(luò)信息
查看網(wǎng)絡(luò)節(jié)點(diǎn)及IP
root@ido:~# ifconfig
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> 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<link>
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<UP,BROADCAST,MULTICAST> 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<UP,BROADCAST,MULTICAST> 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<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
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<UP,BROADCAST,MULTICAST> 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
查看網(wǎng)關(guān)
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常用系統(tǒng)查詢命令,請(qǐng)關(guān)注下集。

相關(guān)推薦

登錄即可解鎖
  • 海量技術(shù)文章
  • 設(shè)計(jì)資源下載
  • 產(chǎn)業(yè)鏈客戶資源
  • 寫文章/發(fā)需求
立即登錄