Last active
June 17, 2022 14:47
-
-
Save tatarurzvn/248ee6db762b978ad6c71d68f58a3372 to your computer and use it in GitHub Desktop.
check running redises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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