项目场景:
在眺望电子TW-IMX6DL-EVM开发板上查询linux系统基本信息。
编译环境及开发包: 主机:ubuntu18.04
交叉编译器:arm-linux-gnueabihf-gcc
QT5.12.8:qt-everywhere-opensource-src-5.12.8
开发板:TW-IMX6DL-EVM
Linux:Linux-4.1.15
串口工具:Xshell
注意:本文章的所有命令涉及到的路径均为眺望电子官方环境路径,需根据自身实际环境改变。本文所演示的平台来自于眺望电子 iMX6 ARM嵌入式平台,这是一个基于NXP iMX6 ARM处理器,支持单核/双核Cortex-A9的核心板。
解决方案:
1.查看系统内核版本
使用uname命令。
root@imx6dlsabresd:/# uname -a
Linux imx6dlsabresd 4.1.15-imx6 #32 SMP PREEMPT Tue Dec 15 15:48:00 CST 2020 armv7l armv7l armv7l GNU/Linux
2.查看CPU信息
root@imx6dlsabresd:/# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
processor : 1
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)
Revision : 0000
Serial : 0000000000000000
3.查看计算机名
root@imx6dlsabresd:/# hostname
imx6dlsabresd
4.列出所有USB设备
root@imx6dlsabresd:/# lsusb -tv
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ci_hdrc/1p, 480M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=, Driver=, 480M
5.列出加载的内核模块
root@imx6dlsabresd:/# lsmod
Module Size Used by
6.查看环境变量
root@imx6dlsabresd:/# env
HZ=100
QML2_IMPORT_PATH=/usr/lib/qt5/qml
SHELL=/bin/sh
TERM=vt100
HUSHLOGIN=FALSE
USER=root
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
PWD=/
EDITOR=vi
QT_QPA_FONTDIR=/usr/lib/fonts
PS1=\u@\h:\w\$
SHLVL=1
HOME=/home/root
LOGNAME=root
QT_PLUGIN_PATH=/usr/lib/qt5/plugins
_=/usr/bin/env
OLDPWD=/home/wifi
7.获取内核启动信息
在系统的“/proc/cmdline”文件存放着内核的启动信息,使用“cat”命令查看系统启动信息
root@imx6dlsabresd:/# cat /proc/cmdline
console=ttymxc0,115200 root=/dev/mmcblk3p2 rootwait rw video=mxcfb0:dev=ldb,if=LVDS666,bpp=32 ldb=spl0 fbmem=20M
8.查看主机CPU信息
root@imx6dlsabresd:/#cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
processor : 1
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)
Revision : 0000
Serial : 0000000000000000
9.查看文件系统信息
root@imx6dlsabresd:~# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev devtmpfs
nodev debugfs
nodev securityfs
nodev sockfs
nodev pipefs
nodev rpc_pipefs
nodev devpts
ext3
ext2
ext4
vfat
nodev nfs
nodev nfs4
nodev jffs2
nodev autofs
fuseblk
nodev fuse
nodev fusectl
nodev ubifs
10. 主机中断信息
root@imx6dlsabresd:~# cat /proc/interrupts
CPU0 CPU1
16: 76307 10450 GIC 29 Edge twd
17: 823 0 GPC 55 Level i.MX Timer Tick
23: 2 0 GPC 31 Level 2008000.ecspi
24: 0 0 GPC 32 Level 200c000.ecspi
25: 2032 0 GPC 26 Level 2020000.serial
26: 0 0 GPC 47 Level 202c000.ssi
27: 0 0 GPC 50 Level 2034000.asrc
28: 0 0 GPC 3 Edge VPU_JPG_IRQ
29: 0 0 GPC 12 Level VPU_CODEC_IRQ
42: 0 0 gpio-mxc 7 Edge ilitek_touch_irq
251: 0 0 gpio-mxc 12 Edge 2198000.usdhc cd
271: 0 0 GPC 80 Level 20bc000.wdog
274: 0 0 GPC 49 Level imx_thermal
286: 2 0 GPC 2 Level sdma
288: 0 0 GPC 43 Level 2184000.usb
289: 64 0 GPC 40 Level 2184200.usb
290: 16151 0 GPC 118 Level 2188000.ethernet
291: 0 0 GPC 119 Level 2188000.ethernet
292: 52 0 GPC 23 Level mmc1
293: 0 0 GPC 24 Level mmc2
294: 4746 0 GPC 25 Level mmc3
295: 1 0 GPC 36 Level 21a0000.i2c
296: 303 0 GPC 37 Level 21a4000.i2c
297: 48 0 GPC 38 Level 21a8000.i2c
299: 0 0 GPC 18 Level vdoa
300: 0 0 GPC 27 Level 21e8000.serial
301: 0 0 GPC 28 Level 21ec000.serial
302: 0 0 GPC 29 Level 21f0000.serial
303: 0 0 GPC 30 Level 21f4000.serial
304: 1 0 GPC 6 Level 2400000.ipu
305: 0 0 GPC 5 Level 2400000.ipu
306: 0 0 GPC 107 Level mmdc_1
307: 0 0 GPC 112 Level mmdc_1
310: 14 0 GIC 137 Level 2101000.jr0
311: 0 0 GIC 138 Level 2102000.jr1
IPI0: 0 0 CPU wakeup interrupts
IPI1: 0 113 Timer broadcast interrupts
IPI2: 1625 2643 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 6 9 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 2 0 IRQ work interrupts
IPI7: 0 0 completion interrupts
Err: 0
11.查看输入设备信息
root@imx6dlsabresd:~# cat /proc/bus/input/devices
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="ilitek_ts"
P: Phys=
S: Sysfs=/devices/soc0/soc/2100000.aips-bus/21a8000.i2c/i2c-2/2-0041/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=650000 0
12.查看内存映射
root@imx6dlsabresd:~# cat /proc/iomem
00110000-00111fff : /soc/dma-apbh@00110000
00120000-00128fff : 120000.hdmi_core
00130000-00133fff : galcore register region
00134000-00137fff : galcore register region
00905000-0091ffff : 905000.sram
02008000-0200bfff : /soc/aips-bus@02000000/spba-bus@02000000/ecspi@02008000
0200c000-0200ffff : /soc/aips-bus@02000000/spba-bus@02000000/ecspi@0200c000
02020000-02023fff : /soc/aips-bus@02000000/spba-bus@02000000/serial@02020000
0202c000-0202ffff : /soc/aips-bus@02000000/spba-bus@02000000/ssi@0202c000
02034000-02037fff : /soc/aips-bus@02000000/spba-bus@02000000/asrc@02034000
02080000-02083fff : /soc/aips-bus@02000000/pwm@02080000
02090000-02093fff : /soc/aips-bus@02000000/flexcan@02090000
02094000-02097fff : /soc/aips-bus@02000000/flexcan@02094000
0209c000-0209ffff : /soc/aips-bus@02000000/gpio@0209c000
020a0000-020a3fff : /soc/aips-bus@02000000/gpio@020a0000
020a4000-020a7fff : /soc/aips-bus@02000000/gpio@020a4000
020a8000-020abfff : /soc/aips-bus@02000000/gpio@020a8000
020ac000-020affff : /soc/aips-bus@02000000/gpio@020ac000
020b0000-020b3fff : /soc/aips-bus@02000000/gpio@020b0000
020b4000-020b7fff : /soc/aips-bus@02000000/gpio@020b4000
020bc000-020bffff : /soc/aips-bus@02000000/wdog@020bc000
020c9000-020c9fff : /soc/aips-bus@02000000/usbphy@020c9000
020ca000-020cafff : /soc/aips-bus@02000000/usbphy@020ca000
020e0000-020e3fff : /soc/aips-bus@02000000/iomuxc@020e0000
020ec000-020effff : /soc/aips-bus@02000000/sdma@020ec000
02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
02184800-021849ff : /soc/aips-bus@02100000/usbmisc@02184800
02188000-0218bfff : /soc/aips-bus@02100000/ethernet@02188000
02194000-02197fff : mmc1
02198000-0219bfff : mmc2
0219c000-0219ffff : mmc3
021a0000-021a3fff : /soc/aips-bus@02100000/i2c@021a0000
021a4000-021a7fff : /soc/aips-bus@02100000/i2c@021a4000
021a8000-021abfff : /soc/aips-bus@02100000/i2c@021a8000
021b8000-021bbfff : /soc/aips-bus@02100000/weim@021b8000
021bc000-021bffff : /soc/aips-bus@02100000/ocotp@021bc000
021d8000-021dbfff : /soc/aips-bus@02100000/audmux@021d8000
021e4000-021e7fff : /soc/aips-bus@02100000/vdoa@021e4000
021e8000-021ebfff : /soc/aips-bus@02100000/serial@021e8000
021ec000-021effff : /soc/aips-bus@02100000/serial@021ec000
021f0000-021f3fff : /soc/aips-bus@02100000/serial@021f0000
021f4000-021f7fff : /soc/aips-bus@02100000/serial@021f4000
02400000-027fffff : 2400000.ipu
10000000-8fffffff : System RAM
10008000-10c4f0cf : Kernel code
10cbe000-10da5a03 : Kernel data
13. 查看系统资源信息
查看系统内存使用情况,使用free命令
root@imx6dlsabresd:~# free -h
total used free shared buff/cache available
Mem: 2.0G 151M 1.8G 548K 31M 1.8G
Swap: 0B 0B 0B
查看系统磁盘使用情况,使用df命令。
root@imx6dlsabresd:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 6.5G 989M 5.2G 16% /
devtmpfs 848M 4.0K 848M 1% /dev
tmpfs 1009M 140K 1009M 1% /run
tmpfs 1009M 404K 1008M 1% /var/volatile
/dev/mmcblk3p1 500M 7.1M 493M 2% /run/media/mmcblk3p1
1.# free -m # 查看内存使用量和交换区使用量
2.# df -h # 查看各分区使用情况
3.# du -sh <目录名> # 查看指定目录的大小
4.# grep MemTotal /proc/meminfo # 查看内存总量
5.# grep MemFree /proc/meminfo # 查看空闲内存量
6.# uptime # 查看系统运行时间、用户数、负载
7.# cat /proc/loadavg # 查看系统负载
14. 磁盘和分区
查看挂接的分区状态
root@imx6dlsabresd:~# mount | column -t
/dev/mmcblk3p2 on / type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=868312k,nr_inodes=217078,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/mmcblk3p1 on /run/media/mmcblk3p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
查看所有分区
root@imx6dlsabresd:~# fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mmcblk3: 7.3 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa5271603
Device Boot Start End Sectors Size Id Type
/dev/mmcblk3p1 20480 1044479 1024000 500M c W95 FAT32 (LBA)
/dev/mmcblk3p2 1228800 15269887 14041088 6.7G 83 Linux
Disk /dev/mmcblk3boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk3boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
15.查看网络信息
查看所有网络接口的属性
root@imx6dlsabresd:~# ifconfig
eth0 Link encap:Ethernet HWaddr 7e:e9:74:47:7f:ef
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:612 (612.0 B) TX bytes:612 (612.0 B)
查看路由表
root@imx6dlsabresd:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
查看所有监听端口和建立的连接
root@imx6dlsabresd:~# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 7 [ ] DGRAM 4493 /dev/log
unix 2 [ ] DGRAM 5129
unix 3 [ ] STREAM CONNECTED 4245 /var/run/dbus/system_bus_socket
unix 3 [ ] DGRAM 356
unix 3 [ ] STREAM CONNECTED 4505 /var/run/dbus/system_bus_socket
unix 2 [ ] DGRAM 5147
unix 3 [ ] STREAM CONNECTED 4504
unix 3 [ ] STREAM CONNECTED 1023
unix 3 [ ] STREAM CONNECTED 4244
unix 3 [ ] STREAM CONNECTED 847
unix 3 [ ] STREAM CONNECTED 4513 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 1022
unix 3 [ ] STREAM CONNECTED 848
unix 2 [ ] DGRAM 4496
unix 3 [ ] STREAM CONNECTED 5130
unix 2 [ ] DGRAM 1019
unix 3 [ ] DGRAM 357
unix 2 [ ] DGRAM 4543
16.查看进程信息
查看所有进程
root@imx6dlsabresd:~# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 00:00 ? 00:00:07 init [5]
root 2 0 0 00:00 ? 00:00:00 [kthreadd]
root 3 2 0 00:00 ? 00:00:00 [ksoftirqd/0]
root 5 2 0 00:00 ? 00:00:00 [kworker/0:0H]
root 6 2 0 00:00 ? 00:00:00 [kworker/u4:0]
root 7 2 0 00:00 ? 00:00:00 [rcu_preempt]
root 8 2 0 00:00 ? 00:00:00 [rcu_sched]
root 9 2 0 00:00 ? 00:00:00 [rcu_bh]
root 10 2 0 00:00 ? 00:00:00 [migration/0]
root 11 2 0 00:00 ? 00:00:00 [migration/1]
root 12 2 0 00:00 ? 00:00:00 [ksoftirqd/1]
root 14 2 0 00:00 ? 00:00:00 [kworker/1:0H]
root 15 2 0 00:00 ? 00:00:00 [khelper]
root 16 2 0 00:00 ? 00:00:00 [kdevtmpfs]
root 17 2 0 00:00 ? 00:00:00 [perf]
root 18 2 0 00:00 ? 00:00:00 [writeback]
root 19 2 0 00:00 ? 00:00:00 [crypto]
root 20 2 0 00:00 ? 00:00:00 [bioset]
root 21 2 0 00:00 ? 00:00:00 [kblockd]
root 22 2 0 00:00 ? 00:00:00 [ata_sff]
root 23 2 0 00:00 ? 00:00:00 [ipu1_task]
root 24 2 0 00:00 ? 00:00:00 [ipu1_task]
root 25 2 0 00:00 ? 00:00:00 [kworker/0:1]
root 26 2 0 00:00 ? 00:00:00 [cfg80211]
root 27 2 0 00:00 ? 00:00:00 [rpciod]
root 28 2 0 00:00 ? 00:00:00 [kswapd0]
root 29 2 0 00:00 ? 00:00:00 [fsnotify_mark]
root 30 2 0 00:00 ? 00:00:00 [nfsiod]
root 67 2 0 00:00 ? 00:00:00 [kworker/1:1]
root 68 2 0 00:00 ? 00:00:00 [spi0]
root 69 2 0 00:00 ? 00:00:00 [spi1]
root 73 2 0 00:00 ? 00:00:00 [ci_otg]
root 74 2 0 00:00 ? 00:00:00 [kworker/1:2]
root 75 2 0 00:00 ? 00:00:00 [irq/42-ilitek_t]
root 76 2 0 00:00 ? 00:00:00 [cfinteractive]
root 77 2 0 00:00 ? 00:00:00 [irq/292-mmc1]
root 78 2 0 00:00 ? 00:00:00 [irq/293-mmc2]
root 79 2 0 00:00 ? 00:00:00 [irq/251-2198000]
root 80 2 0 00:00 ? 00:00:00 [irq/294-mmc3]
root 81 2 0 00:00 ? 00:00:00 [vpu_wq]
root 82 2 0 00:00 ? 00:00:00 [galcore workque]
root 83 2 0 00:00 ? 00:00:00 [kworker/u4:2]
root 84 2 0 00:00 ? 00:00:01 [mmcqd/3]
root 85 2 0 00:00 ? 00:00:00 [mmcqd/3boot0]
root 86 2 0 00:00 ? 00:00:00 [mmcqd/3boot1]
root 87 2 0 00:00 ? 00:00:00 [mmcqd/3rpmb]
root 88 2 0 00:00 ? 00:00:00 [galcore daemon ]
root 89 2 0 00:00 ? 00:00:00 [galcore daemon ]
root 152 2 0 00:00 ? 00:00:00 [ipv6_addrconf]
root 153 2 0 00:00 ? 00:00:00 [krfcommd]
root 154 2 0 00:00 ? 00:00:00 [deferwq]
root 155 2 0 00:00 ? 00:00:00 [irq/274-imx_the]
root 156 2 0 00:00 ? 00:00:00 [kworker/0:1H]
root 157 2 0 00:00 ? 00:00:00 [kjournald]
root 160 2 0 00:00 ? 00:00:00 [kworker/1:1H]
root 194 1 0 00:00 ? 00:00:00 /sbin/udevd -d
message+ 579 1 0 00:00 ? 00:00:00 /usr/bin/dbus-daemon --system
root 583 1 0 00:00 ? 00:00:00 /usr/sbin/connmand
root 587 1 0 00:00 ? 00:00:00 /usr/sbin/inetd
root 593 1 0 00:00 ? 00:00:00 /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B
rpc 624 1 0 00:00 ? 00:00:00 /usr/sbin/rpcbind
1000 631 1 0 00:00 ? 00:00:00 /usr/sbin/rpc.statd
root 640 1 0 00:00 ? 00:00:00 /usr/sbin/atd -f
root 655 1 0 00:00 ? 00:00:00 /sbin/syslogd
root 657 1 0 00:00 ? 00:00:00 /sbin/klogd
avahi 665 1 0 00:00 ? 00:00:00 avahi-daemon: running [imx6dlsabresd.local]
avahi 666 665 0 00:00 ? 00:00:00 avahi-daemon: chroot helper
root 678 1 0 00:00 ? 00:00:00 /usr/sbin/ofonod
root 687 1 0 00:00 ? 00:00:00 /usr/sbin/crond
root 710 1 0 00:00 ? 00:00:00 /bin/bash /etc/init.d/rc_mxc.S
root 712 710 0 00:00 ttymxc0 00:00:00 -sh
root 836 2 0 02:05 ? 00:00:00 [kworker/0:2]
root 848 712 0 02:10 ttymxc0 00:00:00 ps -ef
实时显示进程状态
root@imx6dlsabresd:~# top
top - 03:42:35 up 3:42, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 73 total, 1 running, 72 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.3 sy, 0.0 ni, 99.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 2064744 total, 1873872 free, 155792 used, 35080 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 1848768 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
851 root 20 0 3244 1840 1508 R 0.7 0.1 0:00.14 top
1 root 20 0 1712 1116 1048 S 0.0 0.1 0:07.22 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.12 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0.0 0.0 0:00.12 kworker/u4:0
7 root 20 0 0 0 0 S 0.0 0.0 0:00.22 rcu_preempt
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
11 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
14 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
17.查看磁盘分区
系统板载4G eMMC,一共分为2个分区,查看/proc/partitions文件可看到各分区信息
root@imx6dlsabresd:~# cat /proc/partitions
major minor #blocks name
1 0 65536 ram0
1 1 65536 ram1
1 2 65536 ram2
1 3 65536 ram3
1 4 65536 ram4
1 5 65536 ram5
1 6 65536 ram6
1 7 65536 ram7
1 8 65536 ram8
1 9 65536 ram9
1 10 65536 ram10
1 11 65536 ram11
1 12 65536 ram12
1 13 65536 ram13
1 14 65536 ram14
1 15 65536 ram15
179 0 7634944 mmcblk3
179 1 512000 mmcblk3p1
179 2 7020544 mmcblk3p2
179 24 512 mmcblk3rpmb
179 16 4096 mmcblk3boot1
179 8 4096 mmcblk3boot0
18.查看支持的文件系统
系统支持多种常见文件系统,如ext2、fat等,具体支持哪些文件系统,可通过查看/proc/filesystem文件
root@imx6dlsabresd:~# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev devtmpfs
nodev debugfs
nodev securityfs
nodev sockfs
nodev pipefs
nodev rpc_pipefs
nodev devpts
ext3
ext2
ext4
vfat
nodev nfs
nodev nfs4
nodev jffs2
nodev autofs
fuseblk
nodev fuse
nodev fusectl
nodev ubifs
19.cpu温度读取
root@imx6dlsabresd:~# cat /sys/devices/virtual/thermal/thermal_zone0/temp
45530