Skip to content

Instantly share code, notes, and snippets.

@tatarurzvn
Last active June 17, 2022 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatarurzvn/248ee6db762b978ad6c71d68f58a3372 to your computer and use it in GitHub Desktop.
Save tatarurzvn/248ee6db762b978ad6c71d68f58a3372 to your computer and use it in GitHub Desktop.
check running redises
#!/usr/bin/env bash
for port in $(ps aux | perl -ne 'print if not /perl/ and not /63790/ and /redis-server/;' | perl -F'\s+' -lane '@arr = split /:/, "$F[-1]"; print $arr[1];'); do
echo "==> Clients connected to Redis on TCP port [$port] <==";
redis-cli -p $port client list;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment