Swap Space: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==Update » Ubuntu== <syntaxhighlight lang="bash"> swapon --show </syntaxhighlight> ==Update » Raspberry Pi 4== <syntaxhighlight lang="bash" highlight="3,4" line> cat <<'EXE' | sudo bash printf '\nbefore:\n';free -th sed -i 's|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|' /etc/dphys-swapfile service dphys-swapfile restart printf '\nupdate:\n';free -th EXE </syntaxhighlight> ==Playground== {| | valign="top" colspan="2" | <syntaxhighlight lang="bash"> echo 'sync;echo 3 >/proc/...") |
No edit summary |
||
Line 1: | Line 1: | ||
==Update » Ubuntu== | ==Update » Ubuntu » 24.04== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash" highlight="8-11" line> | ||
swapon --show | echo 'swapon --show'|sudo bash | ||
:' | |||
NAME TYPE SIZE USED PRIO | |||
/swap.img file 8G 0B -2 | |||
' | |||
cat <<'EXE' | sudo bash | |||
swapoff /swap.img | |||
fallocate -l 12G /swap.img | |||
ls -lh /swap.img && mkswap /swap.img | |||
swapon /swap.img && swapon --show && free -th | |||
EXE | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 07:41, 6 July 2024
Update » Ubuntu » 24.04
echo 'swapon --show'|sudo bash
:'
NAME TYPE SIZE USED PRIO
/swap.img file 8G 0B -2
'
cat <<'EXE' | sudo bash
swapoff /swap.img
fallocate -l 12G /swap.img
ls -lh /swap.img && mkswap /swap.img
swapon /swap.img && swapon --show && free -th
EXE
Update » Raspberry Pi 4
cat <<'EXE' | sudo bash
printf '\nbefore:\n';free -th
sed -i 's|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|' /etc/dphys-swapfile
service dphys-swapfile restart
printf '\nupdate:\n';free -th
EXE
Playground
echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash
free -th
|
sudo swapon --show
cat /etc/fstab
| |
| ||
docker network prune -f
docker volume prune -f
docker system prune -f
docker image ls
|
cat <<'EXE' | bash
for d in system network volume
do docker ${d} prune -f;done
EXE
|
cat <<'EXE' | ssh [email protected]
for d in system network volume
do docker ${d} prune -f;done
EXE
|
| ||
References
| ||