- 整体
- 这些依赖是必须的,以RHEL/CentOS举例
yum install automake libtool flex bison pkgconfig gcc-c++ libevent-devel
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
(function () { | |
if (top.location != self.location) { | |
return false; | |
} | |
var tu = unescape(self.location); | |
if (htmlspecialchars(tu).length != tu.length) { | |
exit; | |
} | |
if (tu && ((tu.indexOf("http://union-click.jd.com/") === 0) || (tu.indexOf("https://union-click.jd.com/") === 0))) { | |
if (!window.attachEvent) { |
typeset top=${1:-10} | |
typeset pid=${2:-$(pgrep -u $USER java)} | |
typeset tmp_file=/tmp/java_${pid}_$$.trace | |
# fix for alibaba-inc.com | |
export JAVA_HOME=/opt/taobao/java | |
$JAVA_HOME/bin/jstack $pid > $tmp_file | |
ps H -eo user,pid,ppid,tid,time,%cpu --sort=%cpu --no-headers\ | |
| tail -$top\ |
_oo0oo_ | |
o88888880 | |
88" . "88 | |
(| -_- |) | |
0\ = /0 | |
____/`---'\____ | |
' \\| + |// ` | |
/ \\||| : ||// \ | |
/ _|||| -:- ||||- \ |
jmap -dump:live,format=b,file=heap-`date +%Y%m%d%H%M`.bin `pgrep -u admin java` |
#!stap | |
global elapsed_times | |
global stack_depths_by_tid | |
probe begin { | |
printf("%s\n","running ... ") | |
} | |
probe end{ | |
printf("%s\n","ending .... ") |
/* | |
*url:http://www.cnblogs.com/yuuyuu/p/5103744.html | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <fcntl.h> |
#!/usr/bin/env python | |
# | |
# A script that runs the commands to perform Netflix's | |
# "Linux Performance Analysis in 60,000 Milliseconds" | |
# | |
# (http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html) | |
# | |
import subprocess | |
import datetime | |
import argparse |
#!/usr/bin/perl | |
# This script parses Git blame's "porcelain" output format and | |
# ascertains the oldest lines of code seen. | |
# | |
# If you want to perform a custom report, just define your own callback | |
# function and invoke parse_porcelain() with it. | |
# | |
# The expected input format is slightly modified from raw `git blame | |
# -p`. Here is an example script for producing input: |