Skip to content

Instantly share code, notes, and snippets.

@ricferr
Created May 26, 2020 10:37
Show Gist options
  • Save ricferr/a3072c6d77743749fb95d7be6eb4ce02 to your computer and use it in GitHub Desktop.
Save ricferr/a3072c6d77743749fb95d7be6eb4ce02 to your computer and use it in GitHub Desktop.
Get number of items in memcached
echo -e "stats items\nquit\n" |nc 127.0.0.1 11211|grep "items:.*:number"|awk '{ sum += $3} { print sum }'|tail -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment