REDIS: Connection Count by Client

I just wanted a quick way to see where connections to my redis server were coming from, and how many there were. The redis CLIENT LIST command had all the info, I just needed to massage it.

AdamP@cartographer ~> redis-cli -h myredisserver CLIENT LIST | sed -n 's|.*addr=\(.*\)\:.*|\1|p' | sort | uniq -c
   2 127.0.0.1
 686 192.168.0.141
   2 192.168.0.144
   8 192.168.0.20
   6 192.168.0.66
   4 192.168.0.67

May your google searches lead you here, to prevent you from having to pipe this yourself.

 
37
Kudos
 
37
Kudos

Now read this

Watch What I Do, Don’t Listen to What I Say.

Let me preface this whole thing by saying: I love in-person user tests. In fact, we do them about once every-other-week at Rival IQ, just to watch a new user interact with our app. It’s always eye-opening and definitely helps you reset... Continue →