]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/zramctl.8
Merge branch 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit
[thirdparty/util-linux.git] / sys-utils / zramctl.8
1 .TH ZRAMCTL 8 "July 2014" "util-linux" "System Administration"
2 .SH NAME
3 zramctl \- set up and control zram devices
4 .SH SYNOPSIS
5 .ad l
6 Get info:
7 .sp
8 .in +5
9 .BR zramctl " [options]"
10 .sp
11 .in -5
12 Reset zram:
13 .sp
14 .in +5
15 .B "zramctl \-r"
16 .IR zramdev ...
17 .sp
18 .in -5
19 Print name of first unused zram device:
20 .sp
21 .in +5
22 .B "zramctl \-f"
23 .sp
24 .in -5
25 Set up a zram device:
26 .sp
27 .in +5
28 .B zramctl
29 .RB [ \-f " | "\fIzramdev\fP ]
30 .RB [ \-s
31 .IR size ]
32 .RB [ \-t
33 .IR number ]
34 .RB [ \-a
35 .IR algorithm ]
36 .sp
37 .in -5
38 .ad b
39 .SH DESCRIPTION
40 .B zramctl
41 is used to quickly set up zram device parameters, to reset zram devices, and to
42 query the status of used zram devices.
43 .PP
44 If no option is given, all non-zero size zram devices are shown.
45 .SH OPTIONS
46 .TP
47 .BR \-a , " \-\-algorithm lzo" | lz4
48 Set the compression algorithm to be used for compressing data in the zram device.
49 .TP
50 .BR \-f , " \-\-find"
51 Find the first unused zram device. If a \fB--size\fR argument is present, then
52 initialize the device.
53 .TP
54 .BR \-n , " \-\-noheadings"
55 Do not print a header line in status output.
56 .TP
57 .BR \-o , " \-\-output " \fIlist
58 Define the status output columns to be used. If no output arrangement is
59 specified, then a default set is used.
60 Use \fB\-\-help\fP to get a list of all supported columns.
61 .TP
62 .B \-\-raw
63 Use the raw format for status output.
64 .TP
65 .BR \-r , " \-\-reset"
66 Reset the options of the specified zram device(s). Zram device settings
67 can be changed only after a reset.
68 .TP
69 .BR \-s , " \-\-size " \fIsize
70 Create a zram device of the specified \fIsize\fR.
71 Zram devices are aligned to memory pages; when the requested \fIsize\fR is
72 not a multiple of the page size, it will be rounded up to the next multiple.
73 When not otherwise specified, the unit of the \fIsize\fR parameter is bytes.
74 .IP
75 The \fIsize\fR argument may be followed by the multiplicative suffixes KiB (=1024),
76 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB"
77 is optional, e.g., "K" has the same meaning as "KiB") or the suffixes
78 KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
79 .TP
80 .BR \-t , " \-\-streams " \fInumber
81 Set the maximum number of compression streams that can be used for the device.
82 The default is one stream.
83 .TP
84 .BR \-V , " \-\-version"
85 Display version information and exit.
86 .TP
87 .BR \-h , " \-\-help"
88 Display help text and exit.
89
90 .SH RETURN VALUE
91 .B zramctl
92 returns 0 on success, nonzero on failure.
93
94 .SH FILES
95 .TP
96 .I /dev/zram[0..N]
97 zram block devices
98
99 .SH EXAMPLE
100 The following commands set up a zram device with a size of one gigabyte
101 and use it as swap device.
102 .nf
103 .IP
104 # zramctl --find --size 1024M
105 /dev/zram0
106 # mkswap /dev/zram0
107 # swapon /dev/zram0
108 ...
109 # swapoff /dev/zram0
110 # zramctl --reset /dev/zram0
111 .fi
112 .SH SEE ALSO
113 .UR http://git.\:kernel.\:org\:/cgit\:/linux\:/kernel\:/git\:/torvalds\:/linux.git\:/tree\:/Documentation\:/blockdev\:/zram.txt
114 Linux kernel documentation
115 .UE .
116 .SH AUTHORS
117 .nf
118 Timofey Titovets <nefelim4ag@gmail.com>
119 Karel Zak <kzak@redhat.com>
120 .fi
121 .SH AVAILABILITY
122 The zramctl command is part of the util-linux package and is available from
123 https://www.kernel.org/pub/linux/utils/util-linux/.