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

ENVIRONMENT OPTIONS

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

CONFIGURATION FILES

93       ZSwap-cli support of getting options from the configuration files.
94
95   Supported options
96       · enabled - enable (Y) or disable (N) ZSwap kernel module.
97
98       · same_filled_pages_enabled - enable (Y) or disable  (N)  memory  pages
99         deduplication.
100
101       · max_pool_percent  -  the  maximum  percentage of memory that the com‐
102         pressed pool can occupy (integer from 1 to 100).
103
104       · compressor - the default compression algorithm.
105
106       · zpool - the kernel’s zpool type.
107
108       · accept_threhsold_percent - the threshold at which ZSwap  would  start
109         accepting pages again after it became full (integer from 1 to 100).
110
111   Forwarding options
112       Start application with --config command-line argument:
113
114              sudo zswap-cli --config /path/to/zswap-cli.conf
115

EXIT STATUS

117       0: Successful exit.
118
119       1: Insuffient access rights.
120

SYSTEMD UNIT

122       After installation, the systemd-unit zswap-cli.service will be added.
123
124   Changing settings
125       All settings are stored in the /etc/zswap-cli/zswap-cli.conf configura‐
126       tion file.  It uses standard key-value systax.
127
128   Enabling unit
129       Enable systemd-unit and run it on system startup:
130
131              sudo systemctl enable --now zswap-cli.service
132
133   Disabling unit
134       Disable systemd-unit and stop runing it on system startup:
135
136              sudo systemctl disable zswap-cli.service
137
138   Running unit
139       You can also run systemd-unit without adding it to startup.
140
141       Start unit and enable ZSwap:
142
143              sudo systemctl start zswap-cli.service
144
145       Stop unit and disable ZSwap:
146
147              sudo systemctl stop zswap-cli.service
148

AUTHORS

150       Copyright (c) 2020 - 2021 EasyCoding Team and contributors.
151
152
153
154                                                                  zswap-cli(1)
Impressum