Skip to content

Instantly share code, notes, and snippets.

@RoSk0
Created November 22, 2017 23:17
Show Gist options
  • Save RoSk0/2049043b0282568816af883f17a0009a to your computer and use it in GitHub Desktop.
Save RoSk0/2049043b0282568816af883f17a0009a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo 'stats items' \
| nc localhost 11211 \
| grep -oe ':[0-9]*:' \
| grep -oe '[0-9]*' \
| sort \
| uniq \
| xargs -L1 -I{} bash -c 'echo "stats cachedump {} 1000" | nc localhost 11211'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment