etsy / mctop Goto Github PK
View Code? Open in Web Editor NEWa top like tool for inspecting memcache key values in realtime
License: MIT License
a top like tool for inspecting memcache key values in realtime
License: MIT License
I'm unable to follow the steps in the README and get it working - I'm on Ubuntu 12.10.
I installed libpcap-dev, bundle installed the deps, then did rake install. Running mctop, either system-wide or from within the repo, gives me:
``require': cannot load such file -- curses`
I installed libncurses-ruby
and libncurses5-dev
, but doing a gem install ncurses
failed during native compilation with the error:
form_wrap.c: In function ‘make_arg’:
form_wrap.c:1126:38: error: ‘struct RArray’ has no member named ‘len’
form_wrap.c:1130:5: warning: format not a string literal and no format arguments [-Wformat-security]
So I'm stuck. Any help?
We use twemproxy, and it would be very handy to be able to sniff an alternate port. Request additional cmdline flag for that (default to 11211 of course).
ruby-pcap will throw exceptions at initialization (eg. invalid interface passed in). Given it's running in a seperate thread these fail whilst the UI is blissfully unaware and so is the user until exit time.
Need to work our a nice way to pass them through to the UI or bail if pcap can't initialize correctly
Tried both with the gem install
and cloning the repo, when running mctop i get the follwing message:
$ bin/mctop
/usr/local/share/gems/gems/ruby-pcap-0.7.9/lib/pcap/tcpdump_time_format.rb:10:in `<top (required)>': private method `include' called for Time:Class (NoMethodError)
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/gems/gems/ruby-pcap-0.7.9/lib/pcap_misc.rb:2:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
from /home/khernandez/mctop/lib/cmdline.rb:2:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from bin/mctop:10:in `<main>'
Is this a missing dependency in the documentation (such as Ruby version) or something of the sort? Currently running on CentOS with ruby 2.0.0p598
I'm sure there's something obvious I'm missing, but I'm not overly familiar with Ruby so excuse if it's something obvious.
When trying to run sudo mctop -i eth1
, I got the following error:
/var/lib/gems/1.8/gems/mctop-0.0.3/bin/../lib/sniffer.rb:16:in initialize': uninitialized constant MemcacheSniffer::Mutex (NameError) from /var/lib/gems/1.8/gems/mctop-0.0.3/bin/mctop:16:in
new'
from /var/lib/gems/1.8/gems/mctop-0.0.3/bin/mctop:16
from /usr/local/bin/mctop:19:in `load'
from /usr/local/bin/mctop:19
I just installed mctop on our dev box, (yum install libpcap-devel, gem install pcap, gem install mctop) and I get this error when trying to run it:
[root@dev temp]# mctop --interface=eth0
/usr/lib/ruby/gems/1.8/gems/mctop-0.0.3/bin/../lib/ui.rb:77:in round': wrong number of arguments (1 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/mctop-0.0.3/bin/../lib/ui.rb:77:in
render_stats'
from /usr/lib/ruby/gems/1.8/gems/mctop-0.0.3/bin/mctop:39
from /usr/bin/mctop:19:in `load'
from /usr/bin/mctop:19
This is on Centos 6.3 x86_64
Did a super quick POC of adding a statsd key sniffer:
https://github.com/draco2003/mctop/tree/statsd_sniffer
Could see this being useful for other simple key type protocols like graphite, redis and so on...
Wondering if this is something that would get pulled in if it was cleaned up and implemented in more of a plugin type model?
I have problems running mctop with Ruby 2.1.2p95 (on OS X):
$ ./bin/mctop --help
/Users/dentarg/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- curses (LoadError)
from /Users/dentarg/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/dentarg/src/mctop/lib/ui.rb:1:in `<top (required)>'
from /Users/dentarg/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/dentarg/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from ./bin/mctop:12:in `<main>'
Probably due to the fact that curses was removed from standard library in Ruby 2.1.0: https://bugs.ruby-lang.org/issues/8584
Hi. Check with you does it work with AWS elastic cache?
Are there plans to support the binary protocol? I had a quick look at the RFC to see if I can implement it quickly but it doesn't return the key in the response which would make it rather difficult...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.