]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
b9d2ddfb MB |
2 | = zramctl(8) |
3 | :doctype: manpage | |
4 | :man manual: System Administration | |
5 | :man source: util-linux {release-version} | |
6 | :page-layout: base | |
7 | :command: zramctl | |
8 | ||
9 | == NAME | |
10 | ||
11 | zramctl - set up and control zram devices | |
12 | ||
13 | == SYNOPSIS | |
14 | ||
15 | Get info: :: | |
16 | ||
4d297435 | 17 | *zramctl* [options] |
b9d2ddfb MB |
18 | |
19 | Reset zram: :: | |
20 | ||
21 | *zramctl* *-r* _zramdev_... | |
22 | ||
23 | Print name of first unused zram device: :: | |
24 | ||
25 | *zramctl* *-f* | |
26 | ||
27 | Set up a zram device: :: | |
28 | ||
29 | *zramctl* [*-f* | _zramdev_] [*-s* _size_] [*-t* _number_] [*-a* _algorithm_] | |
30 | ||
31 | == DESCRIPTION | |
32 | ||
33 | *zramctl* is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices. | |
34 | ||
35 | If no option is given, all non-zero size zram devices are shown. | |
36 | ||
37 | Note that _zramdev_ node specified on command line has to already exist. The command *zramctl* creates a new _/dev/zram<N>_ nodes only when *--find* option specified. It's possible (and common) that after system boot _/dev/zram<N>_ nodes are not created yet. | |
38 | ||
39 | == OPTIONS | |
40 | ||
41 | *-a*, **--algorithm lzo**|**lz4**|**lz4hc**|**deflate**|*842*:: | |
4eab78d3 | 42 | Set the compression algorithm to be used for compressing data in the zram device. |
b9d2ddfb MB |
43 | |
44 | *-f*, *--find*:: | |
4eab78d3 | 45 | Find the first unused zram device. If a *--size* argument is present, then initialize the device. |
b9d2ddfb MB |
46 | |
47 | *-n*, *--noheadings*:: | |
4eab78d3 | 48 | Do not print a header line in status output. |
b9d2ddfb MB |
49 | |
50 | *-o*, *--output* _list_:: | |
4eab78d3 | 51 | Define the status output columns to be used. If no output arrangement is specified, then a default set is used. Use *--help* to get a list of all supported columns. |
b9d2ddfb MB |
52 | |
53 | *--output-all*:: | |
4eab78d3 | 54 | Output all available columns. |
b9d2ddfb MB |
55 | |
56 | *--raw*:: | |
4eab78d3 | 57 | Use the raw format for status output. |
b9d2ddfb MB |
58 | |
59 | *-r*, *--reset*:: | |
4eab78d3 | 60 | Reset the options of the specified zram device(s). Zram device settings can be changed only after a reset. |
b9d2ddfb MB |
61 | |
62 | *-s*, *--size* _size_:: | |
4eab78d3 MB |
63 | Create a zram device of the specified _size_. Zram devices are aligned to memory pages; when the requested _size_ is not a multiple of the page size, it will be rounded up to the next multiple. When not otherwise specified, the unit of the _size_ parameter is bytes. |
64 | + | |
65 | The _size_ argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB. | |
b9d2ddfb MB |
66 | |
67 | *-t*, *--streams* _number_:: | |
4eab78d3 | 68 | Set the maximum number of compression streams that can be used for the device. The default is one stream. |
b9d2ddfb MB |
69 | |
70 | *-V*, *--version*:: | |
4eab78d3 | 71 | Display version information and exit. |
b9d2ddfb MB |
72 | |
73 | *-h*, *--help*:: | |
4eab78d3 | 74 | Display help text and exit. |
b9d2ddfb MB |
75 | |
76 | == EXIT STATUS | |
77 | ||
78 | *zramctl* returns 0 on success, nonzero on failure. | |
79 | ||
80 | == FILES | |
81 | ||
82 | _/dev/zram[0..N]_:: | |
4eab78d3 | 83 | zram block devices |
b9d2ddfb MB |
84 | |
85 | == EXAMPLE | |
86 | ||
87 | The following commands set up a zram device with a size of one gigabyte and use it as swap device. | |
88 | ||
89 | .... | |
90 | # zramctl --find --size 1024M | |
91 | /dev/zram0 | |
92 | # mkswap /dev/zram0 | |
93 | # swapon /dev/zram0 | |
94 | ... | |
95 | # swapoff /dev/zram0 | |
96 | # zramctl --reset /dev/zram0 | |
97 | .... | |
98 | ||
99 | == AUTHORS | |
100 | ||
4eab78d3 | 101 | mailto:nefelim4ag@gmail.com[Timofey Titovets], |
b9d2ddfb MB |
102 | mailto:kzak@redhat.com[Karel Zak] |
103 | ||
104 | == SEE ALSO | |
105 | ||
106 | link:http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/blockdev/zram.rst[Linux kernel documentation] | |
107 | ||
625e9c61 | 108 | include::man-common/bugreports.adoc[] |
b9d2ddfb | 109 | |
625e9c61 | 110 | include::man-common/footer.adoc[] |
b9d2ddfb MB |
111 | |
112 | ifdef::translation[] | |
625e9c61 | 113 | include::man-common/translation.adoc[] |
b9d2ddfb | 114 | endif::[] |