Linux下/proc目录简介
1、/proc目录
Linux 内核提供了一种通过 /proc 文件系统,在运行时访问内核内部数据结构、改变内核设置的机制。
proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间。它以文件系统的方式为访问系统内核数据的操作提供接口。
用户和应用程序可以通过proc得到系统的信息,并可以改变内核的某些参数。
由于系统的信息,如进程,是动态改变的,所以用户或应用程序读取proc文件时,proc文件系统是动态从系统内核读出所需信息并提交的。下面列出的这些文件或子文件夹,并不是都是在你的系统中存在,这取决于你的内核配置和装载的模块。
另外,在/proc下还有三个很重要的目录:net,scsi和sys。
sys目录是可写的,可以通过它来访问或修改内核的参数,而net和scsi则依赖于内核配置。例如,如果系统不支持scsi,则scsi 目录不存在。
除了以上介绍的这些,还有的是一些以数字命名的目录,它们是进程目录。
系统中当前运行的每一个进程都有对应的一个目录在/proc下,以进程的 PID号为目录名,它们是读取进程信息的接口。
而self目录则是读取进程本身的信息接口,是一个link。
2、子文件或子文件夹
/proc/buddyinfo 每个内存区中的每个order有多少块可用,和内存碎片问题有关
# cat /proc/buddyinfo
Node 0, zone DMA 0 0 0 1 1 1 1 0 1 1 3
Node 0, zone DMA32 5755 4231 2172 92 0 0 0 0 0 0 0
Node 0, zone Normal 1468 851 334 336 181 141 49 17 0 0 0
/proc/cmdline 启动时传递给kernel的参数信息
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-39-generic root=UUID=41f52697-0fa1-44a3-b84a-08a31ee717e1 ro quiet splash vt.handoff=7
/proc/cpuinfo cpu的信息
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping : 3
microcode : 0xdc
cpu MHz : 1311.902
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips : 6599.98
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping : 3
microcode : 0xdc
cpu MHz : 1305.288
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips : 6599.98
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
/proc/crypto 内核使用的所有已安装的加密密码及细节
/proc/devices 已经加载的设备并分类
# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
5 ttyprintk
6 lp
7 vcs
10 misc
13 input
21 sg
29 fb
89 i2c
99 ppdev
108 ppp
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
203 cpu/cpuid
204 ttyMAX
226 drm
239 mei
240 aux
241 hidraw
242 ttyDBC
243 vfio
244 bsg
245 watchdog
246 ptp
247 pps
248 cec
249 rtc
250 dax
251 dimmctl
252 ndctl
253 tpm
254 gpiochip
Block devices:
7 loop
8 sd
9 md
11 sr
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp
259 blkext
/proc/dma 已注册使用的ISA DMA频道列表
# cat /proc/dma
4: cascade
/proc/execdomains Linux内核当前支持的execution domains
# cat /proc/execdomains
0-0 Linux [kernel]
/proc/fb 帧缓冲设备列表,包括数量和控制它的驱动
# cat /proc/fb
0 i915drmfb
/proc/filesystems 内核当前支持的文件系统类型
# cat /proc/filesystems
nodev sysfs
nodev tmpfs
nodev bdev
nodev proc
nodev cgroup
nodev cgroup2
nodev cpuset
nodev devtmpfs
nodev configfs
nodev debugfs
nodev tracefs
nodev securityfs
nodev sockfs
nodev bpf
nodev pipefs
nodev ramfs
nodev hugetlbfs
nodev devpts
ext3
ext2
ext4
squashfs
vfat
nodev ecryptfs
fuseblk
nodev fuse
nodev fusectl
nodev mqueue
nodev pstore
nodev autofs
nodev overlay
nodev aufs
xfs
jfs
msdos
ntfs
minix
hfs
hfsplus
qnx4
ufs
btrfs
/proc/interrupts x86架构中的每个IRQ中断数
# cat /proc/interrupts
CPU0 CPU1
0: 6 0 IR-IO-APIC 2-edge timer
1: 4 0 IR-IO-APIC 1-edge i8042
8: 0 1 IR-IO-APIC 8-edge rtc0
9: 0 5 IR-IO-APIC 9-fasteoi acpi
12: 0 6 IR-IO-APIC 12-edge i8042
16: 0 0 IR-IO-APIC 16-fasteoi i801_smbus
120: 0 0 DMAR-MSI 0-edge dmar0
121: 0 0 DMAR-MSI 1-edge dmar1
124: 574600 1903286 IR-PCI-MSI 327680-edge xhci_hcd
125: 6858 770427 IR-PCI-MSI 376832-edge ahci[0000:00:17.0]
126: 19363 23230 IR-PCI-MSI 520192-edge enp0s31f6
127: 0 98 IR-PCI-MSI 360448-edge mei_me
128: 4589074 0 IR-PCI-MSI 32768-edge i915
129: 0 3301 IR-PCI-MSI 514048-edge snd_hda_intel:card0
NMI: 436 433 Non-maskable interrupts
LOC: 24555961 24281033 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 436 433 Performance monitoring interrupts
IWI: 235868 28 IRQ work interrupts
RTR: 0 0 APIC ICR read retries
RES: 2283456 2416184 Rescheduling interrupts
CAL: 413348 385614 Function call interrupts
TLB: 734726 736619 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
DFR: 0 0 Deferred Error APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 274 275 Machine check polls
HYP: 0 0 Hypervisor callback interrupts
HRE: 0 0 Hyper-V reenlightenment interrupts
HVS: 0 0 Hyper-V stimer0 interrupts
ERR: 2
MIS: 0
PIN: 0 0 Posted-interrupt notification event
NPI: 0 0 Nested posted-interrupt event
PIW: 0 0 Posted-interrupt wakeup event
/proc/iomem 每个物理设备当前在系统内存中的映射
8# cat /proc/iomem
00000000-00000fff : Reserved
00001000-000907ff : System RAM
00090800-0009ffff : Reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000cfdff : Video ROM
000d0000-000d99ff : Adapter ROM
000da000-000dafff : Adapter ROM
000db000-000dbfff : Adapter ROM
000e0000-000fffff : Reserved
000f0000-000fffff : System ROM
00100000-83631fff : System RAM
83632000-83632fff : ACPI Non-volatile Storage
83633000-8364cfff : Reserved
8364d000-836a2fff : System RAM
836a3000-83e93fff : Reserved
83e94000-8a3c6fff : System RAM
8a3c7000-8b9dbfff : Reserved
8b887018-8b887019 : APEI ERST
8b88701c-8b887021 : APEI ERST
8b887028-8b887039 : APEI ERST
8b887040-8b88704c : APEI ERST
8b887050-8b88904f : APEI ERST
8b9dc000-8ba2cfff : ACPI Tables
8ba2d000-8c0a3fff : ACPI Non-volatile Storage
8c0a4000-8c5fefff : Reserved
8c5ff000-8c5fffff : System RAM
8c600000-8dffffff : RAM buffer
8e000000-8fffffff : Reserved
8e000000-8fffffff : Graphics Stolen Memory
90000000-dfffffff : PCI Bus 0000:00
c0000000-cfffffff : 0000:00:02.0
de000000-deffffff : 0000:00:02.0
df000000-df01ffff : 0000:00:1f.6
df000000-df01ffff : e1000e
df020000-df02ffff : 0000:00:1f.3
df020000-df02ffff : ICH HD audio
df030000-df03ffff : 0000:00:14.0
df030000-df03ffff : xhci-hcd
df040000-df043fff : 0000:00:1f.3
df040000-df043fff : ICH HD audio
df044000-df047fff : 0000:00:1f.2
df048000-df049fff : 0000:00:17.0
df048000-df049fff : ahci
df04a000-df04a0ff : 0000:00:1f.4
df04b000-df04b7ff : 0000:00:17.0
df04b000-df04b7ff : ahci
df04c000-df04c0ff : 0000:00:17.0
df04c000-df04c0ff : ahci
df04d000-df04dfff : 0000:00:16.0
df04d000-df04dfff : mei_me
df04e000-df04efff : 0000:00:14.2
df04e000-df04efff : Intel PCH thermal driver
dffe0000-dfffffff : pnp 00:08
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
e0000000-efffffff : Reserved
e0000000-efffffff : pnp 00:08
fd000000-fe7fffff : PCI Bus 0000:00
fd000000-fdabffff : pnp 00:09
fdac0000-fdacffff : pnp 00:0b
fdad0000-fdadffff : pnp 00:09
fdae0000-fdaeffff : pnp 00:0b
fdaf0000-fdafffff : pnp 00:0b
fdb00000-fdffffff : pnp 00:09
fdc6000c-fdc6000f : iTCO_wdt
fe000000-fe010fff : Reserved
fe036000-fe03bfff : pnp 00:09
fe03d000-fe3fffff : pnp 00:09
fe410000-fe7fffff : pnp 00:09
fec00000-fec00fff : Reserved
fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed00000-fed003ff : PNP0103:00
fed10000-fed17fff : pnp 00:08
fed18000-fed18fff : pnp 00:08
fed19000-fed19fff : pnp 00:08
fed20000-fed3ffff : pnp 00:08
fed45000-fed8ffff : pnp 00:08
fed90000-fed90fff : dmar0
fed91000-fed91fff : dmar1
fee00000-fee00fff : Local APIC
fee00000-fee00fff : Reserved
ff000000-ffffffff : Reserved
ff000000-ffffffff : INT0800:00
ff000000-ffffffff : pnp 00:08
100000000-26dffffff : System RAM
1ae600000-1af400eb0 : Kernel code
1af400eb1-1afe575bf : Kernel data
1b0120000-1b05fffff : Kernel bss
26e000000-26fffffff : RAM buffer
/proc/ioports 一个设备的输入输出所使用的注册端口范围
# cat /proc/ioports
0000-0cf7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0064-0064 : keyboard
0070-0077 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00b2-00b2 : APEI ERST
00c0-00df : dma2
00f0-00ff : fpu
00f0-00f0 : PNP0C04:00
03c0-03df : vesafb
03f8-03ff : serial
0400-041f : iTCO_wdt
0680-069f : pnp 00:04
0800-087f : pnp 00:05
0a00-0a3f : pnp 00:00
0a40-0a7f : pnp 00:00
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
164e-164f : pnp 00:04
1800-18fe : pnp 00:04
1800-1803 : ACPI PM1a_EVT_BLK
1804-1805 : ACPI PM1a_CNT_BLK
1808-180b : ACPI PM_TMR
1850-1850 : ACPI PM2_CNT_BLK
1854-1857 : pnp 00:07
1880-189f : ACPI GPE0_BLK
f000-f03f : 0000:00:02.0
f040-f05f : 0000:00:1f.4
f040-f05f : i801_smbus
f060-f07f : 0000:00:17.0
f060-f07f : ahci
f080-f083 : 0000:00:17.0
f080-f083 : ahci
f090-f097 : 0000:00:17.0
f090-f097 : ahci
ff00-fffe : pnp 00:0a
ffff-ffff : pnp 00:04
ffff-ffff : pnp 00:04
ffff-ffff : pnp 00:04
/proc/kcore 代表系统的物理内存,存储为核心文件格式,里边显示的是字节数,等于RAM大小加上4kb
# cat /proc/kcore
VMCOREINFOOSRELEASE=5.4.0-39-generic
PAGESIZE=4096
SYMBOL(init_uts_ns)=ffffffff88413540
SYMBOL(node_online_map)=ffffffff8864cfa0
SYMBOL(swapper_pg_dir)=ffffffff8840a000
SYMBOL(_stext)=ffffffff86e00000
SYMBOL(vmap_area_list)=ffffffff884e88a0
SYMBOL(mem_section)=ffff92d1adfd1000
LENGTH(mem_section)=2048
SIZE(mem_section)=16
OFFSET(mem_section.section_mem_map)=0
SIZE(page)=64
SIZE(pglist_data)=172928
SIZE(zone)=1664
SIZE(free_area)=104
SIZE(list_head)=16
SIZE(nodemask_t)=128
OFFSET(page.flags)=0
OFFSET(page._refcount)=52
OFFSET(page.mapping)=24
OFFSET(page.lru)=8
OFFSET(page._mapcount)=48
OFFSET(page.private)=40
OFFSET(page.compound_dtor)=16
OFFSET(page.compound_order)=17
OFFSET(page.compound_head)=8
OFFSET(pglist_data.node_zones)=0
OFFSET(pglist_data.nr_zones)=172192
OFFSET(pglist_data.node_start_pfn)=172200
OFFSET(pglist_data.node_spanned_pages)=172216
OFFSET(pglist_data.node_id)=172224
OFFSET(zone.free_area)=192
OFFSET(zone.vm_stat)=1472
OFFSET(zone.spanned_pages)=120
OFFSET(free_area.free_list)=0
OFFSET(list_head.next)=0
OFFSET(list_head.prev)=8
OFFSET(vmap_area.va_start)=0
OFFSET(vmap_area.list)=40
LENGTH(zone.free_area)=11
SYMBOL(log_buf)=ffffffff88465740
SYMBOL(log_buf_len)=ffffffff8846573c
SYMBOL(log_first_idx)=ffffffff889d4df8
SYMBOL(clear_idx)=ffffffff889d4dc4
SYMBOL(log_next_idx)=ffffffff889d4de8
SIZE(printk_log)=16
OFFSET(printk_log.ts_nsec)=0
OFFSET(printk_log.len)=8
OFFSET(printk_log.text_len)=10
OFFSET(printk_log.dict_len)=12
LENGTH(free_area.free_list)=6
NUMBER(NR_FREE_PAGES)=0
NUMBER(PG_lru)=4
NUMBER(PG_private)=13
NUMBER(PG_swapcache)=10
NUMBER(PG_swapbacked)=19
NUMBER(PG_slab)=9
NUMBER(PG_hwpoison)=23
NUMBER(PG_head_mask)=65536
NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)=-129
NUMBER(HUGETLB_PAGE_DTOR)=2
NUMBER(PAGE_OFFLINE_MAPCOUNT_VALUE)=-257
NUMBER(phys_base)=7105150976
SYMBOL(init_top_pgt)=ffffffff8840a000
NUMBER(pgtable_l5_enabled)=0
SYMBOL(node_data)=ffffffff88648620
LENGTH(node_data)=1024
KERNELOFFSET=5e00000
NUMBER(KERNEL_IMAGE_SIZE)=1073741824
NUMBER(sme_mask)=0
/proc/kmsg 记录内核生成的信息,可以通过/sbin/klogd或/bin/dmesg来处理
/proc/loadavg 根据过去一段时间内CPU和IO的状态得出的负载状态,与uptime命令有关
# cat /proc/loadavg
1.06 0.84 0.77 1/871 44089
/proc/locks 内核锁住的文件列表
# cat /proc/locks
1: POSIX ADVISORY WRITE 41109 08:05:37104147 0 EOF
2: POSIX ADVISORY READ 41109 08:05:37103407 1073741826 1073742335
3: POSIX ADVISORY WRITE 41109 08:05:37103406 0 EOF
4: POSIX ADVISORY WRITE 41109 08:05:37509097 0 EOF
5: POSIX ADVISORY WRITE 41109 08:05:37103226 1073741824 1073742335
6: POSIX ADVISORY WRITE 41109 08:05:37103395 0 EOF
7: POSIX ADVISORY WRITE 41109 08:05:37103235 0 EOF
8: POSIX ADVISORY WRITE 41109 08:05:37103229 0 EOF
9: POSIX ADVISORY WRITE 35273 00:18:952 0 EOF
10: POSIX ADVISORY WRITE 35272 00:18:928 0 EOF
11: POSIX ADVISORY READ 35269 00:18:934 4 4
12: POSIX ADVISORY READ 35269 00:18:933 4 4
13: POSIX ADVISORY READ 35269 00:18:932 4 4
14: POSIX ADVISORY READ 35269 00:18:931 4 4
15: POSIX ADVISORY READ 35269 00:18:930 4 4
16: POSIX ADVISORY READ 35269 00:18:929 4 4
17: POSIX ADVISORY READ 35269 00:18:922 4 4
18: POSIX ADVISORY READ 20904 08:05:37508509 1073741826 1073742335
19: POSIX ADVISORY WRITE 20904 08:05:37508478 0 EOF
20: POSIX ADVISORY WRITE 2080 08:05:12321022 0 EOF
21: POSIX ADVISORY WRITE 684 00:18:818 0 EOF
22: FLOCK ADVISORY WRITE 649 00:18:786 0 EOF
23: POSIX ADVISORY WRITE 41109 08:05:37103434 1073741824 1073742335
24: POSIX ADVISORY WRITE 41109 08:05:37103322 1073741824 1073742335
25: POSIX ADVISORY WRITE 41109 08:05:37103255 1073741824 1073742335
26: POSIX ADVISORY WRITE 41109 08:05:37103225 1073741824 1073742335
27: POSIX ADVISORY WRITE 41109 08:05:37103474 0 EOF
28: POSIX ADVISORY WRITE 41109 08:05:37103466 0 EOF
29: POSIX ADVISORY WRITE 41109 08:05:37103454 0 EOF
30: POSIX ADVISORY WRITE 41109 08:05:37103447 0 EOF
31: POSIX ADVISORY WRITE 41109 08:05:37103441 0 EOF
32: POSIX ADVISORY READ 41109 08:05:37103402 1073741826 1073742335
33: POSIX ADVISORY WRITE 41109 08:05:37103347 0 EOF
34: POSIX ADVISORY WRITE 41109 08:05:37103330 0 EOF
35: POSIX ADVISORY WRITE 41109 08:05:37103646 0 EOF
36: POSIX ADVISORY WRITE 41109 08:05:37103245 0 EOF
37: POSIX ADVISORY WRITE 40765 00:18:263 0 EOF
38: POSIX ADVISORY READ 35269 00:18:941 4 4
39: POSIX ADVISORY READ 35269 00:18:938 4 4
40: POSIX ADVISORY READ 35269 00:18:937 4 4
41: POSIX ADVISORY WRITE 35271 00:18:925 0 EOF
42: POSIX ADVISORY WRITE 35269 00:18:926 0 EOF
43: POSIX ADVISORY WRITE 35269 00:18:950 0 EOF
44: POSIX ADVISORY READ 35269 00:18:923 4 4
45: POSIX ADVISORY WRITE 35239 00:18:942 0 EOF
46: POSIX ADVISORY WRITE 35239 00:18:927 0 EOF
47: POSIX ADVISORY READ 35239 00:18:923 4 4
48: POSIX ADVISORY WRITE 23146 08:05:13505817 0 EOF
49: POSIX ADVISORY WRITE 20904 08:05:37508505 0 EOF
50: POSIX ADVISORY WRITE 20904 08:05:37508444 0 EOF
51: POSIX ADVISORY WRITE 5578 08:05:37509151 0 EOF
52: POSIX ADVISORY WRITE 5138 00:18:887 0 EOF
53: POSIX ADVISORY WRITE 5138 00:18:876 0 EOF
54: FLOCK ADVISORY WRITE 3085 00:36:60 0 EOF
55: POSIX ADVISORY READ 1440 08:05:36962323 128 128
56: POSIX ADVISORY READ 1440 08:05:36962319 1073741826 1073742335
57: FLOCK ADVISORY WRITE 1075 00:1a:6 0 EOF
58: FLOCK ADVISORY WRITE 763 08:05:54792064 0 EOF
/proc/mdstat 多硬盘,RAID配置信息(md=multiple disks)
cat /proc/mdstat
Personalities :
unused devices: <none>
/proc/meminfo RAM使用的相关信息
# cat /proc/meminfo
MemTotal: 8017864 kB
MemFree: 150608 kB
MemAvailable: 1928040 kB
Buffers: 59152 kB
Cached: 2957520 kB
SwapCached: 2304 kB
Active: 5212064 kB
Inactive: 2191888 kB
Active(anon): 4263196 kB
Inactive(anon): 1212272 kB
Active(file): 948868 kB
Inactive(file): 979616 kB
Unevictable: 49248 kB
Mlocked: 48 kB
SwapTotal: 2097148 kB
SwapFree: 1936892 kB
Dirty: 1120 kB
Writeback: 0 kB
AnonPages: 4434604 kB
Mapped: 1057132 kB
Shmem: 1090140 kB
KReclaimable: 146308 kB
Slab: 284820 kB
SReclaimable: 146308 kB
SUnreclaim: 138512 kB
KernelStack: 13984 kB
PageTables: 53288 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6106080 kB
Committed_AS: 13790428 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 36144 kB
VmallocChunk: 0 kB
Percpu: 1848 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 323312 kB
DirectMap2M: 7929856 kB
DirectMap1G: 0 kB
/proc/misc 其他的主要设备(设备号为10)上注册的驱动
# cat /proc/misc
234 btrfs-control
232 kvm
58 wmi/dell-smbios
235 autofs
59 cpu_dma_latency
184 microcode
227 mcelog
236 device-mapper
223 uinput
1 psaux
196 vfio
200 tun
60 udmabuf
237 loop-control
61 lightnvm
183 hw_random
228 hpet
229 fuse
62 ecryptfs
231 snapshot
242 rfkill
63 vga_arbiter
/proc/modules 所有加载到内核的模块列表
# cat /proc/modules
btrfs 1253376 0 - Live 0xffffffffc0d7d000
xor 24576 1 btrfs, Live 0xffffffffc0add000
zstd_compress 167936 1 btrfs, Live 0xffffffffc0d53000
raid6_pq 114688 1 btrfs, Live 0xffffffffc0d36000
ufs 81920 0 - Live 0xffffffffc0b74000
qnx4 16384 0 - Live 0xffffffffc0a8c000
hfsplus 110592 0 - Live 0xffffffffc0d1a000
hfs 61440 0 - Live 0xffffffffc0a7c000
minix 36864 0 - Live 0xffffffffc0a6b000
ntfs 106496 0 - Live 0xffffffffc0b56000
msdos 20480 0 - Live 0xffffffffc0a65000
jfs 188416 0 - Live 0xffffffffc0b27000
xfs 1277952 0 - Live 0xffffffffc0be1000
libcrc32c 16384 2 btrfs,xfs, Live 0xffffffffc0a60000
cpuid 16384 0 - Live 0xffffffffc0a5b000
aufs 262144 0 - Live 0xffffffffc0a92000
cfg80211 704512 0 - Live 0xffffffffc0986000
overlay 114688 0 - Live 0xffffffffc0969000
nls_iso8859_1 16384 1 - Live 0xffffffffc0461000
snd_hda_codec_hdmi 61440 1 - Live 0xffffffffc0773000
snd_hda_codec_realtek 118784 1 - Live 0xffffffffc078f000
snd_hda_codec_generic 81920 1 snd_hda_codec_realtek, Live 0xffffffffc075e000
ledtrig_audio 16384 2 snd_hda_codec_realtek,snd_hda_codec_generic, Live 0xffffffffc0453000
snd_hda_intel 53248 2 - Live 0xffffffffc0750000
snd_intel_dspcfg 24576 1 snd_hda_intel, Live 0xffffffffc044c000
snd_hda_codec 131072 4 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel, Live 0xffffffffc072f000
intel_rapl_msr 20480 0 - Live 0xffffffffc0499000
intel_rapl_common 24576 1 intel_rapl_msr, Live 0xffffffffc0445000
x86_pkg_temp_thermal 20480 0 - Live 0xffffffffc045b000
intel_powerclamp 20480 0 - Live 0xffffffffc043f000
coretemp 20480 0 - Live 0xffffffffc0418000
snd_hda_core 90112 5 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec, Live 0xffffffffc0428000
kvm_intel 282624 0 - Live 0xffffffffc08a4000
kvm 663552 1 kvm_intel, Live 0xffffffffc07d2000
snd_hwdep 20480 1 snd_hda_codec, Live 0xffffffffc0422000
snd_pcm 106496 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core, Live 0xffffffffc03fd000
snd_seq_midi 20480 0 - Live 0xffffffffc03f7000
snd_seq_midi_event 16384 1 snd_seq_midi, Live 0xffffffffc03f2000
crct10dif_pclmul 16384 1 - Live 0xffffffffc03a1000
mei_hdcp 24576 0 - Live 0xffffffffc03eb000
ghash_clmulni_intel 16384 0 - Live 0xffffffffc0371000
snd_rawmidi 36864 1 snd_seq_midi, Live 0xffffffffc03b9000
i915 1986560 46 - Live 0xffffffffc0549000
r8712u 176128 0 - Live 0xffffffffc051d000 (C)
aesni_intel 372736 0 - Live 0xffffffffc04c1000
mei_me 40960 1 - Live 0xffffffffc03e0000
snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event, Live 0xffffffffc03ce000
crypto_simd 16384 1 aesni_intel, Live 0xffffffffc03c9000
cryptd 24576 2 ghash_clmulni_intel,crypto_simd, Live 0xffffffffc038a000
glue_helper 16384 1 aesni_intel, Live 0xffffffffc03b4000
intel_cstate 20480 0 - Live 0xffffffffc0395000
intel_rapl_perf 20480 0 - Live 0xffffffffc0384000
joydev 24576 0 - Live 0xffffffffc037d000
input_leds 16384 0 - Live 0xffffffffc0362000
dell_wmi 20480 0 - Live 0xffffffffc03c3000
dell_smbios 28672 1 dell_wmi, Live 0xffffffffc03a7000
dcdbas 20480 1 dell_smbios, Live 0xffffffffc039b000
dell_wmi_descriptor 20480 2 dell_wmi,dell_smbios, Live 0xffffffffc0377000
sparse_keymap 16384 1 dell_wmi, Live 0xffffffffc036c000
snd_seq_device 16384 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0xffffffffc0367000
snd_timer 36864 2 snd_pcm,snd_seq, Live 0xffffffffc0358000
mei 106496 3 mei_hdcp,mei_me, Live 0xffffffffc04a6000
drm_kms_helper 184320 1 i915, Live 0xffffffffc0466000
snd 90112 15 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_seq_device,snd_timer, Live 0xffffffffc0341000
soundcore 16384 1 snd, Live 0xffffffffc033c000
intel_pch_thermal 16384 0 - Live 0xffffffffc0337000
i2c_algo_bit 16384 1 i915, Live 0xffffffffc0332000
fb_sys_fops 16384 1 drm_kms_helper, Live 0xffffffffc032b000
syscopyarea 16384 1 drm_kms_helper, Live 0xffffffffc0326000
sysfillrect 16384 1 drm_kms_helper, Live 0xffffffffc0321000
sysimgblt 16384 1 drm_kms_helper, Live 0xffffffffc023d000
serio_raw 20480 0 - Live 0xffffffffc031b000
mac_hid 16384 0 - Live 0xffffffffc0238000
intel_wmi_thunderbolt 20480 0 - Live 0xffffffffc01e9000
wmi_bmof 16384 0 - Live 0xffffffffc0233000
acpi_pad 184320 0 - Live 0xffffffffc02ed000
sch_fq_codel 20480 3 - Live 0xffffffffc01c1000
parport_pc 40960 0 - Live 0xffffffffc01b6000
ppdev 24576 0 - Live 0xffffffffc01ab000
lp 20480 0 - Live 0xffffffffc01a1000
parport 53248 3 parport_pc,ppdev,lp, Live 0xffffffffc0193000
drm 491520 11 i915,drm_kms_helper, Live 0xffffffffc0274000
ip_tables 32768 0 - Live 0xffffffffc00ee000
x_tables 40960 1 ip_tables, Live 0xffffffffc0167000
autofs4 45056 2 - Live 0xffffffffc014d000
hid_generic 16384 0 - Live 0xffffffffc0162000
usbhid 57344 0 - Live 0xffffffffc013e000
hid 131072 2 hid_generic,usbhid, Live 0xffffffffc010b000
psmouse 155648 0 - Live 0xffffffffc024d000
i2c_i801 32768 0 - Live 0xffffffffc0244000
e1000e 258048 0 - Live 0xffffffffc01f3000
ahci 40960 2 - Live 0xffffffffc0133000
libahci 32768 1 ahci, Live 0xffffffffc00e5000
crc32_pclmul 16384 0 - Live 0xffffffffc0106000
wmi 32768 5 dell_wmi,dell_smbios,dell_wmi_descriptor,intel_wmi_thunderbolt,wmi_bmof, Live 0xffffffffc00dc000
video 49152 2 i915,dell_wmi, Live 0xffffffffc00f9000
/proc/mounts 系统中使用的所有挂载
# cat /proc/mounts
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,noexec,relatime,size=3980772k,nr_inodes=995193,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=801788k,mode=755 0 0
/dev/sda5 / ext4 rw,relatime,errors=remount-ro 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15503 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/loop0 /snap/core18/1705 squashfs ro,nodev,relatime 0 0
/dev/loop1 /snap/core18/1754 squashfs ro,nodev,relatime 0 0
/dev/loop2 /snap/gnome-3-28-1804/128 squashfs ro,nodev,relatime 0 0
/dev/loop3 /snap/gnome-3-34-1804/33 squashfs ro,nodev,relatime 0 0
/dev/loop4 /snap/gtk-common-themes/1506 squashfs ro,nodev,relatime 0 0
/dev/loop5 /snap/gnome-3-34-1804/36 squashfs ro,nodev,relatime 0 0
/dev/loop7 /snap/snap-store/415 squashfs ro,nodev,relatime 0 0
/dev/loop6 /snap/snap-store/467 squashfs ro,nodev,relatime 0 0
/dev/loop9 /snap/snapd/8140 squashfs ro,nodev,relatime 0 0
/dev/loop8 /snap/snapd/7777 squashfs ro,nodev,relatime 0 0
/dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=801784k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/fuse /run/user/1000/doc fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
tmpfs /run/snapd/ns tmpfs rw,nosuid,nodev,noexec,relatime,size=801788k,mode=755 0 0
nsfs /run/snapd/ns/snap-store.mnt nsfs rw 0 0
/proc/mtrr 系统使用的Memory Type Range Registers (MTRRs)
# cat /proc/mtrr
reg00: base=0x0c0000000 ( 3072MB), size= 1024MB, count=1: uncachable
reg01: base=0x0a0000000 ( 2560MB), size= 512MB, count=1: uncachable
reg02: base=0x090000000 ( 2304MB), size= 256MB, count=1: uncachable
reg03: base=0x08e000000 ( 2272MB), size= 32MB, count=1: uncachable
reg04: base=0x08d800000 ( 2264MB), size= 8MB, count=1: uncachable
/proc/partitions 分区中的块分配信息
# cat /proc/partitions
major minor #blocks name
7 0 56264 loop0
7 1 56268 loop1
7 2 165288 loop2
7 3 261700 loop3
7 4 63580 loop4
7 5 261700 loop5
7 6 50980 loop6
7 7 44188 loop7
8 0 976762584 sda
8 1 524288 sda1
8 2 1 sda2
8 5 976235520 sda5
11 0 1048575 sr0
7 8 31012 loop8
7 9 30540 loop9
/proc/pci 系统中的PCI设备列表
/proc/slabinfo 系统中所有活动的 slab 缓存信息
# cat /proc/slabinfo
slabinfo - version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
btrfs_delayed_node 0 0 312 13 1 : tunables 0 0 0 : slabdata 0 0 0
btrfs_ordered_extent 0 0 416 19 2 : tunables 0 0 0 : slabdata 0 0 0
btrfs_free_space_bitmap 0 0 12288 2 8 : tunables 0 0 0 : slabdata 0 0 0
btrfs_inode 0 0 1168 14 4 : tunables 0 0 0 : slabdata 0 0 0
ufs_inode_cache 0 0 808 20 4 : tunables 0 0 0 : slabdata 0 0 0
qnx4_inode_cache 0 0 680 12 2 : tunables 0 0 0 : slabdata 0 0 0
hfsplus_attr_cache 0 0 3840 8 8 : tunables 0 0 0 : slabdata 0 0 0
hfsplus_icache 0 0 896 18 4 : tunables 0 0 0 : slabdata 0 0 0
hfs_inode_cache 0 0 832 19 4 : tunables 0 0 0 : slabdata 0 0 0
minix_inode_cache 0 0 672 12 2 : tunables 0 0 0 : slabdata 0 0 0
ntfs_big_inode_cache 0 0 960 17 4 : tunables 0 0 0 : slabdata 0 0 0
ntfs_inode_cache 0 0 296 13 1 : tunables 0 0 0 : slabdata 0 0 0
jfs_ip 0 0 1280 12 4 : tunables 0 0 0 : slabdata 0 0 0
xfs_dqtrx 0 0 528 15 2 : tunables 0 0 0 : slabdata 0 0 0
xfs_dquot 0 0 496 16 2 : tunables 0 0 0 : slabdata 0 0 0
xfs_buf 0 0 384 21 2 : tunables 0 0 0 : slabdata 0 0 0
xfs_rui_item 0 0 696 23 4 : tunables 0 0 0 : slabdata 0 0 0
xfs_rud_item 0 0 176 23 1 : tunables 0 0 0 : slabdata 0 0 0
xfs_inode 0 0 1024 16 4 : tunables 0 0 0 : slabdata 0 0 0
xfs_efd_item 0 0 440 18 2 : tunables 0 0 0 : slabdata 0 0 0
xfs_buf_item 0 0 272 15 1 : tunables 0 0 0 : slabdata 0 0 0
xfs_trans 0 0 232 17 1 : tunables 0 0 0 : slabdata 0 0 0
xfs_da_state 0 0 480 17 2 : tunables 0 0 0 : slabdata 0 0 0
xfs_btree_cur 0 0 224 18 1 : tunables 0 0 0 : slabdata 0 0 0
au_finfo 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
au_icntnr 0 0 832 19 4 : tunables 0 0 0 : slabdata 0 0 0
au_dinfo 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
ovl_inode 0 0 688 23 4 : tunables 0 0 0 : slabdata 0 0 0
kvm_async_pf 0 0 136 30 1 : tunables 0 0 0 : slabdata 0 0 0
kvm_vcpu 0 0 17152 1 8 : tunables 0 0 0 : slabdata 0 0 0
kvm_mmu_page_header 0 0 168 24 1 : tunables 0 0 0 : slabdata 0 0 0
x86_fpu 0 0 4160 7 8 : tunables 0 0 0 : slabdata 0 0 0
execute_cb 0 0 128 32 1 : tunables 0 0 0 : slabdata 0 0 0
i915_request 2257 2268 640 12 2 : tunables 0 0 0 : slabdata 189 189 0
ext4_groupinfo_4k 7476 7476 144 28 1 : tunables 0 0 0 : slabdata 267 267 0
scsi_sense_cache 288 288 128 32 1 : tunables 0 0 0 : slabdata 9 9 0
fsverity_info 0 0 248 16 1 : tunables 0 0 0 : slabdata 0 0 0
ip6-frags 0 0 184 22 1 : tunables 0 0 0 : slabdata 0 0 0
PINGv6 0 0 1216 13 4 : tunables 0 0 0 : slabdata 0 0 0
RAWv6 91 91 1216 13 4 : tunables 0 0 0 : slabdata 7 7 0
UDPv6 120 120 1344 12 4 : tunables 0 0 0 : slabdata 10 10 0
tw_sock_TCPv6 0 0 248 16 1 : tunables 0 0 0 : slabdata 0 0 0
request_sock_TCPv6 0 0 304 13 1 : tunables 0 0 0 : slabdata 0 0 0
TCPv6 91 91 2368 13 8 : tunables 0 0 0 : slabdata 7 7 0
kcopyd_job 0 0 3312 9 8 : tunables 0 0 0 : slabdata 0 0 0
dm_uevent 0 0 2632 12 8 : tunables 0 0 0 : slabdata 0 0 0
mqueue_inode_cache 34 34 960 17 4 : tunables 0 0 0 : slabdata 2 2 0
fuse_request 56 56 144 28 1 : tunables 0 0 0 : slabdata 2 2 0
fuse_inode 38 38 832 19 4 : tunables 0 0 0 : slabdata 2 2 0
ecryptfs_key_record_cache 5789 5936 576 14 2 : tunables 0 0 0 : slabdata 424 424 0
ecryptfs_inode_cache 0 0 1024 16 4 : tunables 0 0 0 : slabdata 0 0 0
ecryptfs_file_cache 0 0 16 256 1 : tunables 0 0 0 : slabdata 0 0 0
ecryptfs_auth_tok_list_item 0 0 832 19 4 : tunables 0 0 0 : slabdata 0 0 0
fat_inode_cache 44 44 744 22 4 : tunables 0 0 0 : slabdata 2 2 0
fat_cache 0 0 40 102 1 : tunables 0 0 0 : slabdata 0 0 0
squashfs_inode_cache 3059 3059 704 23 4 : tunables 0 0 0 : slabdata 133 133 0
jbd2_journal_handle 170 170 48 85 1 : tunables 0 0 0 : slabdata 2 2 0
jbd2_journal_head 1088 1088 120 34 1 : tunables 0 0 0 : slabdata 32 32 0
jbd2_revoke_table_s 256 256 16 256 1 : tunables 0 0 0 : slabdata 1 1 0
ext4_inode_cache 15465 40948 1096 29 8 : tunables 0 0 0 : slabdata 1412 1412 0
ext4_allocation_context 64 64 128 32 1 : tunables 0 0 0 : slabdata 2 2 0
ext4_system_zone 510 510 40 102 1 : tunables 0 0 0 : slabdata 5 5 0
ext4_io_end 128 128 64 64 1 : tunables 0 0 0 : slabdata 2 2 0
ext4_pending_reservation 640 640 32 128 1 : tunables 0 0 0 : slabdata 5 5 0
ext4_extent_status 4135 7752 40 102 1 : tunables 0 0 0 : slabdata 76 76 0
mbcache 2336 2336 56 73 1 : tunables 0 0 0 : slabdata 32 32 0
userfaultfd_ctx_cache 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
dnotify_struct 0 0 32 128 1 : tunables 0 0 0 : slabdata 0 0 0
pid_namespace 57 57 208 19 1 : tunables 0 0 0 : slabdata 3 3 0
ip4-frags 0 0 200 20 1 : tunables 0 0 0 : slabdata 0 0 0
xfrm_state 4956 5152 704 23 4 : tunables 0 0 0 : slabdata 224 224 0
PING 2293 2320 1024 16 4 : tunables 0 0 0 : slabdata 145 145 0
RAW 80 80 1024 16 4 : tunables 0 0 0 : slabdata 5 5 0
UDP 420 420 1152 14 4 : tunables 0 0 0 : slabdata 30 30 0
tw_sock_TCP 80 80 248 16 1 : tunables 0 0 0 : slabdata 5 5 0
request_sock_TCP 26 26 304 13 1 : tunables 0 0 0 : slabdata 2 2 0
TCP 199 252 2240 14 8 : tunables 0 0 0 : slabdata 18 18 0
hugetlbfs_inode_cache 50 50 632 25 4 : tunables 0 0 0 : slabdata 2 2 0
dquot 144 144 256 16 1 : tunables 0 0 0 : slabdata 9 9 0
eventpoll_pwq 3528 3528 72 56 1 : tunables 0 0 0 : slabdata 63 63 0
dax_cache 21 21 768 21 4 : tunables 0 0 0 : slabdata 1 1 0
request_queue 30 30 2104 15 8 : tunables 0 0 0 : slabdata 2 2 0
biovec-max 98 128 4096 8 8 : tunables 0 0 0 : slabdata 16 16 0
biovec-128 64 64 2048 16 8 : tunables 0 0 0 : slabdata 4 4 0
biovec-64 48 112 1024 16 4 : tunables 0 0 0 : slabdata 7 7 0
khugepaged_mm_slot 36 36 112 36 1 : tunables 0 0 0 : slabdata 1 1 0
user_namespace 30 30 536 15 2 : tunables 0 0 0 : slabdata 2 2 0
uid_cache 347 1120 128 32 1 : tunables 0 0 0 : slabdata 35 35 0
dmaengine-unmap-256 15 15 2112 15 8 : tunables 0 0 0 : slabdata 1 1 0
dmaengine-unmap-128 15 15 1088 15 4 : tunables 0 0 0 : slabdata 1 1 0
sock_inode_cache 3233 3249 832 19 4 : tunables 0 0 0 : slabdata 171 171 0
skbuff_ext_cache 84 84 192 21 1 : tunables 0 0 0 : slabdata 4 4 0
skbuff_fclone_cache 160 160 512 16 2 : tunables 0 0 0 : slabdata 10 10 0
skbuff_head_cache 2624 2720 256 16 1 : tunables 0 0 0 : slabdata 170 170 0
file_lock_cache 90 90 216 18 1 : tunables 0 0 0 : slabdata 5 5 0
fsnotify_mark_connector 9415 9600 32 128 1 : tunables 0 0 0 : slabdata 75 75 0
net_namespace 24 24 4928 6 8 : tunables 0 0 0 : slabdata 4 4 0
task_delay_info 7854 7854 80 51 1 : tunables 0 0 0 : slabdata 154 154 0
taskstats 115 115 344 23 2 : tunables 0 0 0 : slabdata 5 5 0
proc_dir_entry 1050 1050 192 21 1 : tunables 0 0 0 : slabdata 50 50 0
pde_opener 3162 3162 40 102 1 : tunables 0 0 0 : slabdata 31 31 0
proc_inode_cache 2570 2760 680 12 2 : tunables 0 0 0 : slabdata 230 230 0
bdev_cache 38 38 832 19 4 : tunables 0 0 0 : slabdata 2 2 0
shmem_inode_cache 9153 9878 720 22 4 : tunables 0 0 0 : slabdata 449 449 0
kernfs_node_cache 98607 102240 136 30 1 : tunables 0 0 0 : slabdata 3408 3408 0
mnt_cache 3048 3048 320 12 1 : tunables 0 0 0 : slabdata 254 254 0
filp 26210 27936 256 16 1 : tunables 0 0 0 : slabdata 1746 1746 0
inode_cache 21222 22022 608 13 2 : tunables 0 0 0 : slabdata 1694 1694 0
dentry 51234 99330 192 21 1 : tunables 0 0 0 : slabdata 4730 4730 0
names_cache 40 48 4096 8 8 : tunables 0 0 0 : slabdata 6 6 0
iint_cache 0 0 120 34 1 : tunables 0 0 0 : slabdata 0 0 0
lsm_file_cache 19716 20060 24 170 1 : tunables 0 0 0 : slabdata 118 118 0
buffer_head 264499 356070 104 39 1 : tunables 0 0 0 : slabdata 9130 9130 0
uts_namespace 36 36 440 18 2 : tunables 0 0 0 : slabdata 2 2 0
nsproxy 438 438 56 73 1 : tunables 0 0 0 : slabdata 6 6 0
vm_area_struct 95385 96140 208 19 1 : tunables 0 0 0 : slabdata 5060 5060 0
mm_struct 825 855 1088 15 4 : tunables 0 0 0 : slabdata 57 57 0
files_cache 828 828 704 23 4 : tunables 0 0 0 : slabdata 36 36 0
signal_cache 807 900 1088 15 4 : tunables 0 0 0 : slabdata 60 60 0
sighand_cache 765 795 2112 15 8 : tunables 0 0 0 : slabdata 53 53 0
task_struct 1116 1205 5696 5 8 : tunables 0 0 0 : slabdata 241 241 0
cred_jar 3907 3927 192 21 1 : tunables 0 0 0 : slabdata 187 187 0
anon_vma_chain 65968 68416 64 64 1 : tunables 0 0 0 : slabdata 1069 1069 0
anon_vma 41032 41032 88 46 1 : tunables 0 0 0 : slabdata 892 892 0
pid 5921 5952 128 32 1 : tunables 0 0 0 : slabdata 186 186 0
Acpi-Operand 9688 9688 72 56 1 : tunables 0 0 0 : slabdata 173 173 0
Acpi-ParseExt 273 273 104 39 1 : tunables 0 0 0 : slabdata 7 7 0
Acpi-State 1632 1632 80 51 1 : tunables 0 0 0 : slabdata 32 32 0
numa_policy 15 15 264 15 1 : tunables 0 0 0 : slabdata 1 1 0
trace_event_file 2392 2392 88 46 1 : tunables 0 0 0 : slabdata 52 52 0
ftrace_event_field 10880 10880 48 85 1 : tunables 0 0 0 : slabdata 128 128 0
pool_workqueue 222 336 256 16 1 : tunables 0 0 0 : slabdata 21 21 0
radix_tree_node 33970 36680 584 14 2 : tunables 0 0 0 : slabdata 2620 2620 0
task_group 228 228 640 12 2 : tunables 0 0 0 : slabdata 19 19 0
vmap_area 5139 14016 64 64 1 : tunables 0 0 0 : slabdata 219 219 0
dma-kmalloc-8k 0 0 8192 4 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-4k 0 0 4096 8 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-2k 0 0 2048 16 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-1k 0 0 1024 16 4 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-512 16 16 512 16 2 : tunables 0 0 0 : slabdata 1 1 0
dma-kmalloc-256 0 0 256 16 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-128 0 0 128 32 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-64 0 0 64 64 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-32 0 0 32 128 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-16 0 0 16 256 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-8 0 0 8 512 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-192 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-96 0 0 96 42 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-8k 0 0 8192 4 8 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-4k 0 0 4096 8 8 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-2k 0 0 2048 16 8 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-1k 0 0 1024 16 4 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-512 0 0 512 16 2 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-256 0 0 256 16 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-192 21 21 192 21 1 : tunables 0 0 0 : slabdata 1 1 0
kmalloc-rcl-128 768 768 128 32 1 : tunables 0 0 0 : slabdata 24 24 0
kmalloc-rcl-96 2096 2310 96 42 1 : tunables 0 0 0 : slabdata 55 55 0
kmalloc-rcl-64 7401 8064 64 64 1 : tunables 0 0 0 : slabdata 126 126 0
kmalloc-rcl-32 0 0 32 128 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-16 0 0 16 256 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-rcl-8 0 0 8 512 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-8k 433 692 8192 4 8 : tunables 0 0 0 : slabdata 173 173 0
kmalloc-4k 2522 2640 4096 8 8 : tunables 0 0 0 : slabdata 330 330 0
kmalloc-2k 2328 2432 2048 16 8 : tunables 0 0 0 : slabdata 152 152 0
kmalloc-1k 3455 3952 1024 16 4 : tunables 0 0 0 : slabdata 247 247 0
kmalloc-512 4244 4656 512 16 2 : tunables 0 0 0 : slabdata 291 291 0
kmalloc-256 1874 2000 256 16 1 : tunables 0 0 0 : slabdata 125 125 0
kmalloc-192 3370 3465 192 21 1 : tunables 0 0 0 : slabdata 165 165 0
kmalloc-128 1696 1696 128 32 1 : tunables 0 0 0 : slabdata 53 53 0
kmalloc-96 4074 4452 96 42 1 : tunables 0 0 0 : slabdata 106 106 0
kmalloc-64 30791 31808 64 64 1 : tunables 0 0 0 : slabdata 497 497 0
kmalloc-32 56526 58240 32 128 1 : tunables 0 0 0 : slabdata 455 455 0
kmalloc-16 16780 18688 16 256 1 : tunables 0 0 0 : slabdata 73 73 0
kmalloc-8 10752 10752 8 512 1 : tunables 0 0 0 : slabdata 21 21 0
kmem_cache_node 2112 2112 64 64 1 : tunables 0 0 0 : slabdata 33 33 0
kmem_cache 1905 2052 448 18 2 : tunables 0 0 0 : slabdata 114 114 0
/proc/stat 所有的CPU活动信息
# cat /proc/stat
cpu 1019260 26878 310750 15617189 103451 0 8443 0 0 0
cpu0 509710 13053 159262 7810262 47813 0 4334 0 0 0
cpu1 509550 13824 151488 7806927 55637 0 4109 0 0 0
intr 65227257 6 4 0 0 0 0 0 0 1 5 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2518121 792286 42998 98 4702061 3301 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 172323289
btime 1593836309
processes 44164
procs_running 2
procs_blocked 0
softirq 61303127 4350588 23067138 87 661844 793209 0 65530 22555574 4936 9804221
/proc/sysrq-trigger 使用echo命令来写这个文件的时候,远程root用户可以执行大多数的系统请求关键命令,就好像在本地终端执行一样。要写入这个文件,需要把/proc/sys/kernel/sysrq不能设置为0。这个文件对root也是不可读的
/proc/uptime 系统已经运行了多久
# cat /proc/uptime
86054.37 157521.65
/proc/swaps 交换空间的使用情况
8# cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 2097148 160512 -2
/proc/version Linux内核版本和gcc版本
# cat /proc/version
Linux version 5.4.0-39-generic (buildd@lcy01-amd64-016) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #43-Ubuntu SMP Fri Jun 19 10:28:31 UTC 2020
/proc/bus 系统总线(Bus)信息,例如pci/usb等
# cat /proc/bus/pci/devices
0000 8086190f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 skl_uncore
0008 80861901 7a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pcieport
0010 80861902 80 de000004 0 c000000c 0 f001 0 c0002 1000000 0 10000000 0 40 0 20000 i915
00a0 8086a12f 7c df030004 0 0 0 0 0 0 10000 0 0 0 0 0 0 xhci_hcd
00a2 8086a131 12 df04e004 0 0 0 0 0 0 1000 0 0 0 0 0 0 intel_pch_thermal
00b0 8086a13a 7f df04d004 0 0 0 0 0 0 1000 0 0 0 0 0 0 mei_me
00b8 80862822 7d df048000 df04c000 f091 f081 f061 df04b000 0 2000 100 8 4 20 800 0 ahci
00e0 8086a110 7b 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pcieport
00f8 8086a149 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00fa 8086a121 0 df044000 0 0 0 0 0 0 4000 0 0 0 0 0 0
00fb 8086a170 81 df040004 0 0 0 df020004 0 0 4000 0 0 0 10000 0 0 snd_hda_intel
00fc 8086a123 10 df04a004 0 0 0 f041 0 0 100 0 0 0 20 0 0 i801_smbus
00fe 808615b7 7e df000000 0 0 0 0 0 0 20000 0 0 0 0 0 0 e1000e
0200 104c8240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
/proc/driver 驱动信息
# cat /proc/driver/rtc
rtc_time : 04:16:09
rtc_date : 2020-07-05
alrm_time : 00:00:00
alrm_date : 2020-07-05
alarm_IRQ : no
alrm_pending : no
update IRQ enabled : no
periodic IRQ enabled : no
periodic IRQ frequency : 1024
max user IRQ frequency : 64
24hr : yes
periodic_IRQ : no
update_IRQ : no
HPET_emulated : yes
BCD : yes
DST_enable : no
periodic_freq : 1024
batt_status : okay
/proc/fs 文件系统信息
# cat /proc/fs/ext4/sda5/options
rw
bsddf
nogrpid
block_validity
dioread_lock
nodiscard
delalloc
nowarn_on_error
journal_checksum
barrier
auto_da_alloc
user_xattr
acl
noquota
resuid=0
resgid=0
errors=remount-ro
commit=5
min_batch_time=0
max_batch_time=15000
stripe=0
data=ordered
inode_readahead_blks=32
init_itable=10
max_dir_size_kb=0
/proc/ide ide设备信息
/proc/irq 中断请求设备信息
/proc/net 网卡设备信息
/proc/scsi scsi设备信息
/proc/tty tty设备信息
# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0
10: uart:unknown port:00000000 irq:0
11: uart:unknown port:00000000 irq:0
12: uart:unknown port:00000000 irq:0
13: uart:unknown port:00000000 irq:0
14: uart:unknown port:00000000 irq:0
15: uart:unknown port:00000000 irq:0
16: uart:unknown port:00000000 irq:0
17: uart:unknown port:00000000 irq:0
18: uart:unknown port:00000000 irq:0
19: uart:unknown port:00000000 irq:0
20: uart:unknown port:00000000 irq:0
21: uart:unknown port:00000000 irq:0
22: uart:unknown port:00000000 irq:0
23: uart:unknown port:00000000 irq:0
24: uart:unknown port:00000000 irq:0
25: uart:unknown port:00000000 irq:0
26: uart:unknown port:00000000 irq:0
27: uart:unknown port:00000000 irq:0
28: uart:unknown port:00000000 irq:0
29: uart:unknown port:00000000 irq:0
30: uart:unknown port:00000000 irq:0
31: uart:unknown port:00000000 irq:0
/proc/net/dev 显示网络适配器及统计信息
/proc/vmstat 虚拟内存统计信息
# cat /proc/vmstat
nr_free_pages 35480
nr_zone_inactive_anon 297270
nr_zone_active_anon 1075329
nr_zone_inactive_file 237133
nr_zone_active_file 239790
nr_zone_unevictable 15879
nr_zone_write_pending 761
nr_mlock 12
nr_page_table_pages 13456
nr_kernel_stack 14176
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 92567697
numa_miss 0
numa_foreign 0
numa_interleave 41581
numa_local 92567697
numa_other 0
nr_inactive_anon 297270
nr_active_anon 1075304
nr_inactive_file 237133
nr_active_file 239790
nr_unevictable 15879
nr_slab_reclaimable 36653
nr_slab_unreclaimable 34713
nr_isolated_anon 0
nr_isolated_file 0
workingset_nodes 8162
workingset_refault 141186
workingset_activate 128089
workingset_restore 700
workingset_nodereclaim 8895
nr_anon_pages 1118604
nr_mapped 261412
nr_file_pages 746864
nr_dirty 761
nr_writeback 0
nr_writeback_temp 0
nr_shmem 269838
nr_shmem_hugepages 0
nr_shmem_pmdmapped 0
nr_file_hugepages 0
nr_file_pmdmapped 0
nr_anon_transparent_hugepages 0
nr_unstable 0
nr_vmscan_write 40210
nr_vmscan_immediate_reclaim 67
nr_dirtied 3867506
nr_written 3318601
nr_kernel_misc_reclaimable 0
nr_dirty_threshold 95470
nr_dirty_background_threshold 47676
pgpgin 3334711
pgpgout 14174049
pswpin 344
pswpout 40210
pgalloc_dma 2
pgalloc_dma32 25210028
pgalloc_normal 69309993
pgalloc_movable 0
allocstall_dma 0
allocstall_dma32 0
allocstall_normal 0
allocstall_movable 0
pgskip_dma 0
pgskip_dma32 0
pgskip_normal 0
pgskip_movable 0
pgfree 94556658
pgactivate 5583380
pgdeactivate 614428
pglazyfree 508012
pgfault 95479389
pgmajfault 16239
pglazyfreed 746
pgrefill 705060
pgsteal_kswapd 1188204
pgsteal_direct 0
pgscan_kswapd 1466881
pgscan_direct 0
pgscan_direct_throttle 0
zone_reclaim_failed 0
pginodesteal 0
slabs_scanned 1615015
kswapd_inodesteal 172914
kswapd_low_wmark_hit_quickly 226
kswapd_high_wmark_hit_quickly 99
pageoutrun 520
pgrotated 45149
drop_pagecache 0
drop_slab 0
oom_kill 0
numa_pte_updates 0
numa_huge_pte_updates 0
numa_hint_faults 0
numa_hint_faults_local 0
numa_pages_migrated 0
pgmigrate_success 292
pgmigrate_fail 210
compact_migrate_scanned 511
compact_free_scanned 4888
compact_isolated 807
compact_stall 0
compact_fail 0
compact_success 0
compact_daemon_wake 1
compact_daemon_migrate_scanned 511
compact_daemon_free_scanned 4888
htlb_buddy_alloc_success 0
htlb_buddy_alloc_fail 0
unevictable_pgs_culled 6472873
unevictable_pgs_scanned 9731536
unevictable_pgs_rescued 6420820
unevictable_pgs_mlocked 2002
unevictable_pgs_munlocked 1990
unevictable_pgs_cleared 0
unevictable_pgs_stranded 0
thp_fault_alloc 0
thp_fault_fallback 0
thp_collapse_alloc 0
thp_collapse_alloc_failed 0
thp_file_alloc 0
thp_file_mapped 0
thp_split_page 0
thp_split_page_failed 0
thp_deferred_split_page 0
thp_split_pmd 0
thp_split_pud 0
thp_zero_page_alloc 0
thp_zero_page_alloc_failed 0
thp_swpout 0
thp_swpout_fallback 0
balloon_inflate 0
balloon_deflate 0
balloon_migrate 0
swap_ra 86
swap_ra_hit 38
/proc/vmcore 内核panic时的内存映像
/proc/diskstats 取得磁盘信息
# cat /proc/diskstats
7 0 loop0 48 0 688 695 0 0 0 0 0 96 644 0 0 0 0
7 1 loop1 4787 0 10166 34577 0 0 0 0 0 872 31520 0 0 0 0
7 2 loop2 57 0 2138 1132 0 0 0 0 0 120 1064 0 0 0 0
7 3 loop3 60 0 2126 543 0 0 0 0 0 92 484 0 0 0 0
7 4 loop4 1500 0 3592 9757 0 0 0 0 0 668 9108 0 0 0 0
7 5 loop5 5182 0 12370 50893 0 0 0 0 0 1132 47332 0 0 0 0
7 6 loop6 9906 0 20404 57185 0 0 0 0 0 1716 51748 0 0 0 0
7 7 loop7 43 0 678 733 0 0 0 0 0 100 684 0 0 0 0
8 0 sda 62475 31565 6616608 625859 666982 265602 28370898 2977046 0 666856 2741276 0 0 0 0
8 1 sda1 276 0 21216 2990 2 0 2 0 0 444 2736 0 0 0 0
8 2 sda2 3 0 6 32 0 0 0 0 0 20 24 0 0 0 0
8 5 sda5 61752 31565 6577386 622212 633817 265602 28370896 2928366 0 662648 2695364 0 0 0 0
11 0 sr0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 8 loop8 43 0 672 459 0 0 0 0 0 72 420 0 0 0 0
7 9 loop9 12145 0 24876 85896 0 0 0 0 0 1496 81672 0 0 0 0
7 10 loop10 2 0 16 0 0 0 0 0 0 4 0 0 0 0 0
/proc/schedstat kernel调度器的统计信息
# cat /proc/schedstat
version 15
timestamp 4316543440
cpu0 0 0 0 0 0 0 7321154443315 2301895016001 57878006
domain0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
cpu1 0 0 0 0 0 0 7267824478815 2261768590304 55301178
domain0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
/proc/zoneinfo 显示内存空间的统计信息,对分析虚拟内存行为很有用
# cat /proc/zoneinfo
Node 0, zone DMA
per-node stats
nr_inactive_anon 296190
nr_active_anon 1098689
nr_inactive_file 214355
nr_active_file 236619
nr_unevictable 15935
nr_slab_reclaimable 35604
nr_slab_unreclaimable 34624
nr_isolated_anon 0
nr_isolated_file 0
workingset_nodes 8434
workingset_refault 142484
workingset_activate 128103
workingset_restore 713
workingset_nodereclaim 8945
nr_anon_pages 1141753
nr_mapped 258757
nr_file_pages 720141
nr_dirty 709
nr_writeback 0
nr_writeback_temp 0
nr_shmem 269043
nr_shmem_hugepages 0
nr_shmem_pmdmapped 0
nr_file_hugepages 0
nr_file_pmdmapped 0
nr_anon_transparent_hugepages 0
nr_unstable 0
nr_vmscan_write 40382
nr_vmscan_immediate_reclaim 67
nr_dirtied 3871358
nr_written 3322678
nr_kernel_misc_reclaimable 0
pages free 3960
min 33
low 41
high 49
spanned 4095
present 3983
managed 3962
protection: (0, 2076, 7759, 7759, 7759)
nr_free_pages 3960
nr_zone_inactive_anon 0
nr_zone_active_anon 0
nr_zone_inactive_file 0
nr_zone_active_file 0
nr_zone_unevictable 0
nr_zone_write_pending 0
nr_mlock 0
nr_page_table_pages 0
nr_kernel_stack 0
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 1
numa_miss 0
numa_foreign 0
numa_interleave 0
numa_local 1
numa_other 0
pagesets
cpu: 0
count: 0
high: 0
batch: 1
vm stats threshold: 4
cpu: 1
count: 0
high: 0
batch: 1
vm stats threshold: 4
node_unreclaimable: 0
start_pfn: 1
Node 0, zone DMA32
pages free 21063
min 4512
low 5640
high 6768
spanned 1044480
present 560060
managed 543676
protection: (0, 0, 5682, 5682, 5682)
nr_free_pages 21063
nr_zone_inactive_anon 68032
nr_zone_active_anon 331094
nr_zone_inactive_file 81442
nr_zone_active_file 29781
nr_zone_unevictable 3236
nr_zone_write_pending 32
nr_mlock 0
nr_page_table_pages 1443
nr_kernel_stack 1132
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 25172868
numa_miss 0
numa_foreign 0
numa_interleave 0
numa_local 25172868
numa_other 0
pagesets
cpu: 0
count: 66
high: 378
batch: 63
vm stats threshold: 24
cpu: 1
count: 307
high: 378
batch: 63
vm stats threshold: 24
node_unreclaimable: 0
start_pfn: 4096
Node 0, zone Normal
pages free 15457
min 12349
low 15436
high 18523
spanned 1499136
present 1499136
managed 1456828
protection: (0, 0, 0, 0, 0)
nr_free_pages 15457
nr_zone_inactive_anon 228158
nr_zone_active_anon 767595
nr_zone_inactive_file 132913
nr_zone_active_file 206838
nr_zone_unevictable 12694
nr_zone_write_pending 676
nr_mlock 12
nr_page_table_pages 11945
nr_kernel_stack 12836
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 67660091
numa_miss 0
numa_foreign 0
numa_interleave 41581
numa_local 67660091
numa_other 0
pagesets
cpu: 0
count: 302
high: 378
batch: 63
vm stats threshold: 28
cpu: 1
count: 76
high: 378
batch: 63
vm stats threshold: 28
node_unreclaimable: 0
start_pfn: 1048576
Node 0, zone Movable
pages free 0
min 0
low 0
high 0
spanned 0
present 0
managed 0
protection: (0, 0, 0, 0, 0)
Node 0, zone Device
pages free 0
min 0
low 0
high 0
spanned 0
present 0
managed 0
protection: (0, 0, 0, 0, 0)
3、以下是/proc目录中进程N的信息
/proc/N pid为N的进程信息
/proc/N/cmdline 进程启动命令
/proc/N/cwd 链接到进程当前工作目录
/proc/N/environ 进程环境变量列表
/proc/N/exe 链接到进程的执行命令文件
/proc/N/fd 包含进程相关的所有的文件描述符
/proc/N/maps 与进程相关的内存映射信息
/proc/N/mem 指代进程持有的内存,不可读
/proc/N/root 链接到进程的根目录
/proc/N/stat 进程的状态
/proc/N/statm 进程使用的内存的状态
/proc/N/status 进程状态信息,比stat/statm更具可读性
/proc/self 链接到当前正在运行的进程
# cat /proc/self/status
Name: cat
Umask: 0022
State: R (running)
Tgid: 44403
Ngid: 0
Pid: 44403
PPid: 23131
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups: 0
NStgid: 44403
NSpid: 44403
NSpgid: 44403
NSsid: 23121
VmPeak: 16852 kB
VmSize: 16852 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 596 kB
VmRSS: 596 kB
RssAnon: 68 kB
RssFile: 528 kB
RssShmem: 0 kB
VmData: 316 kB
VmStk: 132 kB
VmExe: 28 kB
VmLib: 1640 kB
VmPTE: 52 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
THP_enabled: 1
Threads: 1
SigQ: 0/31099
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: 0000003fffffffff
CapEff: 0000003fffffffff
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Speculation_Store_Bypass: thread vulnerable
Cpus_allowed: 3
Cpus_allowed_list: 0-1
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 0
nonvoluntary_ctxt_switches: 0