EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
本文介绍Linux系统查看硬件配置及常用调试命令,方便开发者快速了解开发板硬件信息及进行相关调试。触觉智能RK3562开发板演示。
; ]$ ^8 {) _9 o- {; q7 \; c: v0 R7 ~6 m; Q+ G- L/ T
查看DDR- 获取内存信息
* J) G1 ~' J/ U" R) E: z8 c* z
[color=rgba(0, 0, 0, 0.9)]下面数字以MB为单位。 root@ido:/# free -m total used free shared buff/cache availableMem: 1970 287 1316 19 366 1638Swap: 0 0 0- 更详细信息可以使用下面命令查看
. W; E3 B( ^& B2 P$ p; _) w3 `0 v root@ido:/# cat /proc/meminfoMemTotal: 2017532 kB #总内存的大小MemFree: 1347508 kB #系统当前可用的空闲内存大小MemAvailable: 1677712 kB #系统当前可用的内存大小,这包括空闲内存和缓存的内存。Buffers: 32500 kBCached: 309484 kBSwapCached: 0 kBActive: 108648 kBInactive: 433624 kBActive(anon): 1080 kBInactive(anon): 219252 kBActive(file): 107568 kBInactive(file): 214372 kBUnevictable: 8132 kBMlocked: 0 kBSwapTotal: 0 kBSwapFree: 0 kBDirty: 0 kBWriteback: 0 kBAnonPages: 208420 kBMapped: 189896 kBShmem: 20044 kBKReclaimable: 33300 kBSlab: 74908 kBSReclaimable: 33300 kBSUnreclaim: 41608 kBKernelStack: 5328 kBPageTables: 7736 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 1008764 kBCommitted_AS: 1675032 kBVmallocTotal: 263061440 kBVmallocUsed: 11944 kBVmallocChunk: 0 kBPercpu: 720 kBCmaTotal: 16384 kBCmaAllocated: 1600 kBCmaReleased: 14784 kBCmaFree: 2088 kB查看DDR频率下面数字以hz为单位。
$ P/ o) H/ ^% E0 M) _9 ^2 I root@ido:/# free -m total used free shared buff/cache availableMem: 1970 287 1316 19 366 1638Swap: 0 0 0查看存储root@ido:~# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTmmcblk2 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 查看文件系统空间 6 }! L% |, _$ Y. M% ]
root@ido:/# df -hFilesystem Size Used Avail Use% Mounted on/dev/root 12G 3.5G 8.0G 31% /devtmpfs 974M 8.0K 974M 1% /devtmpfs 985M 0 985M 0% /dev/shmtmpfs 197M 7.6M 190M 4% /runtmpfs 5.0M 4.0K 5.0M 1% /run/locktmpfs 985M 0 985M 0% /sys/fs/cgrouptmpfs 197M 0 197M 0% /run/user/0tmpfs 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 8 C! k$ n2 S5 L; ?2 r$ M* y- p
查看CPU- 查看CPU频率$ ^/ F0 @0 E6 V" H) c5 M4 W3 }
[color=rgba(0, 0, 0, 0.9)]下面数字以kHz为单位。
( L9 q4 f3 E# b2 ^3 w! C! [ root@ido:/# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq408000408000408000408000下面数字以毫摄氏度为单位,需要除以1000即35摄氏度。 - 7 H( A4 k" R' _; X1 T/ n6 u
root@ido:/# cat /sys/class/thermal/thermal_zone0/temp34375
4 A( W' x- f4 B) ~* E1 v: o" `% J- Q0 t3 r
查看网络信息- 查看网络节点及IP
5 e N% ^0 o( c! m3 |( e+ k$ t root@ido:~# ifconfigenp1s0: 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
- H* x0 [! ]% c& x" M$ _% [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 ' ]( p, V* t% P. k: c i
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
" e1 }* m' V* a1 c p7 v8 i8 alo: 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 00 ` I/ U( c% \2 ]3 `0 K- ?
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- 查看网关 e w- c( I D3 ~- g3 R/ v
root@ido:~# route -nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp1s0192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp1s0更多Linux常用系统查询命令,请关注下集。 1 P A- N0 B) V6 T/ s
|