Bash script to alert when memory gets low

Eran Goldman-Malka · March 19, 2019

I have a mem leak in some servers, and I want to monitor when and how is the problematic process.

The easiest way that I found is based on A4I post.

I wrote a gist script

And to install it just copy paste to the server terminal:

EMAIL=[your-email] SERVER=[server=name] bash -c 'curl https://gist.githubusercontent.com/EranGoldman/0ca544e933179c8401ecc09524d5341e/raw/ef20385315def74f81bf14c884a9a5ea9a0de357/memalert.sh | sudo -E bash'

!!!! DO NOT RUN SCRIPTS FROM THE INTERNET ON YOUR SERVER WITHOUT READING THEM BEFORE !!!!

Twitter, Facebook