# Is there a way to receive a warning if memory is running low?

Sometimes I get tab satisfied with Google Chrome which chew out a great deal of memory and also reduces the system. Exists a means to get a caution when free memory drops listed below a particular limit? In this way I can close some points prior to significant efficiency destruction.

5
2022-06-07 14:39:59
Source Share

You can acheive this with a mix of Growl and also some covering scripting.

Growlnotify is a command line device that can send a message to grumble:

grownnotify -t "Title" -m "Message"


Wrapping some reasoning around this to look for CPU usage or Memory usage need to be uncomplicated sufficient. I'm not at a Mac now so can not examine with commands yet something like the adhering to need to be feasible

while true
do
sleep 60
memuse=vmstat -some -options -to -show -current -memory -use | awk '{ print $column_that you_are_interested_in_eg_5 }' if [[$memuse -gt 80 ]]
then
growlnotify -t "Memory Low" -m "Memory use is at \$memuse %"
fi
done


Thew over isn't mosting likely to function, please do not replicate and also paste it, yet it is something to take place. You can expand the reasoning better conveniently by examining every 2 mins, and also if it mores than 80% after that examine every 30 secs to see if it is persistantly high and also not simply a spike, and also if its still high after 3 checks after that sharp, or else do not, etc.

5
2022-06-07 15:08:17
Source

If resemble @stuffe is solution does specifically what you ask, yet if you do not intend to get involved in scripting I have a choice for you.

iStat Menus permits you to monitor several system tasks such as CPU Usage, disk drive room, network rate, temperature level and also memory use. While it does not alert you, it keeps up in your food selection bar so you can inform when it is obtaining complete simply by a look. You can additionally click it and also see what all is occupying one of the most memory:

3
2022-06-07 15:07:31
Source