| ZRAMCTL(8) | System Administration | ZRAMCTL(8) |
NAME
zramctl - set up and control zram devices
SYNOPSIS
Get info:
Reset zram:
Print name of first unused zram device:
Set up a zram device:
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
-f, --find
-n, --noheadings
-o, --output list
--output-all
--raw
-r, --reset
-s, --size size
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
-h, --help
-V, --version
EXIT STATUS
zramctl returns 0 on success, nonzero on failure.
FILES
/dev/zram[0..N]
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
Timofey Titovets <[email protected]>, Karel Zak <[email protected]>
SEE ALSO
Linux kernel documentation <http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/blockdev/zram.rst>
REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.
AVAILABILITY
The zramctl command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
| 2022-05-11 | util-linux 2.38.1 |