free 201 B

1234567
  1. #!/bin/bash
  2. source config.sh
  3. used=`free -m |awk 'NR==3 {print $4}'`
  4. if [ $used -lt 1000 ]; then
  5. echo "Free memory is below $used MB. Possible memory leak!!!" | mutt -s "HIGH MEMORY ALERT!!!" $email
  6. fi