Always keeping the services up.
function finish { # re-start service sudo service mongdb start } trap finish EXIT # Stop the mongod instance sudo service mongdb stop # (If mongod is configured to fork, e.g. as part of a replica set, you # may instead need to do "sudo killall --wait /usr/bin/mongod".)
Get the memory size of Redis
apt-get install redis -y && redis-cli -h $REDIS_HOST info memory | grep '.*human';
Β