Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Get statistics from each of the servers.

@param stat_args: Additional arguments to pass to the memcache
    "stats" command.

@return: A list of tuples ( server_identifier, stats_dictionary ).
    The dictionary contains a number of name/value pairs specifying
    the name of the status field and the string value associated with
    it.  The values are not converted from strings.

src/o/p/openlibrary-HEAD/scripts/2011/08/inspect-memcache.py   openlibrary(Download)
mc = memcache.Client([sys.argv[1]])
 
slabs = mc.get_stats("slabs")[0][1]
keys = sorted([key.split(":")[0] for key in slabs if "chunk_size" in key], key=lambda k: int(k))
for k in keys:
    print k
    print "  chunk_size", slabs[k + ":chunk_size"]
    print "  total_chunks", slabs[k + ":total_chunks"]
    dump = mc.get_stats("cachedump %s 5" % k)[0][1]

src/n/i/niwi-web-HEAD/src/niwi/contrib/memcache_status/views.py   niwi-web(Download)
        import memcache
        mc = memcache.Client(cache_location, debug=0)
        return dict(mc.get_stats())
 
    def render_to_response(self, context):

src/g/r/graphite-tools-HEAD/monitors/auto/memcached.py   graphite-tools(Download)
 
    try:
        stats = m.get_stats()
    except Exception, ex:
        sys.stderr.write('Exception when getting stats: %s\n' % ex)

src/p/e/peafowl-0.9/peafowl/peafowl.py   peafowl(Download)
    def __len__(self, *args, **kwargs):
        statistics = self.get_stats()
        return int(statistics[0][1]['total_items'])
 
 

src/m/a/mamba-HEAD/mamba/client.py   mamba(Download)
        @rtype: int
        '''
        result = self.get_stats()
        return sum(s['size'] for s in result)
 

src/p/e/peafowl-HEAD/peafowl/peafowl.py   peafowl(Download)
    def __len__(self, *args, **kwargs):
        statistics = self.get_stats()
        return int(statistics[0][1]['total_items'])
 
 

src/m/e/MemcachedManager-HEAD/TestScripts/GetStats.py   MemcachedManager(Download)
import memcache
 
mc = memcache.Client(['127.0.0.1:11211','127.0.0.1:11212'], debug=0)
results = mc.get_stats()
for result in results: