Difference between revisions of "Swapon"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
<code>swapon</code>/<code>[[swapoff]]</code> enable/disable devices and files for [[paging]] and [[swapping]] and it is included on the <code>[[mount]]</code> package. | <code>swapon</code>/<code>[[swapoff]]</code> enable/disable devices and files for [[paging]] and [[swapping]] and it is included on the <code>[[mount]]</code> package. | ||
− | http://man7.org/linux/man-pages/man8/swapon.8.html | + | * Man page: http://man7.org/linux/man-pages/man8/swapon.8.html |
+ | * <code>[[swapon]] /[[dev/nvme]]5n1</code> | ||
− | * <code>swapon -s</code> or <code>swapon --show</code> | + | * <code>[[swapon -s]]</code> or <code>[[swapon --show]]</code> |
+ | |||
+ | swapon /dev/nvme#n1 | ||
+ | (no output) | ||
swapon --show | swapon --show | ||
Line 12: | Line 17: | ||
(No output if not swap active) | (No output if not swap active) | ||
− | swapon | + | swapon -s |
Filename Type Size Used Priority | Filename Type Size Used Priority | ||
− | [[/swap.img]] | + | [[/swap.img]] file 2023420 104312 -2 |
* <code>cat [[/proc/swaps]]</code> | * <code>cat [[/proc/swaps]]</code> | ||
− | Oct 12 12:55:03 SERVER swapon[449]: [[swapon]]: /swap.img: swapon failed: [[Read-only]] | + | == Errors == |
+ | Oct 12 12:55:03 SERVER swapon[449]: [[swapon]]: /[[swap.img]]: swapon failed: [[Read-only file system]] | ||
− | == Related | + | == 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> | ||
− | * [[ | + | * <code>[[sar -W (Swapping)]]</code> |
− | * <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> | ||
+ | * [[Add a swap disk]] | ||
== See also == | == See also == |
Latest revision as of 16:00, 24 August 2023
swapon
/swapoff
enable/disable devices and files for paging and swapping and it is included on the mount
package.
swapon /dev/nvme#n1 (no output)
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
cat /proc/swaps
Errors[edit]
Oct 12 12:55:03 SERVER swapon[449]: swapon: /swap.img: swapon failed: Read-only file system
Related terms[edit]
free
- Memory:
sar -r
- Swap:
sar -S
sar -W (Swapping)
/etc/fstab
and/proc/swaps
systemctl --type swap
mkswap
- Add a swap disk
See also[edit]
- Swap,
swapon
,swapoff
,mkswap
,swaplabel
,free
,sar -r
,sar -S
,sar -W
,vmstat
,vm.swappiness
,/proc/swaps
,/etc/fstab
, Add a swap disk,systemd.swap
- File systems:
mount
,umount
,findmnt
,find
,swapon
,swapoff
,UUID, blkid
, mount options:/etc/fstab
,udisksctl mount
,guestmount
,/proc/mounts
,fstrim
,systemd-mount
,defaults
- Memory: memory pages, RAM, virsh Memory Commands, OOM, meminfo,
vmstat
, NAND, DDR,lsmem
,/dev/shm
,/proc/meminfo
,sar -r
, IOMMU,pmem
, Memory management, Garbage collector, THP, Linux Huge Page TLB
Advertising: