Created
May 27, 2016 00:10
-
-
Save RantyDave/4c3a3683a5403040434dda2eadc66b31 to your computer and use it in GitHub Desktop.
Limit the SmartOS (and Solaris?) ARC to a maximum of 256Mb. Works live, no reboot needed :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "arc_stats::print -a arcstat_p.value.ui64" | mdb -kw > value.ui64 | |
ui64=$(cat value.ui64) | |
echo "${ui64:0:16}/Z 0x10000000" | mdb -kw | |
echo "arc_stats::print -a arcstat_c.value.ui64" | mdb -kw > value.ui64 | |
ui64=$(cat value.ui64) | |
echo "${ui64:0:16}/Z 0x10000000" | mdb -kw | |
echo "arc_stats::print -a arcstat_c_max.value.ui64" | mdb -kw > value.ui64 | |
ui64=$(cat value.ui64) | |
echo "${ui64:0:16}/Z 0x10000000" | mdb -kw | |
rm value.ui64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment