check that redis is running

C++
$ redis-cli ping
PONG

Source

Also in C++: