1zswap-cli(1)                General Commands Manual               zswap-cli(1)
2
3
4

NAME

6       zswap-cli - command-line tool to control ZSwap Linux kernel module
7

SYNOPSIS

9       zswap-cli [OPTION...]
10

DESCRIPTION

12       ZSwap-cli  is  a simple command-line tool to control ZSwap Linux kernel
13       module.
14

COMMAND-LINE OPTIONS

16   --env
17       Get options from environment variables instead of cmdline.
18
19   --stats
20       Get statistics and current settings of ZSwap kernel module.
21
22       Supported values:
23
24       · 0 - print both ZSwap kernel module settings and debug information;
25
26       · 1 - print ZSwap kernel module settings;
27
28       · 2 - print ZSwap kernel module usage summary;
29
30       · 3 - print ZSwap kernel module debug information.
31
32   -e, --enabled
33       Enable or disable ZSwap kernel module.
34
35   -s, --same_filled_pages_enabled
36       Enable or disable memory pages deduplication.
37
38   -p, --max_pool_percent
39       The maximum percentage of memory that the compressed pool can occupy.
40
41   -c, --compressor
42       The default compression algorithm.
43
44   -z, --zpool
45       The kernel’s zpool type.
46
47   -a, --accept_threhsold_percent
48       The threshold at which ZSwap would start accepting pages again after it
49       became full.
50
51   -h, --help
52       Print help message and exit.
53

ENVIRONMENT OPTIONS

55       ZSwap-cli support of getting options from environment variables.
56
57   Supported options
58       · ZSWAP_ENABLED_VALUE - enable (Y) or disable (N) ZSwap kernel module.
59
60       · ZSWAP_SAME_FILLED_PAGES_ENABLED_VALUE  -  enable  (Y)  or disable (N)
61         memory pages deduplication.
62
63       · ZSWAP_MAX_POOL_PERCENT_VALUE - the maximum percentage of memory  that
64         the compressed pool can occupy (integer from 1 to 100).
65
66       · ZSWAP_COMPRESSOR_VALUE - the default compression algorithm.
67
68       · ZSWAP_ZPOOL_VALUE - the kernel’s zpool type.
69
70       · ZSWAP_ACCEPT_THREHSOLD_PERCENT_VALUE  -  the threshold at which ZSwap
71         would start accepting pages again after it became full (integer  from
72         1 to 100).
73
74   Forwarding options
75       Export environment options using export command:
76
77              export ZSWAP_ENABLED_VALUE=Y
78              export ZSWAP_SAME_FILLED_PAGES_ENABLED_VALUE=Y
79              export ZSWAP_MAX_POOL_PERCENT_VALUE=60
80              export ZSWAP_COMPRESSOR_VALUE=zstd
81              export ZSWAP_ZPOOL_VALUE=z3fold
82              export ZSWAP_ACCEPT_THREHSOLD_PERCENT_VALUE=40
83
84       Start application with --env command-line argument:
85
86              sudo zswap-cli --env
87

EXIT STATUS

89       0: Successful exit.
90
91       1: Insuffient access rights.
92

SYSTEMD UNIT

94       After installation, the systemd-unit zswap-cli.service will be added.
95
96   Changing settings
97       All  settings  are stored in /etc/zswap-cli.conf file.  It use environ‐
98       ment options syntax.
99
100   Enabling unit
101       Enable systemd-unit and run it on system startup:
102
103              sudo systemctl enable --now zswap-cli.service
104
105   Disabling unit
106       Disable systemd-unit and stop runing it on system startup:
107
108              sudo systemctl disable zswap-cli.service
109
110   Running unit
111       You can also run systemd-unit without adding it to startup.
112
113       Start unit and enable ZSwap:
114
115              sudo systemctl start zswap-cli.service
116
117       Stop unit and disable ZSwap:
118
119              sudo systemctl stop zswap-cli.service
120

AUTHORS

122       Copyright (c) 2020 EasyCoding Team and contributors.
123
124
125
126                                                                  zswap-cli(1)
Impressum