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/bash | |
BINARY=$1 | |
HOST=$2 | |
PORT=$3 | |
DURATION=$4 | |
echo "Forwarding port..." | |
ssh -t -t -L$PORT:localhost:$PORT $HOST & | |
SSH_PID=$! |
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
Date/Time: 2014-01-14 22:26:18 -0800 | |
OS Version: 10.9.1 (Build 13B42) | |
Architecture: x86_64 | |
Report Version: 18 | |
Event: Sleep Wake Failure | |
Steps: 0 | |
Hardware model: MacBookPro10,2 | |
Active cpus: 4 |
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
import yappi | |
import time | |
yappi.set_clock_type("cpu") | |
def foo(n): | |
s = 0 | |
for i in xrange(n): | |
s += n*n |
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
#!/usr/bin/env python | |
""" | |
smem_test.py - test smem's USS/PSS/RSS values | |
More info on smem: http://www.selenic.com/smem/ | |
Sample run: | |
# ./smem_test.py |
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
sudo opcontrol --start-daemon | |
sudo opcontrol --shutdown | |
sudo opcontrol --status | |
sudo opcontrol --vmlinux=/usr/lib/debug/lib/modules/2.6.18-164.el5debug/vmlinux | |
sudo opcontrol --start --callgraph=5 | |
sudo opcontrol --stop | |
sudo opcontrol --dump | |
sudo opcontrol --reset |
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
# | |
# Follow instructions from the website below and add rhel5-debuginfo.repo to yum repos list (if not exists) | |
# http://le-huy.blogspot.com/2011/01/using-debuginfo-packages-in-redhat.html | |
# | |
[root@localhost ~]# cat /etc/yum.repos.d/rhel-debuginfo.repo | |
[rhel-debuginfo] | |
name=Red Hat Enterprise Linux $releasever - $basearch - Debug | |
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ | |
enabled=0 |
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/bash | |
nsamples=$2 | |
sleeptime=$3 | |
pid=$1 | |
for x in $(seq 1 $nsamples) | |
do | |
pstack $pid && echo "--eos--" | |
sleep $sleeptime | |
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
# install openvpn | |
sudo apt-get install -y openvpn | |
# NAT 192.168.99.1/2 subnet <-> eth0 (interface on server) | |
sudo modprobe iptable_nat | |
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward | |
sudo iptables -t nat -A POSTROUTING -s 192.168.99.1/2 -o eth0 -j MASQUERADE | |
# generate secret key; scp this key to the client later |
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
/mnt/bonnie - LVM striped over 4 ephemeral | |
Version 1.03c ------Sequential Output------ --Sequential Input- --Random- | |
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | |
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP | |
db_experimen 30000M 59364 99 221719 42 94578 15 57870 99 303915 16 407.4 0 | |
------Sequential Create------ --------Random Create-------- | |
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- | |
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP | |
16 10583 38 +++++ +++ 6411 10 10067 35 +++++ +++ 5363 9 |
NewerOlder