Difference between revisions of "Check Memory Usage of Memcached"

From Brian Nelson Ramblings
Jump to: navigation, search
(Created page with "==Check How much Memory Usage Memcached is Using== Are you having issues with memcached crashing? You can use the following command to check the via port or unix socket. e...")
 
(Check How much Memory Usage Memcached is Using)
 
Line 8: Line 8:
 
   ~/.tmpMemcachedLogFile)/$(awk '/total_chunks/ {sum+=$NF} END{print sum}' ~/.tmpMemcachedLogFile)" | bc)% filled\n"; \
 
   ~/.tmpMemcachedLogFile)/$(awk '/total_chunks/ {sum+=$NF} END{print sum}' ~/.tmpMemcachedLogFile)" | bc)% filled\n"; \
 
   rm ~/.tmpMemcachedLogFile
 
   rm ~/.tmpMemcachedLogFile
 +
 +
[[File:Memcache-memory-usage.png|569px|frameless|memcache memory usage]]
 +
 +
===Additional Articles===
 +
 +
* [[Memcached Monitor Tool]]
 +
* [[Setup Multi Instance Memcache]]
 +
* [[Check if Memcached is Running]]
 +
* [[Flush Your Memcached Instance]]

Latest revision as of 22:20, 18 January 2014

Check How much Memory Usage Memcached is Using

Are you having issues with memcached crashing? You can use the following command to check the via port or unix socket.

echo; read -p "Socket(Enter if using IP): " _ADDRESS_; if [ -z $_ADDRESS_ ]; then _OPT_=; read -p "IP Address: " _ADDRESS_; \
read -p "PORT: " _PORT_; else _OPT_='-U'; _PORT_=; fi; echo -e "\nMemcached is $(echo "stats slabs" | nc $_OPT_ $_ADDRESS_ \
$_PORT_ > ~/.tmpMemcachedLogFile; echo "scale=3;100*$(awk '/used_chunks/ {sum+=$NF} END{print sum}' \
 ~/.tmpMemcachedLogFile)/$(awk '/total_chunks/ {sum+=$NF} END{print sum}' ~/.tmpMemcachedLogFile)" | bc)% filled\n"; \
 rm ~/.tmpMemcachedLogFile

memcache memory usage

Additional Articles

* Memcached Monitor Tool
* Setup Multi Instance Memcache
* Check if Memcached is Running
* Flush Your Memcached Instance