I don't won't to use swap file (due to some bug in kernel or AMD driver).
I wan't to have some util running and monitoring free system memory and alerting me when it becomes less than some specified limit.
This will notify me that I need to close some applications (or browser tabs) to avoid system freeze due to some strange kswapd0 I/O activity (probably another bug).
Is there any appropriate software?
UPDATE:
I've redesigned script provided by Gary for my need and want to share it
#!/bin/bash
#Minimum available memory limit, MB
THRESHOLD=400
#Check time interval, sec
INTERVAL=30
while :
do
free=$(free -m|awk '/^Mem:/{print $4}')
buffers=$(free -m|awk '/^Mem:/{print $6}')
cached=$(free -m|awk '/^Mem:/{print $7}')
available=$(free -m | awk '/^-\/+/{print $4}')
message="Free $free""MB"", buffers $buffers""MB"", cached $cached""MB"", available $available""MB"""
if [ $available -lt $THRESHOLD ]
then
notify-send "Memory is running out!" "$message"
fi
echo $message
sleep $INTERVAL
done