• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Demonstrations of swapin, the Linux BCC/eBPF version.
2
3
4This tool counts swapins by process, to show which process is affected by
5swapping. For example:
6
7# swapin.py
8Counting swap ins. Ctrl-C to end.
913:36:58
10COMM             PID    COUNT
11
1213:36:59
13COMM             PID    COUNT
14gnome-shell      2239   12410
15
1613:37:00
17COMM             PID    COUNT
18chrome           4536   14635
19
2013:37:01
21COMM             PID    COUNT
22gnome-shell      2239   14
23cron             1180   23
24
2513:37:02
26COMM             PID    COUNT
27gnome-shell      2239   2496
28[...]
29
30While tracing, this showed that PID 2239 (gnome-shell) and PID 4536 (chrome)
31suffered over ten thousand swapins.
32
33
34
35USAGE:
36
37# swapin.py -h
38usage: swapin.py [-h] [-T] [interval] [count]
39
40Count swapin events by process.
41
42positional arguments:
43  interval      output interval, in seconds
44  count         number of outputs
45
46optional arguments:
47  -h, --help    show this help message and exit
48  -T, --notime  do not show the timestamp (HH:MM:SS)
49