Skip to main content

Memcache Inspection Module and Command-Line Utility

Project description

Introduction

This package includes two things:

  • A Python module for extracting keys from Memcached servers.

  • A command-line utility for exploring, searching, and updating Memcached items.

This utility make uses of the Memcached “features” discussed in the SensePost Blog.

Installation

Using pip (recommended):

$ pip install memcacheinspector

Or, using easy_install:

$ easy_install memcacheinspector

Or, you can download the source and install it by hand:

$ python setup.py install

Installing the package installs both the memcacheinspector python module as well as the mcinspect command-line utility.

Usage

Usage: mcinspect [options] <action> [<arguments>]

Actions:
  list                    Lists all items stored in the server(s).
  dump                    Dumps all items (including values) stored in the server(s).
  grep <pattern>          Dumps all items (including values) whose key or value matches
                          the specified search pattern.
  get <key> [<key> ..]    Retrieves the items with the specified key(s).
  set <key> <value>       Sets the item with the specified key and value.
  incr key                Increments the value of the items with the specified key(s).
  decr key                Decrements the value of the items with the specified key(s).
  delete <key> [<key> ..] Deletes the items with the specified key(s).
  flush                   Expires all items in the server(s).
  stats                   Retrieves statistics from the server(s).

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -s SERVERS, --server=SERVERS
                        Specifies a server to connect to. Can be used multiple
                        times. Defaults to '127.0.0.1:11211'.
  -z MAX_VALUE_SIZE, --max-value-size=MAX_VALUE_SIZE
                        The maximum size (in bytes) of a value can be when
                        performing a list or dump action. Defaults to no
                        limit.
  -d DELTA, --delta=DELTA
                        The amount to change the value when using the incr or
                        decr actions.

Output Format:
list:
  <server connection string>|<expiration date>|<size in bytes>|<key>

dump, grep:
  <server connection string>|<expiration date>|<size in bytes>|<key>
  <value>

get, incr, decr:
  <server connection string>|<key>
  <value>

set, delete:
  <server connection string>|<key>

flush:
  <server connection string>

stats:
  <server connection string>|<statistic key>|<value>

License

memcacheinspector is released under the MIT License. See the LICENSE file for full text of the license.

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memcacheinspector-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file memcacheinspector-0.1.0.tar.gz.

File metadata

File hashes

Hashes for memcacheinspector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30c8ce1ba93ab96197ef64d77d7366e980a35422c0472e61828432d823580394
MD5 284858a352468863bbd9517a75cf82ba
BLAKE2b-256 b8e937fff9a0521e1e52c925087cb05d30d2f2ed091757a94f5196caeb25e1a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page