Skip to content

Commit 424ef2b

Browse files
authored
Update swap.md
1 parent 7726fcd commit 424ef2b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Cheat Sheets/DevOps Linux/swap.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ Commands to manage swap files
55
swapon <file> # Mount unmount swap
66
swapoff <file>
77

8-
mkswap /dev/xxx # Create swap file / device
9-
mkswap --size 8GiB <file>
8+
mkswap /dev/xxx # Create swap partition
9+
mkswap -F --size 8GiB <file> # Create swap file
1010

11-
free | grep Swap # Show active/used swap space
11+
Show active/used swap space
12+
13+
free | grep Swap
14+
cat /proc/meminfo
15+
16+
For detailed per process swap usage analysis start `top` press `f` and enable
17+
the `SWAP` column and press `s` to mark it as sort field.
1218

1319
## Permanent mount in /etc/fstab
1420

0 commit comments

Comments
 (0)