1. free
2. top
3. vmstat
4. slabtop;
5. pmap
6. dmesg
7. /proc/meminfo
8. /proc/sys/vm 目录下的文件
9. sync
10./proc/zoneinfo
11./proc/pagetypeinfo
查看内存工具:
1.free
free - Display amount of free and used memory in the system
root@ubuntu:/home/ricky# free -h
total used free shared buffers cached
Mem: 2.0G 712M 1.3G 7.3M 43M 296M
-/+ buffers/cache: 371M 1.6G
Swap: 2.0G 0B 2.0G
//shared: 共享内存
//buffers: block buffers
//cached: page cache
2.top
top - 05:49:21 up 18 min, 2 users, load average: 0.07, 0.18, 0.30
Tasks: 193 total, 1 running, 192 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.4 us, 6.0 sy, 0.9 ni, 87.0 id, 3.6 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem: 2063844 total, 1093352 used, 970492 free, 134932 buffers
KiB Swap: 2094076 total, 0 used, 2094076 free. 519908 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4068 root 20 0 5424 1332 988 R 11.9 0.1 0:00.03 top
1065 root 20 0 181812 37872 17900 S 6.0 1.8 0:25.80 Xorg
1 root 20 0 4600 2584 1444 S 0.0 0.1 0:03.88 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.43 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root 20 0 0 0 0 S 0.0 0.0 0:04.06 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0.0 0.0 0:00.85 migration/0
10 root rt 0 0 0 0 S 0.0 0.0 0:00.86 watchdog/0
11 root rt 0 0 0 0 S 0.0 0.0 0:00.18 watchdog/1
12 root rt 0 0 0 0 S 0.0 0.0 0:00.14 migration/1
13 root 20 0 0 0 0 S 0.0 0.0 0:00.26 ksoftirqd/1
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0
15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
top是可交互的命令工具
按下A/M/N/P/T可以进行排序,如下:
SORTING of task window
For compatibility, this top supports most of the former top sort keys. Since this is primarily a service to former top
users, these commands do not appear on any help screen.
command sorted-field supported
A start time (non-display) No
M %MEM Yes
N PID Yes
P %CPU Yes
T TIME+ Yes
按下f键(Fields)可以打开或者关闭指定的列,如下,
Fields Management for window 1:Def, whose current sort field is TIME+
Navigate with Up/Dn, Right selects for move then
or Left commits,
'd' or toggles display, 's' sets sort. Use 'q' or to end!
* PID = Process Id ENVIRON = Environment vars
* USER = Effective User Name vMj = Major Faults delta
* PR = Priority vMn = Minor Faults delta
* NI = Nice Value USED = Res+Swap Size (KiB)
* VIRT = Virtual Image (KiB) nsIPC = IPC namespace Inode
* RES = Resident Size (KiB) nsMNT = MNT namespace Inode
* SHR = Shared Memory (KiB) nsNET = NET namespace Inode
* S = Process Status nsPID = PID namespace Inode
* %CPU = CPU Usage nsUSER = USER namespace Inode
* %MEM = Memory Usage (RES) nsUTS = UTS namespace Inode
* TIME+ = CPU Time, hundredths
* COMMAND = Command Name/Line
PPID = Parent Process pid
UID = Effective User Id
RUID = Real User Id
RUSER = Real User Name
SUID = Saved User Id
SUSER = Saved User Name
GID = Group Id
GROUP = Group Name
PGRP = Process Group Id
TTY = Controlling Tty
TPGID = Tty Process Grp Id
SID = Session Id
nTH = Number of Threads
P = Last Used Cpu (SMP)
TIME = CPU Time
SWAP = Swapped Size (KiB)
CODE = Code Size (KiB)
DATA = Data+Stack (KiB)
nMaj = Major Page Faults
nMin = Minor Page Faults
nDRT = Dirty Pages Count
WCHAN = Sleeping in Function
Flags = Task Flags
CGROUPS = Control Groups
SUPGIDS = Supp Groups IDs
SUPGRPS = Supp Groups Names
TGID = Thread Group Id
其中如下几个filed 与内存有关。
SWAP = Swapped Size (KiB)
CODE = Code Size (KiB)
DATA = Data+Stack (KiB)
nMaj = Major Page Faults
nMin = Minor Page Faults
nDRT = Dirty Pages Count
page fault 又分为几种,major page fault、 minor page fault、 invalid(segment fault)。
major page fault也称为hard page fault, 指需要访问的内存不在虚拟地址空间,也不在物理内存中,需要从慢速设备载入。从swap回到物理内存也是hard page fault。
minor page fault也称为soft page fault, 指需要访问的内存不在虚拟地址空间,但是在物理内存中,只需要MMU建立物理内存和虚拟地址空间的映射关系即可。
(通常是多个进程访问同一个共享内存中的数据,可能某些进程还没有建立起映射关系,所以访问时会出现soft page fault)
invalid fault也称为segment fault, 指进程需要访问的内存地址不在它的虚拟地址空间范围内,属于越界访问,内核会报segment fault错误。
3.vmstat
vmstat - Report virtual memory statistics
root@ubuntu:/home/ricky# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 980532 134948 520236 0 0 34 10 41 70 1 1 98 0 0
Memory
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
inact: the amount of inactive memory. (-a option)
active: the amount of active memory. (-a option)
Swap
si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).
4. slabtop
slabtop - display kernel slab cache information in real time
/proc/slabinfo
Active / Total Objects (% used) : 350745 / 352998 (99.4%)
Active / Total Slabs (% used) : 7986 / 7986 (100.0%)
Active / Total Caches (% used) : 67 / 96 (69.8%)
Active / Total Size (% used) : 59301.82K / 59760.34K (99.2%)
Minimum / Average / Maximum Object : 0.01K / 0.17K / 8.00K
OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
70944 70944 100% 0.12K 2217 32 8868K dentry
62342 62342 100% 0.05K 854 73 3416K buffer_head
40742 40742 100% 0.61K 1567 26 25072K ext4_inode_cache
34752 34483 99% 0.06K 543 64 2172K kmalloc-64
21252 21156 99% 0.09K 506 42 2024K kmalloc-96
19840 18831 94% 0.03K 155 128 620K kmalloc-32
19456 19456 100% 0.03K 152 128 608K ext4_extent_status
13568 13568 100% 0.02K 53 256 212K kmalloc-16
10212 10212 100% 0.34K 444 23 3552K inode_cache
8704 8704 100% 0.03K 68 128 272K anon_vma
7875 7745 98% 0.19K 375 21 1500K kmalloc-192
7168 7168 100% 0.01K 14 512 56K kmalloc-8
6205 6205 100% 0.05K 73 85 292K Acpi-State
5772 5772 100% 0.30K 222 26 1776K radix_tree_node
4420 4420 100% 0.02K 26 170 104K nsproxy
3654 3598 98% 0.37K 174 21 1392K proc_inode_cache
5. pmap
pmap - report memory map of a process
root@ubuntu:/home/ricky/code# pmap 5162
5162: ./a.out
08048000 4K r-x-- a.out
08049000 4K r---- a.out
0804a000 4K rw--- a.out
b756a000 408K rw--- [ anon ]
b75d0000 1700K r-x-- libc-2.19.so
b7779000 8K r---- libc-2.19.so
b777b000 4K rw--- libc-2.19.so
b777c000 12K rw--- [ anon ]
b7794000 8K rw--- [ anon ]
b7796000 4K r-x-- [ anon ]
b7797000 128K r-x-- ld-2.19.so
b77b7000 4K r---- ld-2.19.so
b77b8000 4K rw--- ld-2.19.so
bfdaf000 132K rw--- [ stack ]
total 2424K
6.dmesg
dmesg - print or control the kernel ring buffer
显示内核启动的日志 - 内存相关log:
1 [ 0.000000] PERCPU: Embedded 14 pages/cpu @f7b82000 s36096 r0 d21248 u57344
2 [ 0.000000] pcpu-alloc: s36096 r0 d21248 u57344 alloc=14*4096
3 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7
4 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522373
5 [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-32-generic root=UUID=80483beb-4610-4202-8e4f-6e3774c72ce6 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet
6 [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
7 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
8 [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
9 [ 0.000000] Initializing CPU#0
10 [ 0.000000] xsave: enabled xstate_bv 0x3, cntxt size 0x240
11 [ 0.000000] allocated 4194296 bytes of page_cgroup
12 [ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
13 [ 0.000000] Initializing HighMem for node 0 (00037bfe:00080000)
14 [ 0.000000] Memory: 2044664K/2096628K available (6528K kernel code, 639K rwdata, 2760K rodata, 872K init, 924K bss, 51964K reserved, 1183624K highmem)
15 [ 0.000000] virtual kernel memory layout:
16 [ 0.000000] fixmap : 0xfff14000 - 0xfffff000 ( 940 kB)
17 [ 0.000000] pkmap : 0xffc00000 - 0xffe00000 (2048 kB)
18 [ 0.000000] vmalloc : 0xf83fe000 - 0xffbfe000 ( 120 MB)
19 [ 0.000000] lowmem : 0xc0000000 - 0xf7bfe000 ( 891 MB)
20 [ 0.000000] .init : 0xc19b4000 - 0xc1a8e000 ( 872 kB)
21 [ 0.000000] .data : 0xc1660532 - 0xc19b3e80 (3406 kB)
22 [ 0.000000] .text : 0xc1000000 - 0xc1660532 (6529 kB)
7. cat /proc/meminfo
root@ubuntu:/proc# cat meminfo
MemTotal: 2063844 kB
MemFree: 746660 kB
Buffers: 138740 kB
Cached: 656536 kB
SwapCached: 0 kB
Active: 763260 kB
Inactive: 446108 kB
Active(anon): 415072 kB
Inactive(anon): 10880 kB
Active(file): 348188 kB
Inactive(file): 435228 kB
Unevictable: 32 kB
Mlocked: 32 kB
HighTotal: 1183624 kB
HighFree: 489896 kB
LowTotal: 880220 kB
LowFree: 256764 kB
SwapTotal: 2094076 kB
SwapFree: 2094076 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 414204 kB
Mapped: 155944 kB
Shmem: 11864 kB
Slab: 61084 kB
SReclaimable: 45424 kB
SUnreclaim: 15660 kB
KernelStack: 3160 kB
PageTables: 7428 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3125996 kB
Committed_AS: 2766012 kB
VmallocTotal: 122880 kB
VmallocUsed: 23744 kB
VmallocChunk: 61636 kB
HardwareCorrupted: 0 kB
AnonHugePages: 186368 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 28664 kB
DirectMap2M: 884736 kB
CommitLimit:CommitLimit
可以参考:
http://www.firefoxbug.com/index.php/archives/2800/
8. /proc/sys/vm 目录下的文件
root@ubuntu:/proc/sys/vm# ll
total 0
dr-xr-xr-x 1 root root 0 Jun 10 05:31 ./
dr-xr-xr-x 1 root root 0 Jun 10 05:31 ../
-rw-r--r-- 1 root root 0 Jun 10 09:18 admin_reserve_kbytes
-rw-r--r-- 1 root root 0 Jun 10 09:18 block_dump
--w------- 1 root root 0 Jun 10 09:18 compact_memory
-rw-r--r-- 1 root root 0 Jun 10 09:18 dirty_background_bytes
-rw-r--r-- 1 root root 0 Jun 10 05:32 dirty_background_ratio
-rw-r--r-- 1 root root 0 Jun 10 09:18 dirty_bytes
-rw-r--r-- 1 root root 0 Jun 10 09:18 dirty_expire_centisecs
-rw-r--r-- 1 root root 0 Jun 10 05:32 dirty_ratio
-rw-r--r-- 1 root root 0 Jun 10 05:32 dirty_writeback_centisecs
-rw-r--r-- 1 root root 0 Jun 10 09:18 drop_caches
-rw-r--r-- 1 root root 0 Jun 10 09:18 extfrag_threshold
-rw-r--r-- 1 root root 0 Jun 10 09:18 highmem_is_dirtyable
-rw-r--r-- 1 root root 0 Jun 10 09:18 hugepages_treat_as_movable
-rw-r--r-- 1 root root 0 Jun 10 09:18 hugetlb_shm_group
-rw-r--r-- 1 root root 0 Jun 10 05:32 laptop_mode
-rw-r--r-- 1 root root 0 Jun 10 09:18 legacy_va_layout
-rw-r--r-- 1 root root 0 Jun 10 09:18 lowmem_reserve_ratio
-rw-r--r-- 1 root root 0 Jun 10 09:18 max_map_count
-rw-r--r-- 1 root root 0 Jun 10 09:18 memory_failure_early_kill
-rw-r--r-- 1 root root 0 Jun 10 09:18 memory_failure_recovery
-rw-r--r-- 1 root root 0 Jun 10 09:18 min_free_kbytes
-rw-r--r-- 1 root root 0 Jun 10 05:31 mmap_min_addr
-rw-r--r-- 1 root root 0 Jun 10 09:18 nr_hugepages
-rw-r--r-- 1 root root 0 Jun 10 09:18 nr_overcommit_hugepages
-r--r--r-- 1 root root 0 Jun 10 09:18 nr_pdflush_threads
-rw-r--r-- 1 root root 0 Jun 10 09:18 oom_dump_tasks
-rw-r--r-- 1 root root 0 Jun 10 09:18 oom_kill_allocating_task
-rw-r--r-- 1 root root 0 Jun 10 05:31 overcommit_memory
-rw-r--r-- 1 root root 0 Jun 10 09:18 overcommit_ratio
-rw-r--r-- 1 root root 0 Jun 10 09:18 page-cluster
-rw-r--r-- 1 root root 0 Jun 10 09:18 panic_on_oom
-rw-r--r-- 1 root root 0 Jun 10 09:18 percpu_pagelist_fraction
-rw-r--r-- 1 root root 0 Jun 10 09:18 scan_unevictable_pages
-rw-r--r-- 1 root root 0 Jun 10 09:18 stat_interval
-rw-r--r-- 1 root root 0 Jun 10 09:18 swappiness
-rw-r--r-- 1 root root 0 Jun 10 09:18 user_reserve_kbytes
-rw-r--r-- 1 root root 0 Jun 10 09:18 vdso_enabled
-rw-r--r-- 1 root root 0 Jun 10 09:18 vfs_cache_pressure
解释:
swappiness:
(0~100), 该值越高则linux越倾向于将部分长期没有用到的页swap到交换磁盘。
swappiness=0,不会交换匿名页面到交换磁盘,除非系统内存非常低
swappiness=100, 内核积极回收匿名页面。
panic_on_oom:
用于控制如何处理out-of-memory,可选值包括0/1/2
0:当内存不足时内核调用OOM killer杀死一些rogue进程,每个进程描述符都有一个oom_score标示,oom killer会选择oom_score较大的进程
1:发生了OOM以后,如果有mempolicy/cpusets的进程限制,而这些nodes导致了内存问题的时候,OOM Killer会干掉这些中的一个,系统也会恢复
2:OOM后必然panic
备注:每个进程有一个oom_score_adj (取值范围:-1000 - 1000)与此参数有关,-1000表示不会被oom killer选中。
旧版本中用的是oom_adj(-17,15),不过oom_adj逐渐会被oom_score_adj 取代。
比如:
cat /proc//oom_score_adj
如下链接非常重要:
https://www.cnblogs.com/tolimit/p/5065761.html
admin_reserve_kbytes:给有cap_sys_admin权限的用户保留的内存数量(默认值是 min(free_page * 0.03, 8MB))
drop_caches:
写入数值可以使内核释放page_cache,dentries和inodes缓存所占的内存。
1:只释放page_cache
2:只释放dentries和inodes缓存
3:释放page_cache、dentries和inodes缓存
oom_dump_tasks
如果启用,在内核执行OOM-killing时会打印系统内进程的信息(不包括内核线程),信息包括pid、uid、tgid、vm size、rss、nr_ptes,swapents,oom_score_adj和进程名称。这些信息可以帮助找出为什么OOM killer被执行,找到导致OOM的进程,以及了解为什么进程会被选中。
0:不打印系统内进程信息
1:打印系统内进程信息
memory_failure_early_kill:
控制发生某个内核无法处理的内存错误发生的时候,如何去杀掉这个进程。当这些错误页有swap镜像的时候,内核会很好的处理这个错误,不会影响任何应用程序,但是如果没有的话,内核会把进程杀掉,避免内存错误的扩大
1:在发现内存错误的时候,就会把所有拥有此内存页的进程都杀掉
0:只是对这部分页进行unmap,然后把第一个试图进入这个页的进程杀掉
memory_failure_recovery:
是否开启内存错误恢复机制
1:开启
0:一旦出现内存错误,就panic
https://blog.csdn.net/joyeu/article/details/20063429
min_free_kbytes:代表系统所保留空闲内存的最低限,在系统初始化时会根据内存大小计算一个默认值,计算规则是:
min_free_kbytes = sqrt(lowmem_kbytes * 16) = 4 * sqrt(lowmem_kbytes)(注:lowmem_kbytes即可认为是系统内存大小)
min_free_kbytes的主要用途是计算影响内存回收的三个参数 watermark[min/low/high]
三个watermark的计算方法:
watermark[min] = min_free_kbytes换算为page单位即可,假设为min_free_pages。
因为是每个zone各有一套watermark参数,实际计算效果是根据各个zone大小所占内存总大小的比例,而算出来的per zone min_free_pages)
watermark[low] = watermark[min] * 5 / 4
watermark[high] = watermark[min] * 3 / 2
https://blog.csdn.net/joyeu/article/details/20063429
lowmem_reserve_ratio
1.作用
除了min_free_kbytes会在每个zone上预留一部分内存外,lowmem_reserve_ratio是在各个zone之间进行一定的防卫预留,主要是防止高端zone在没内存的情况下过度使用低端zone的内存资源。
例如现在常见的一个node的机器有三个zone: DMA,DMA32和NORMAL。DMA和DMA32属于低端zone,内存也较小,如96G内存的机器两个zone总和才1G左右,NORMAL就相对属于高端内存(现在一般没有HIGH zone),而且数量较大(>90G)。低端内存有一定的特殊作用比如发生DMA时只能分配DMA zone的低端内存,因此需要在 尽量可以使用高端内存时 而 不使用低端内存,同时防止高端内存分配不足的时候抢占稀有的低端内存
http://www.firefoxbug.com/index.php/archives/2800/
overcommit_memory:
0 — 默认设置。个人理解:当应用进程尝试申请内存时,内核会做一个检测。内核将检查是否有足够的可用内存供应用进程使用;如果有足够的可用内存,内存申请允许;否则,内存申请失败,并把错误返回给应用进程。举个例子,比如1G的机器,A进程已经使用了500M,当有另外进程尝试malloc 500M的内存时,内核就会进行check,发现超出剩余可用内存,就会提示失败。
1 — 对于内存的申请请求,内核不会做任何check,直到物理内存用完,触发OOM杀用户态进程。同样是上面的例子,1G的机器,A进程500M,B进程尝试malloc 500M,会成功,但是一旦kernel发现内存使用率接近1个G(内核有策略),就触发OOM,杀掉一些用户态的进程(有策略的杀)。
2 — 当请求申请的内存 >= SWAP内存大小 + 物理内存 * N,则拒绝此次内存申请。
解释下这个N:N是一个百分比,根据overcommit_ratio/100来确定,比如overcommit_ratio=50,那么N就是50%。
overcommit_ratio:
只有当vm.overcommit_memory = 2的时候才会生效,内存可申请内存为
SWAP内存大小 + 物理内存 * overcommit_ratio/100
percpu_pagelist_fraction:
每个CPU能从每个zone所能分配到的pages的最大值(单位每个zone的1/X),0为不限制
9. sync
NAME
sync - flush file system buffers
DESCRIPTION
Force changed blocks to disk, update the super block.
11./proc/pagetypeinfo
root@ubuntu:/usr/local# cat /proc/pagetypeinfo
Page block order: 9
Pages per block: 512
Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10
Node 0, zone DMA, type Unmovable 1 1 3 0 0 1 0 0 0 0 0
Node 0, zone DMA, type Reclaimable 1 1 0 0 0 1 1 0 1 1 0
Node 0, zone DMA, type Movable 2 1 1 0 0 1 0 1 1 0 0
Node 0, zone DMA, type Reserve 0 0 0 0 0 0 0 0 0 1 0
Node 0, zone DMA, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Unmovable 7 1 0 0 3 7 12 9 3 0 0
Node 0, zone Normal, type Reclaimable 1 1 3 2 2 0 1 0 0 1 0
Node 0, zone Normal, type Movable 136 90 63 13 1 0 7 3 2 0 78
Node 0, zone Normal, type Reserve 0 0 0 0 0 0 0 0 0 0 1
Node 0, zone Normal, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone HighMem, type Unmovable 0 1 0 7 21 11 8 8 2 2 2
Node 0, zone HighMem, type Reclaimable 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone HighMem, type Movable 27 27 42 13 24 8 5 2 3 5 148
Node 0, zone HighMem, type Reserve 0 0 0 0 0 0 0 0 0 0 1
Node 0, zone HighMem, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone HighMem, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Number of blocks type Unmovable Reclaimable Movable Reserve CMA Isolate
Node 0, zone DMA 1 2 4 1 0 0
Node 0, zone Normal 44 24 368 2 0 0
Node 0, zone HighMem 23 0 555 1 0 0
12. oom killer
人为制造一个oom killer:
echo f > /proc/sysrq-trigger
另外,向sysrq写入命令的帮助文件如下,上例中写入的f: memory-full-oom-kill(f),也就是执行oom kill
SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)