-
Capture some data using tcpdump:
tcpdump -enx -w cassandra-dump port 9160
-
Open the file with wireshark and find a packet where the data looks related to casandra e.g. it has
multiget_slice
or similar commands near the start of the data. -
In wireshark select the data part of the packet and right click -> copy -> bytes -> hex stream
-
Now you need a thrift library to decode the data. thobbs/phpcassa should work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while(true) do out=$(./vendor/bin/phpunit); clear; echo -e "$(date)" "\n" "$out"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#$4*10 alters the scale so if you set 10*100 each segment of a bar would be 1 100th of a second | |
tail -f /var/log/cassandra/gc.log.0 | while read line; do echo $line | head -c $(awk '{ print int($4*10) }') </dev/zero | tr '\0' '='; printf "|\n"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# jstatd - runs the jstat daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Jstatd JVM monitoring | |
# processname: jstatd | |
# pidfile: /var/run/jstatd.pid | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show the latency across keyspaces | |
nodetool cfstats | grep "Latency" | |
# Identify how many replicas have a row | |
# 1. use cassandra-cli to identify row key (connect <host>/<port>; use <keyspace>; list <table> limit 1;) | |
# 2. copy key into: nodetool getendpoints -- <keyspace> <table> <key> | |
#Node Exceptions | |
nodetool info | grep Exceptions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do inotifywait -re modify [dirname] && echo "DO SOMETHING"; done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do inotifywait -qr --format '%w' *.go | while read FILE; do echo $FILE; gofmt -w $FILE; done; done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import time | |
import RTk.GPIO as GPIO | |
import openvr | |
import sys | |
import atexit | |
def shutdown(): |
OlderNewer