Difference between revisions of "Swapon"

From wikieduonline
Jump to navigation Jump to search
Line 21: Line 21:
 
   Oct 12 12:55:03 SERVER swapon[449]: [[swapon]]: /[[swap.img]]: swapon failed: [[Read-only file system]]
 
   Oct 12 12:55:03 SERVER swapon[449]: [[swapon]]: /[[swap.img]]: swapon failed: [[Read-only file system]]
  
== Related commands ==
+
== Related terms ==
 
* <code>[[free]]</code>
 
* <code>[[free]]</code>
 
* [[Memory]]: <code>[[sar -r]]</code>
 
* [[Memory]]: <code>[[sar -r]]</code>
 
* [[Swap]]: <code>[[sar -S]]</code>
 
* [[Swap]]: <code>[[sar -S]]</code>
 
* [[Sar -W (Swapping)]]
 
* [[Sar -W (Swapping)]]
* <code>[[/etc/fstab]]</code>
+
* <code>[[/etc/fstab]]</code> and <code>[[/proc/swaps]]</code>
 
* <code>[[systemctl --type swap]]</code>
 
* <code>[[systemctl --type swap]]</code>
 
* <code>[[mkswap]]</code>
 
* <code>[[mkswap]]</code>

Revision as of 10:34, 13 July 2021

swapon/swapoff enable/disable devices and files for paging and swapping and it is included on the mount package. http://man7.org/linux/man-pages/man8/swapon.8.html


  • swapon -s or swapon --show
swapon --show
NAME      TYPE      SIZE   USED PRIO
/dev/dm-2 partition 976M 974.8M   -2
swapon --show
(No output if not swap active)
 swapon  -s
 Filename				Type		Size	Used	Priority
 /swap.img                              	file    	2023420	104312	-2


 Oct 12 12:55:03 SERVER swapon[449]: swapon: /swap.img: swapon failed: Read-only file system

Related terms

See also

Advertising: