Created
January 22, 2019 20:46
-
-
Save mttjohnson/95cb7890ea61d2c98a3a605d106a1a6b to your computer and use it in GitHub Desktop.
memcached monitoring
This file contains hidden or 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
| # Connect via socket | |
| echo 'stats' | nc -U /var/run/memcached-multi/example.com_sessions.sock | |
| # Connect via TCP port | |
| echo 'stats' | nc localhost 11211 | |
| # Get max memory usage limit from stats | |
| echo 'stats' | nc -U /var/run/memcached-multi/example.com_sessions.sock \ | |
| | grep ' limit_maxbytes ' \ | |
| | cut -d" " -f3 | |
| # Get current memory usage from stats | |
| echo 'stats' | nc -U /var/run/memcached-multi/example.com_sessions.sock \ | |
| | grep ' bytes ' \ | |
| | cut -d" " -f3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment