#!/bin/bash

sync
echo 3 > /proc/sys/vm/drop_caches

if [ "$1" = "clearswap" ]; then
  (swapoff -a; swapon -a) & top
fi
