CA BD NY
  • Categories

  • Recent Posts

  • RSS MySQL Hacker

  • RSS Apache Hacker

  • RSS MiniCTO

  • Meta

  • Quickly Getting Memcached Stats from the Command-line (CLI)

    Published December 10th, 2008

    Problem Statement

    Once you have memcached installed, you want to know how well it is working out for you. Here we will show you how you can get stats on memcached from the command-line in a hurry.

    Getting memcached stats from the command-line

    From your terminal app such as putty, do the following:

    1. Telnet to your memcached server using the memcached port. For example, if you are running memcached on your localhost on the default port 11211, you can run:
      telnet localhost 11211
      
    2. Once connected, enter stats and you will see the current memcached stats as shown in the sample below:
      [root@cassini ~]# telnet localhost 11211
      Trying 127.0.0.1...
      Connected to localhost.localdomain (127.0.0.1).
      Escape character is '^]'.
      stats
      STAT pid 16781
      STAT uptime 2891159
      STAT time 1228931142
      STAT version 1.2.6
      STAT pointer_size 32
      STAT rusage_user 0.071989
      STAT rusage_system 0.380942
      STAT curr_items 69
      STAT total_items 249
      STAT bytes 3871
      STAT curr_connections 2
      STAT total_connections 1965
      STAT connection_structures 6
      STAT cmd_get 3270
      STAT cmd_set 249
      STAT get_hits 403
      STAT get_misses 2867
      STAT evictions 0
      STAT bytes_read 62361
      STAT bytes_written 27026
      STAT limit_maxbytes 268435456
      STAT threads 1
      END
      

    Get a Trackback link

    No Comments Yet

    Be the first to comment!

    Leave a comment

    Comment Policy: First time comments are moderated. Please be patient.