- What can be traced?
- How can trace events be specified?
- "match specifications": twisty passages, all alike
- WTF, can I just use DTrace and drink my coffee/beer/whisky in peace?
- Trace delivery mechanisms: pick one of two
This file contains 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 Consul | |
1. download consul | |
``` | |
wget https://releases.hashicorp.com/consul/1.7.3/consul_1.7.3_linux_amd64.zip | |
``` | |
2. unzip to `/usr/bin` | |
``` | |
sudo unzip consul_1.7.3_linux_amd64.zip -d /usr/bin |
This file contains 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
-- 目的:启动一个单独定时器,每隔一段时间自动调用glibc库对应的libc.so.6文件的malloc_trim()接口,尝试清理掉被缓存已free掉的内存信息 | |
-- 使用方式: | |
-- 1. 可以单独用作init_worker_by_lua_file指令配置 | |
-- 2. 或单独在对应需要初始化的代码所需要地方,导入即可:require "lua_malloc_trim" | |
-- User: nieyong | |
-- Date: 2017/9/20 | |
-- Time: 下午8:45 | |
local ffi = require "ffi" | |
local glibc = ffi.load("c") |
This file contains 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
-- 目的:启动一个单独定时器,每隔一段时间自动调用glibc库对应的libc.so.6文件的malloc_trim()接口,尝试清理掉被缓存已free掉的内存信息 | |
-- 使用方式: | |
-- 1. 可以单独用作init_worker_by_lua_file指令配置 | |
-- 2. 或单独在对应需要初始化的代码所需要地方,导入即可:require "lua_malloc_trim" | |
-- User: nieyong | |
-- Date: 2017/9/20 | |
-- Time: 下午8:45 | |
local ffi = require "ffi" | |
local glibc = ffi.load("c") |
This file contains 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
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo | |
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ | |
yum install devtoolset-2-libasan-devel libssan | |
/opt/rh/devtoolset-2/root/usr/bin/gcc --version | |
cd openresty-1.11.2.5 | |
export ASAN_OPTIONS=detect_leaks=0 | |
./configure --with-cc="gcc -fsanitize=address" \ | |
--with-cc-opt="-O1 -fno-omit-frame-pointer" \ | |
--with-debug \ |
This file contains 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
# This is to install both on OS X if you don't want to use homebrew | |
# xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun | |
xcode-select --install | |
curl -O http://luajit.org/download/LuaJIT-2.0.4.zip | |
unzip LuaJIT-2.0.4.zip | |
cd LuaJIT-2.0.4 | |
make && make install | |
curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz |
This file contains 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
%%%------------------------------------------------------------------- | |
%%% @author nieyong | |
%%% @copyright (C) 2015 | |
%%% @doc | |
%%% DNS解析测试 | |
%%% @end | |
%%%------------------------------------------------------------------- | |
-module(test1). | |
-export([start/2]). |
This file contains 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 | |
# coding=utf8 | |
# Copyright (C) 2010 Saúl ibarra Corretgé <[email protected]> | |
# | |
""" | |
pydmesg: dmesg with human-readable timestamps | |
""" |
This file contains 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
/* | |
* One demo http server, just for test! | |
* how to compile it: | |
* gcc server_v2.c -o server_v2 /usr/local/lib/libev.a -lm | |
* how to run it: | |
* ./server_v2 -p port_num -i the_bind_ip | |
* default port is 8000 | |
* default ip is all of the local ip | |
* eg: | |
* ./server_v2 -p 9000 -i 192.168.192.130 |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>jsonp example</title> | |
<script src="http://libs.baidu.com/jquery/1.5.0/jquery.js"></script> | |
<script type="text/javascript"> | |
var clientId = ""; | |
var urlPrefix = "http://127.0.0.1:8080/jsonp"; | |
$(document).ready(function(){ |
NewerOlder