Swap Space

From Chorke Wiki
Revision as of 00:00, 6 July 2024 by Shahed (talk | contribs) (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/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Update » Ubuntu

swapon --show

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