mirror of
https://github.com/darksaid98/ubuntu-server-setup.git
synced 2026-12-02 06:28:59 +00:00
Added swap settings
This commit is contained in:
1 parent
02e48fe201
commit
a82bf4ff21
3 files changed
+38
No files matched your search
@@ -63,6 +63,18 @@ function testSwap() {
|
||||
assertContains "/swapfile" "$(sudo swapon --show)"
|
||||
}
|
||||
|
||||
function testSwapSettings() {
|
||||
local swappiness=$(cat /proc/sys/vm/swappiness)
|
||||
local cache_pressure=$(cat /proc/sys/vm/vfs_cache_pressure)
|
||||
|
||||
tweakSwapSettings 10 50
|
||||
|
||||
assertEquals "$(cat /proc/sys/vm/swappiness)" "10"
|
||||
assertEquals "$(cat /proc/sys/vm/vfs_cache_pressure)" "50"
|
||||
|
||||
tweakSwapSettings "${swappiness}" "${cache_pressure}"
|
||||
}
|
||||
|
||||
function testTeardown () {
|
||||
echo "Test Teardown"
|
||||
|
||||
|
||||
Reference in new issue
Block a user