grpc14 installed: grpcio==1.4.0,protobuf==3.4.0,six==1.11.0
grpc14 runtests: PYTHONHASHSEED='494489219'
grpc14 runtests: commands[0] | uname -a
Darwin yusenbindeMacBook-Pro.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64
grpc14 runtests: commands[1] | python server.py
Greeter client start.
Greeter client received: Hello, you!
(lldb) process attach --pid 13588
Process 13588 stopped
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
- hosts: localhost | |
vars: | |
dprefix: ~/playbook/ | |
role_prefix: "{{dprefix}}roles/" | |
env_files: | |
- "{{dprefix}}production" | |
- "{{dprefix}}staging" | |
var_dirs: | |
- "{{dprefix}}group_vars/" |
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
# list disk sector size | |
fdisk -l | grep "Sector size" | |
# get disk block size | |
blockdev --getbsz /dev/sda |
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
# -p refers to process and -t refers to thread | |
# record stack in process PID | |
perf record -F 99 -a -p PID -- sleep 30 | |
# hot path like top | |
perf top -p 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
# list tcp connection whose packet hasn't been acknowledged | |
ss -tnp|awk '$3 > 0 {print $3, $4, $5, $6, $7}' | |
# list tcp connection hasn't read received packet | |
ss -tnp|awk '$2 > 0 {print $3, $4, $5, $6, $7}' | |
# show timer info about tcp connection | |
ss -tnpo |
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
[tox] | |
skipsdist = True | |
envlist = | |
3.6-unit | |
flake8 | |
pydocstyle | |
pyflakes |
grpc14 installed: grpcio==1.4.0,protobuf==3.4.0,six==1.11.0
grpc14 runtests: PYTHONHASHSEED='2780338798'
grpc14 runtests: commands[0] | uname -a
Linux iZ25wb48421Z 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
grpc14 runtests: commands[1] | python server.py
Greeter client start.
Greeter client received: Hello, you!
#0 0x00007fa98cb6d089 in __libc_waitpid (pid=5384, stat_loc=stat_loc@entry=0x7fff22165e40, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1 0x00007fa98caf2092 in do_system (line=line@entry=0x7fa986083b78 "bash ./pstack.sh 5381") at ../sysdeps/posix/system.c:148
The last listed variables wins prioritization
-
role defaults [1]
-
inventory file or script group vars [2]
-
inventory group_vars/all
-
playbook group_vars/all
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
# In China | |
curl "http://ip.cn/" | |
# overseas | |
curl "https://ipinfo.io/" |
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 queue | |
import threading | |
w_queue = queue.Queue(maxsize=10) | |
def foo(): | |
w_queue.put('Hello, world') |