本文介紹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常用系統查詢命令,請關注下集。
-
Linux
+關注
關注
87文章
11311瀏覽量
209688 -
Linux系統
+關注
關注
4文章
594瀏覽量
27409 -
開發板
+關注
關注
25文章
5064瀏覽量
97587 -
常用命令
+關注
關注
0文章
3瀏覽量
1303 -
RK3562
+關注
關注
0文章
29瀏覽量
56
發布評論請先 登錄
相關推薦
評論