]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/zramctl.8
zrmactl: add new command to control /dev/zramN devices
[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 Setup 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 .in +8
35 .RB [ \-a
36 .IR algorithm ]
37 .sp
38 .in -13
39 .ad b
40 .SH DESCRIPTION
41 .B zramctl
42 is used to quickly set up zram device parameters, to reset zram devices, and to
43 query the status of used zram devices. If no option is given, all zram devices
44 are shown.
45
46 .SH OPTIONS
47 .IP "\fB\-a, \-\-algorithm \fI{lzo|lz4}\fP"
48 Set compression algorithm used for compress data in zram device.
49 .IP "\fB\-f, \-\-find\fP"
50 Find the first unused zram device. If a \fB--size\fR argument is present, then
51 initialize the device.
52 .IP "\fB\-h, \-\-help\fP"
53 print help
54 .IP "\fB\-h, \-\-noheadings\fP"
55 Do not print a header line in status output.
56 .IP "\fB\-o, \-\-output \fIlist\fP"
57 Define the status output columns to use. If no output arrangement is specified,
58 then a default set is used.
59 Use \fB\-\-help\fP to get a list of all supported columns.
60 .IP "\fB\-r, \-\-reset\fP
61 Reset options specified zram device(s). Zram device setting can be changed only
62 after reset.
63 .IP "\fB\-\-raw\fP"
64 Use the raw format for status output.
65 .IP "\fB\-s, \-\-size\fP \fIsize\fP
66 Force zram driver to reread size of the file associated with the specified zram device
67
68 The \fIsize\fR argument may be followed by the multiplicative suffixes KiB (=1024),
69 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB"
70 is optional, e.g., "K" has the same meaning as "KiB") or the suffixes
71 KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
72 .IP "\fB\-t, \-\-streams \fInumber\fP"
73 Set number of maximum compress streams what used for device. The default is one stream.
74 .IP "\fB\-V, \-\-version\fP"
75 Display version information and exit.
76
77 .SH RETURN VALUE
78 .B zramctl
79 returns 0 on success, nonzero on failure.
80
81 .SH FILES
82 .TP
83 .I /dev/zram[0..N]
84 zram block devices
85
86 .SH EXAMPLE
87 The following commands can be used for setup the zram device with gigabyte size
88 and using as swap device.
89 .nf
90 .IP
91 # zramctl --find --size 1024M
92 /dev/zram0
93 # mkswap /dev/zram0
94 # swapon /dev/zram0
95 ...
96 # swapoff /dev/zram0
97 # zramctl --reset /dev/zram0
98 .fi
99 .SH AUTHORS
100 .nf
101 Timofey Titovets <nefelim4ag@gmail.com>
102 Karel Zak <kzak@redhat.com>
103 .fi
104 .SH AVAILABILITY
105 The zramctl command is part of the util-linux package and is available from
106 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.