There's a project that lets you snoop on memcached activity via pcap, and display the results in top
/htop
manner.
https://github.com/tumblr/memkeys.git
To build, you need autoconf
and automake
, and you configure the program for your system by running the supplied autogen.sh
script.
When I run this, after a couple of dozen lines, it dies with the following output:
...
checking for g++44... no
checking for g++... no
checking for gcc... gcc
checking whether the C++ compiler works... no
configure: error: in `/data/tmp/memkeys/memkeys-master':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
The config.log
file indicates that Configure
generated a C program with an error (I have gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3) installed):
configure:3191: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "memkeys"
| #define PACKAGE_TARNAME "memkeys"
| #define PACKAGE_VERSION "0.1"
| #define PACKAGE_STRING "memkeys 0.1"
| #define PACKAGE_BUGREPORT "bmatheny@mobocracy.net"
| #define PACKAGE_URL ""
| #define PACKAGE "memkeys"
| #define VERSION "0.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
It looks like a statement was meant to be generated before the return
statement, but nothing was inserted and the source is left with a lone semi-colon.
Does this ring a bell?
Ok, for archeologists who stumble across this problem in the future, the answer is that the server in question wasn't entirely set up for development (and Configure
wasn't able to identify the problem correctly).
apt-get install build-essential
was the missing piece. If you want to deploy the resulting dynamic binary across a series of Ubuntu hosts, you'll also need to ensure that the libpcrecpp0
package is installed on them.