1ZRAMCTL(8)                   System Administration                  ZRAMCTL(8)
2
3
4

NAME

6       zramctl - set up and control zram devices
7

SYNOPSIS

9       Get info:
10
11            zramctl [options]
12
13       Reset zram:
14
15            zramctl -r zramdev...
16
17       Print name of first unused zram device:
18
19            zramctl -f
20
21       Set up a zram device:
22
23            zramctl [-f | zramdev] [-s size] [-t number] [-a algorithm]
24
25

DESCRIPTION

27       zramctl is used to quickly set up zram device parameters, to reset zram
28       devices, and to query the status of used zram devices.
29
30       If no option is given, all non-zero size zram devices are shown.
31

OPTIONS

33       -a, --algorithm lzo|lz4
34              Set the compression algorithm to be used for compressing data in
35              the zram device.
36
37       -f, --find
38              Find  the  first  unused  zram  device.  If a --size argument is
39              present, then initialize the device.
40
41       -n, --noheadings
42              Do not print a header line in status output.
43
44       -o, --output list
45              Define the status output columns  to  be  used.   If  no  output
46              arrangement  is  specified,  then  a  default  set is used.  Use
47              --help to get a list of all supported columns.
48
49       --raw  Use the raw format for status output.
50
51       -r, --reset
52              Reset the options of the specified zram device(s).  Zram  device
53              settings can be changed only after a reset.
54
55       -s, --size size
56              Create  a  zram  device of the specified size.  Zram devices are
57              aligned to memory pages; when the requested size is not a multi‐
58              ple  of  the page size, it will be rounded up to the next multi‐
59              ple.  When not otherwise specified, the unit of the size parame‐
60              ter is bytes.
61
62              The size argument may be followed by the multiplicative suffixes
63              KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB,
64              ZiB  and YiB (the "iB" is optional, e.g., "K" has the same mean‐
65              ing as "KiB") or the suffixes KB (=1000), MB  (=1000*1000),  and
66              so on for GB, TB, PB, EB, ZB and YB.
67
68       -t, --streams number
69              Set  the  maximum number of compression streams that can be used
70              for the device.  The default is one stream.
71
72       -V, --version
73              Display version information and exit.
74
75       -h, --help
76              Display help text and exit.
77
78

RETURN VALUE

80       zramctl returns 0 on success, nonzero on failure.
81
82

FILES

84       /dev/zram[0..N]
85              zram block devices
86
87

EXAMPLE

89       The following commands set up a zram device with a size of one gigabyte
90       and use it as swap device.
91
92              # zramctl --find --size 1024M
93              /dev/zram0
94              # mkswap /dev/zram0
95              # swapon /dev/zram0
96               ...
97              # swapoff /dev/zram0
98              # zramctl --reset /dev/zram0
99

SEE ALSO

101       Linux kernel documentation ⟨http://git.kernel.org/cgit/linux/kernel/git
102       /torvalds/linux.git/tree/Documentation/blockdev/zram.txt⟩.
103

AUTHORS

105       Timofey Titovets <nefelim4ag@gmail.com>
106       Karel Zak <kzak@redhat.com>
107

AVAILABILITY

109       The zramctl command is part of the util-linux package and is  available
110       from https://www.kernel.org/pub/linux/utils/util-linux/.
111
112
113
114util-linux                         July 2014                        ZRAMCTL(8)
Impressum