Code Monkey home page Code Monkey logo

ctop's Introduction

CTOP ("Top for Cassandra")

Build Status

CTOP is a tool which allows you to quickly find out what's happening on a machine running Cassandra. It is particularly useful on a cluster with multiple-tenants, multiple-applications, and large numbers of tables. If you suspect that the performance is not good, then you can use this to figure out which table is giving you trouble.

Screenshots:

Ordered by read-latency Ordered by disk-space Ordered by write-rate

Installation (deb):

  • Download a DEB file from the releases section
  • Install mx4j "apt-get install libmx4j-java"
  • Install CTOP "dpkg -i ctop_1.3_amd64.deb"
  • Find out what's killing your Cassandra cluster

Installation (binary):

  • Download a binary (or compile one yourself)
  • Install mx4j jars in the java/cassandra classpath (download from here)
  • Re-start cassandra
  • Run CTOP

How to use it:

  • Run the binary
  • Allow CTOP some time to collect metrics, then press SPACE to refresh the display. You will see your tables listed by Reads/s (in descending order).
  • You can press SPACE at any time to refresh the display
  • The numbers 1 through 5 change the sorting order: 1: Order by Reads/s 2: Order by Writes/s 3: Order by the amount of disk-space used (in Bytes) 4: Order by read-latency (in miliseconds) 5: Order by write-latency (in miliseconds)
  • Pressing "Q" will quit
  • Metrics are for one node only (not cluster-wide)

Notes

  • CTOP should run on anything. Originally was developed on Ubuntu, and it's reported to run on CentOS and MacOS X.

Pre-requisites:

  • CTOP uses "libmx4j-java" (an HTTP -> JMX) to retrieve JMX metrics from Cassandra (there was no easy way to query JMX directly), so this needs to be in the class-path where Cassandra can find it upon startup (with Ubuntu it is enough to do "apt-get install libmx4j-java", then to re-start Cassandra).
  • Cassandra needs to be told how to run MX4J (the default is to listen to the interface that Cassandra listens on):
  MX4J_ADDRESS="-Dmx4jaddress=127.0.0.1"  
  MX4J_PORT="-Dmx4jport=8081"  
  JVM_OPTS="$JVM_OPTS $MX4J_ADDRESS"  
  JVM_OPTS="$JVM_OPTS $MX4J_PORT"  

ctop's People

Contributors

chrusty avatar nfisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctop's Issues

error in ctop "could not unmarshal the response! EOF"

Hello Team,

i have installed CTOP on ubuntu 14.04, from the released debian package ctop_1.3_amd64.deb.
In the logs i can see below error for all the metrics
Info: Getting metrics:LiveDiskSpaceUsed
debug: Got http resonse code (200)
Error: could not unmarshal the response! EOF

Seems there is code issue, Can you please resolve this.

Cluster-wide statistics

Having written a similar tool (only focussed on the entire cluster), I have to ask if you're intending to expand the scope to look at more than just one system?

which cassandra version does ctop support

After I build ctop, and run it, I couldn't get the column family metrics.
Then, I review the source code, I found the mx4j http request is like below:
http://host:8081/getattribute?objectname=org.apache.cassandra.db:type=ColumnFamilies,keyspace=keyspac e1,columnfamily=standard1&attribute=ReadCount&format=long&template=identity

I copy the http url in browser, only
<?xml version="1.0" encoding="UTF-8"?>
retured.

I use cassandra 2.2.7, does it my cassandra version is too old?
Is the mx4j interface is changed?

I would very much appreciate any help or guidance you are able to give me.
thanks~

Changing ctop

Hi All,

I am trying to execute ctop and receive the following error:
Can't connect to stats-provider! (127.0.0.1)

I am running Ubuntu 13 and Cassandra version 1.2.19 and my Cassandra server is not listening on 127.0.0.1.
I have performed the steps as mentioned in the "Pre-requisites:" and "Installation (deb):"

-- Added the following to cassandra-env.sh
MX4J_ADDRESS="-Dmx4jaddress=127.0.0.1"  
MX4J_PORT="-Dmx4jport=8081"  
JVM_OPTS="$JVM_OPTS $MX4J_ADDRESS"  
JVM_OPTS="$JVM_OPTS $MX4J_PORT"

-- Executed the following  
apt-get install libmx4j-java
dpkg -i ctop_1.3_amd64.deb (after downloading ctop_1.3_amd64.deb from the provided link)
restarted cassandra

but it doesn't work and outputs the following: Can't connect to stats-provider! (127.0.0.1)

Any ideas how to get ctop working on my env?

Thanks,

Eyal.

Getting LOGS but NO Metrics

hi,

I have followed the document and the config seems to be correct.
I am able to get the logs for each read write and other stuff , but i am not able to get the metrics for any.

Thanks in advance.
Rohit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.