1swapin(8)                   System Manager's Manual                  swapin(8)
2
3
4

NAME

6       swapin - Count swapins by process. Uses BCC/eBPF.
7

SYNOPSIS

9       swapin
10
11       -h, --help
12              show this help message and exit
13
14       -T, --notime
15              do not show the timestamp (HH:MM:SS)
16

DESCRIPTION

18       This  tool counts swapins by process, to show which process is affected
19       by swapping (if swap devices are in use). This can explain  a  signifi‐
20       cant  source  of  application  latency, if it has began swapping due to
21       memory pressure on the system.
22
23       This works by tracing the swap_readpage() kernel function using dynamic
24       instrumentation. This tool may need maintenance to keep working if that
25       function changes in later kernels.
26
27       Since this uses BPF, only the root user can use this tool.
28

REQUIREMENTS

30       CONFIG_BPF and BCC.
31

EXAMPLES

33       Count swapins by process, showing per-second summaries.
34              # swapin
35

FIELDS

37       1st    The process name.
38
39       2nd    The process ID.
40
41       3rd    The count of swapins during that interval.
42

OVERHEAD

44       The rate of swapins should be low (bounded by swapin device IOPS), such
45       that the overhead of this tool is expected to be negligible.
46

SOURCE

48       This  originated  as  a  bpftrace  tool  from the book "BPF Performance
49       Tools", published by Addison Wesley (2019):
50
51              http://www.brendangregg.com/bpf-performance-tools-book.html
52
53       See the book for more documentation on this tool.
54
55       This version is in the BCC repository:
56
57              https://github.com/iovisor/bcc
58
59       Also look in the bcc distribution for a  companion  _examples.txt  file
60       containing example usage, output, and commentary for this tool.
61

OS

63       Linux
64

STABILITY

66       Unstable - in development.
67

AUTHOR

69       Brendan Gregg
70

SEE ALSO

72       swapon(8)
73
74
75
76USER COMMANDS                     2019-07-05                         swapin(8)
Impressum