Memcached check script

· by Gürkan · Read in about 1 min · (71 Words)

Couldn't find an easy & reliable way to check if memcached is running (for HA tools). Current check scripts on the net are generally stalling when memcached hits to maximum connections. So I wrote a dirty script that timeouts after 1 second on unsuccesful try. It's ugly but you get the idea.

Why if ? Because my version of netcat wasn't exiting with correct error status on timeout for some reason.