Monit

is a utility for managing and monitoring processes, programs, files, directories and filesystems on a UNIX system.

= configurations = config file of monit resides in ${EROOT}/etc/monitrc. And there is a item to specify a config directory. Uncomment if needed.

= squid memory example = is a caching proxy that is memory hungry. It can control its memory consumption by itself in the configuration file, while we can make an redundent check here.

We can run monit foreground and see the effect.