mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-24 00:43:35 +01:00
12 lines
299 B
Bash
Executable File
12 lines
299 B
Bash
Executable File
#!/bin/sh
|
|
|
|
RAMsize=$(LC_ALL=C free | awk '/Mem:/ {print $2}')
|
|
RAMfree=$(LC_ALL=C free | awk '/Mem:/ {print $4}')
|
|
SwapUsed=$(LC_ALL=C free | awk '/Swap:/ {print $3}')
|
|
|
|
echo "Swapping $SwapUsed bytes back to $RAMsize bytes RAM ($RAMfree bytes free) ..."
|
|
swapoff -a && swapon -a
|
|
|
|
echo "Done."
|
|
exit 0
|