to control whether or not to check if we are swapping, and produce
useful output into the logfile if we are.
For production systems with dedicated nas-heads we should never swap.
But for developer/test systems we often use smaller nondedicated systems where
we can no longer guarantee that we will not be using swap.
monitor)
# We should never enter swap, so SwapTotal == SwapFree.
- if [ -n "`grep '^Swap\(Total\|Free\)' /proc/meminfo | uniq -s 10 -u`" ]; then
- echo We are swapping:
- cat /proc/meminfo
- ps auxfww
- fi
+ [ "$CTDB_CHECK_SWAP_IS_NOT_USED" = "yes" ] && {
+ if [ -n "`grep '^Swap\(Total\|Free\)' /proc/meminfo | uniq -s 10 -u`" ]; then
+ echo We are swapping:
+ cat /proc/meminfo
+ ps auxfww
+ fi
+ }
# monitor that we are not running out of memory
[ -z "$CTDB_MONITOR_FREE_MEMORY" ] || {