{"id":2845,"date":"2022-12-20T15:17:28","date_gmt":"2022-12-20T18:17:28","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/zramctl-man8\/"},"modified":"2022-12-20T15:17:28","modified_gmt":"2022-12-20T18:17:28","slug":"zramctl-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/zramctl-man8\/","title":{"rendered":"ZRAMCTL (man8)"},"content":{"rendered":"<h1 align=\"center\">ZRAMCTL<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">zramctl \u2212 set up and control zram devices<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Get info:<\/p>\n<p style=\"margin-left:18%; margin-top: 1em\"><b>zramctl<\/b> [options]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Reset zram:<\/p>\n<p style=\"margin-left:18%; margin-top: 1em\"><b>zramctl \u2212r<\/b> <i>zramdev<\/i>&#8230;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Print name of first unused zram device:<\/p>\n<p style=\"margin-left:18%; margin-top: 1em\"><b>zramctl \u2212f<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Set up a zram device:<\/p>\n<p style=\"margin-left:18%; margin-top: 1em\"><b>zramctl<\/b> [<b>\u2212f<\/b> | <i>zramdev<\/i>] [<b>\u2212s<\/b> <i>size<\/i>] [<b>\u2212t<\/b> <i>number<\/i>] [<b>\u2212a<\/b> <i>algorithm<\/i>]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>zramctl<\/b> is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If no option is given, all non-zero size zram devices are shown.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that <i>zramdev<\/i> node specified on command line has to already exist. The command <b>zramctl<\/b> creates a new \/dev\/zram<N> nodes only when <b>\u2212\u2212find<\/b> option specified. It\u2019s possible (and common) that after system boot \/dev\/zram<N> nodes are not created yet.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212a<\/b>, <b>\u2212\u2212algorithm lzo<\/b>|<b>lz4<\/b>|<b>lz4hc<\/b>|<b>deflate<\/b>|<b>842<\/b><\/p>\n<p style=\"margin-left:22%;\">Set the compression algorithm to be used for compressing data in the zram device.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212f<\/b>, <b>\u2212\u2212find<\/b><\/p>\n<p style=\"margin-left:22%;\">Find the first unused zram device. If a <b>\u2212\u2212size<\/b> argument is present, then initialize the device.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212n<\/b>, <b>\u2212\u2212noheadings<\/b><\/p>\n<p style=\"margin-left:22%;\">Do not print a header line in status output.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212o<\/b>, <b>\u2212\u2212output<\/b> <i>list<\/i><\/p>\n<p style=\"margin-left:22%;\">Define the status output columns to be used. If no output arrangement is specified, then a default set is used. Use <b>\u2212\u2212help<\/b> to get a list of all supported columns.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212\u2212output\u2212all<\/b><\/p>\n<p style=\"margin-left:22%;\">Output all available columns.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><b>\u2212\u2212raw<\/b><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"56%\">\n<p>Use the raw format for status output.<\/p>\n<\/td>\n<td width=\"22%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212r<\/b>, <b>\u2212\u2212reset<\/b><\/p>\n<p style=\"margin-left:22%;\">Reset the options of the specified zram device(s). Zram device settings can be changed only after a reset.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212s<\/b>, <b>\u2212\u2212size<\/b> <i>size<\/i><\/p>\n<p style=\"margin-left:22%;\">Create a zram device of the specified <i>size<\/i>. Zram devices are aligned to memory pages; when the requested <i>size<\/i> 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 <i>size<\/i> parameter is bytes.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The <i>size<\/i> 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 &#8220;iB&#8221; is optional, e.g., &#8220;K&#8221; has the same meaning as &#8220;KiB&#8221;) or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212t<\/b>, <b>\u2212\u2212streams<\/b> <i>number<\/i><\/p>\n<p style=\"margin-left:22%;\">Set the maximum number of compression streams that can be used for the device. The default is one stream.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212V<\/b>, <b>\u2212\u2212version<\/b><\/p>\n<p style=\"margin-left:22%;\">Display version information and exit.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:22%;\">Display help text and exit.<\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>zramctl<\/b> returns 0 on success, nonzero on failure.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/dev\/zram[0..N]<\/i><\/p>\n<p style=\"margin-left:22%;\">zram block devices<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following commands set up a zram device with a size of one gigabyte and use it as swap device.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"># zramctl &#8211;find &#8211;size 1024M <br \/> \/dev\/zram0 <br \/> # mkswap \/dev\/zram0 <br \/> # swapon \/dev\/zram0 <br \/> &#8230; <br \/> # swapoff \/dev\/zram0 <br \/> # zramctl &#8211;reset \/dev\/zram0<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Timofey Titovets <nefelim4ag@gmail.com> <br \/> Karel Zak <kzak@redhat.com><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><a href=\"http:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/Documentation\/admin-guide\/blockdev\/zram.rst\">Linux kernel documentation<\/a>.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The zramctl command is part of the util-linux package and is available from https:\/\/www.kernel.org\/pub\/linux\/utils\/util-linux\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  zramctl \u2212 set up and control zram devices <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,195],"class_list":["post-2845","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-zramctl"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=2845"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2845\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=2845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=2845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=2845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}