summaryrefslogtreecommitdiffstats
path: root/sys-utils/zramctl.8
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sys-utils/zramctl.8158
-rw-r--r--sys-utils/zramctl.8.adoc110
2 files changed, 268 insertions, 0 deletions
diff --git a/sys-utils/zramctl.8 b/sys-utils/zramctl.8
new file mode 100644
index 0000000..1d7e53d
--- /dev/null
+++ b/sys-utils/zramctl.8
@@ -0,0 +1,158 @@
+'\" t
+.\" Title: zramctl
+.\" Author: [see the "AUTHOR(S)" section]
+.\" Generator: Asciidoctor 2.0.15
+.\" Date: 2022-05-11
+.\" Manual: System Administration
+.\" Source: util-linux 2.38.1
+.\" Language: English
+.\"
+.TH "ZRAMCTL" "8" "2022-05-11" "util\-linux 2.38.1" "System Administration"
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.ss \n[.ss] 0
+.nh
+.ad l
+.de URL
+\fI\\$2\fP <\\$1>\\$3
+..
+.als MTO URL
+.if \n[.g] \{\
+. mso www.tmac
+. am URL
+. ad l
+. .
+. am MTO
+. ad l
+. .
+. LINKSTYLE blue R < >
+.\}
+.SH "NAME"
+zramctl \- set up and control zram devices
+.SH "SYNOPSIS"
+.sp
+Get info:
+.RS 4
+\fBzramctl\fP [options]
+.RE
+.sp
+Reset zram:
+.RS 4
+\fBzramctl\fP \fB\-r\fP \fIzramdev\fP...
+.RE
+.sp
+Print name of first unused zram device:
+.RS 4
+\fBzramctl\fP \fB\-f\fP
+.RE
+.sp
+Set up a zram device:
+.RS 4
+\fBzramctl\fP [\fB\-f\fP | \fIzramdev\fP] [\fB\-s\fP \fIsize\fP] [\fB\-t\fP \fInumber\fP] [\fB\-a\fP \fIalgorithm\fP]
+.RE
+.SH "DESCRIPTION"
+.sp
+\fBzramctl\fP is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices.
+.sp
+If no option is given, all non\-zero size zram devices are shown.
+.sp
+Note that \fIzramdev\fP node specified on command line has to already exist. The command \fBzramctl\fP creates a new \fI/dev/zram<N>\fP nodes only when \fB\-\-find\fP option specified. It\(cqs possible (and common) that after system boot \fI/dev/zram<N>\fP nodes are not created yet.
+.SH "OPTIONS"
+.sp
+\fB\-a\fP, \fB\-\-algorithm lzo\fP|\fBlz4\fP|\fBlz4hc\fP|\fBdeflate\fP|\fB842\fP|\fBzstd\fP
+.RS 4
+Set the compression algorithm to be used for compressing data in the zram device.
+.RE
+.sp
+\fB\-f\fP, \fB\-\-find\fP
+.RS 4
+Find the first unused zram device. If a \fB\-\-size\fP argument is present, then initialize the device.
+.RE
+.sp
+\fB\-n\fP, \fB\-\-noheadings\fP
+.RS 4
+Do not print a header line in status output.
+.RE
+.sp
+\fB\-o\fP, \fB\-\-output\fP \fIlist\fP
+.RS 4
+Define the status output columns to be used. If no output arrangement is specified, then a default set is used. Use \fB\-\-help\fP to get a list of all supported columns.
+.RE
+.sp
+\fB\-\-output\-all\fP
+.RS 4
+Output all available columns.
+.RE
+.sp
+\fB\-\-raw\fP
+.RS 4
+Use the raw format for status output.
+.RE
+.sp
+\fB\-r\fP, \fB\-\-reset\fP
+.RS 4
+Reset the options of the specified zram device(s). Zram device settings can be changed only after a reset.
+.RE
+.sp
+\fB\-s\fP, \fB\-\-size\fP \fIsize\fP
+.RS 4
+Create a zram device of the specified \fIsize\fP. Zram devices are aligned to memory pages; when the requested \fIsize\fP 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 \fIsize\fP parameter is bytes.
+.sp
+The \fIsize\fP 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.
+.RE
+.sp
+\fB\-t\fP, \fB\-\-streams\fP \fInumber\fP
+.RS 4
+Set the maximum number of compression streams that can be used for the device. The default is use all CPUs and one stream for kernels older than 4.6.
+.RE
+.sp
+\fB\-h\fP, \fB\-\-help\fP
+.RS 4
+Display help text and exit.
+.RE
+.sp
+\fB\-V\fP, \fB\-\-version\fP
+.RS 4
+Print version and exit.
+.RE
+.SH "EXIT STATUS"
+.sp
+\fBzramctl\fP returns 0 on success, nonzero on failure.
+.SH "FILES"
+.sp
+\fI/dev/zram[0..N]\fP
+.RS 4
+zram block devices
+.RE
+.SH "EXAMPLE"
+.sp
+The following commands set up a zram device with a size of one gigabyte and use it as swap device.
+.sp
+.if n .RS 4
+.nf
+.fam C
+ # zramctl \-\-find \-\-size 1024M
+ /dev/zram0
+ # mkswap /dev/zram0
+ # swapon /dev/zram0
+ ...
+ # swapoff /dev/zram0
+ # zramctl \-\-reset /dev/zram0
+.fam
+.fi
+.if n .RE
+.SH "AUTHORS"
+.sp
+.MTO "nefelim4ag\(atgmail.com" "Timofey Titovets" ","
+.MTO "kzak\(atredhat.com" "Karel Zak" ""
+.SH "SEE ALSO"
+.sp
+.URL "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin\-guide/blockdev/zram.rst" "Linux kernel documentation" ""
+.SH "REPORTING BUGS"
+.sp
+For bug reports, use the issue tracker at \c
+.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
+.SH "AVAILABILITY"
+.sp
+The \fBzramctl\fP command is part of the util\-linux package which can be downloaded from \c
+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file
diff --git a/sys-utils/zramctl.8.adoc b/sys-utils/zramctl.8.adoc
new file mode 100644
index 0000000..cdfb13d
--- /dev/null
+++ b/sys-utils/zramctl.8.adoc
@@ -0,0 +1,110 @@
+//po4a: entry man manual
+= zramctl(8)
+:doctype: manpage
+:man manual: System Administration
+:man source: util-linux {release-version}
+:page-layout: base
+:command: zramctl
+
+== NAME
+
+zramctl - set up and control zram devices
+
+== SYNOPSIS
+
+Get info: ::
+
+*zramctl* [options]
+
+Reset zram: ::
+
+*zramctl* *-r* _zramdev_...
+
+Print name of first unused zram device: ::
+
+*zramctl* *-f*
+
+Set up a zram device: ::
+
+*zramctl* [*-f* | _zramdev_] [*-s* _size_] [*-t* _number_] [*-a* _algorithm_]
+
+== DESCRIPTION
+
+*zramctl* is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices.
+
+If no option is given, all non-zero size zram devices are shown.
+
+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.
+
+== OPTIONS
+
+*-a*, **--algorithm lzo**|**lz4**|**lz4hc**|**deflate**|**842**|**zstd**::
+Set the compression algorithm to be used for compressing data in the zram device.
+
+*-f*, *--find*::
+Find the first unused zram device. If a *--size* argument is present, then initialize the device.
+
+*-n*, *--noheadings*::
+Do not print a header line in status output.
+
+*-o*, *--output* _list_::
+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.
+
+*--output-all*::
+Output all available columns.
+
+*--raw*::
+Use the raw format for status output.
+
+*-r*, *--reset*::
+Reset the options of the specified zram device(s). Zram device settings can be changed only after a reset.
+
+*-s*, *--size* _size_::
+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.
++
+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.
+
+*-t*, *--streams* _number_::
+Set the maximum number of compression streams that can be used for the device. The default is use all CPUs and one stream for kernels older than 4.6.
+
+include::man-common/help-version.adoc[]
+
+== EXIT STATUS
+
+*zramctl* returns 0 on success, nonzero on failure.
+
+== FILES
+
+_/dev/zram[0..N]_::
+zram block devices
+
+== EXAMPLE
+
+The following commands set up a zram device with a size of one gigabyte and use it as swap device.
+
+....
+ # zramctl --find --size 1024M
+ /dev/zram0
+ # mkswap /dev/zram0
+ # swapon /dev/zram0
+ ...
+ # swapoff /dev/zram0
+ # zramctl --reset /dev/zram0
+....
+
+== AUTHORS
+
+mailto:nefelim4ag@gmail.com[Timofey Titovets],
+mailto:kzak@redhat.com[Karel Zak]
+
+== SEE ALSO
+
+link:http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/blockdev/zram.rst[Linux kernel documentation]
+
+include::man-common/bugreports.adoc[]
+
+include::man-common/footer.adoc[]
+
+ifdef::translation[]
+include::man-common/translation.adoc[]
+endif::[]