RPMS available at: https://raw.githubusercontent.com/amuraru/opsview-rpms/master/centos/7
http://docs.opsview.com/doku.php?id=developer:build:rpm_opsview
| mkfs.ext4 -m 1 -T largefile -O dir_index,extent,sparse_super /dev/sdb |
| import java.util.concurrent.locks.ReentrantReadWriteLock; | |
| class CachedData { | |
| Object data; | |
| volatile boolean cacheValid; | |
| final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); | |
| Object loadData() throws Exception { | |
| throw new Exception("Load Failed"); | |
| } |
| rpmrebuild -e -p --notest-install jdk-8u25-linux-x64.rpm |
| */5 * * * * tomcat bash -c "/usr/java/latest/bin/jstack -l `ps aux | grep org.apache.catalina.startup.Bootstrap | grep -v grep | tr -s ' ' | cut -f2 -d' '` >> `ls -d /var/log/tomcat[6-9] | head -1`/stacktrace.log" |
| #!/usr/bin/env python | |
| import sys | |
| import jira.client as j | |
| import getpass | |
| JIRA_SERVER="https://issues.adobe.com" | |
| print "Creating an issue on %s" % JIRA_SERVER | |
| iptables -F | |
| iptables -X | |
| /sbin/iptables -N INET_IN | |
| /sbin/iptables -N INET_OUT | |
| /sbin/iptables -A OUTPUT -j INET_OUT | |
| /sbin/iptables -A INPUT -j INET_IN | |
| /sbin/iptables -A INET_IN -s 10.2.122.0/24 | |
| /sbin/iptables -A INET_OUT -d 10.2.122.0/24 | |
| iptables -n -v -x -L INET_IN | |
| iptables -n -v -x -L INET_OUT |
| # Capture Thrift hex method call on a box running HBase ThriftServer | |
| strace -f -xx -e recvfrom -s2048 -p$(jps | grep ThriftServer | cut -f1 -d' ') 2>&1 | |
| #getColumnDescriptor .META. | |
| echo -en "\x80\x01\x00\x01\x00\x00\x00\x14\x67\x65\x74\x43\x6f\x6c\x75\x6d\x6e\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x73\x00\x00\x00\x00\x0b\x00\x01\x00\x00\x00\x06\x2e\x4d\x45\x54\x41\x2e\x00" | nc localhost 9090 | |
| #getTableNames thrift call | |
| echo -en "\x80\x01\x00\x01\x00\x00\x00\x0d\x67\x65\x74\x54\x61\x62\x6c\x65\x4e\x61\x6d\x65\x73\x00\x00\x00\x00\x00" | nc localhost 9090 | |
| strace -e recvfrom -s2048 -p$(ps -L -p `jps | grep ThriftServer | cut -f1 -d' '` | cut -f2 -d' ' | xargs | sed -e 's/ / -p /g') 2>&1 |
| egrep 'CMS-(re|ini)' `ls -1tr /var/log/hbase/gc.regionserver.201* | tail -1` | cut -d'=' -f4 | sort -n | |
| grep -r ParNew `ls -1tr /var/log/hbase/gc.regionserver.201* | tail -1` | cut -d'=' -f4 | sort -n | tail -10 | |