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
http://kevin.deldycke.com/2011/06/munin-monitor-debian-squeeze-server/ | |
Again, here is a tutorial article exposing the recipe I use to cook a Munin on a Debian Squeeze. | |
As usual, let’s start by installing the main Munin package: | |
$ aptitude install munin | |
FYI, the version that aptitude choose to install was Munin 1.4.5. The default configuration coming along will make it produce graphs and HTML content to /var/cache/munin/www. Now we need to serve these pages via a web server. | |
As I wanted to play with nginx for a long time, I will use this opportunity to serve Munin’s content. The default version coming with Squeeze is quite old, so we’ll get the latest version from the Dotdeb repository: |
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
REFERENCE: http://www.masnun.me/2011/11/02/gearman-php-and-supervisor-processing-background-jobs-with-sanity.html | |
apt-get install python-setuptools | |
easy_install supervisor | |
echo_supervisord_conf > /etc/supervisord.conf | |
============================================= | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
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
ssh-agent bash | |
/home/syd/.pythonbrew/pythons/Python-2.7.2/bin/python /home/syd/.pythonbrew/pythons/Python-2.7.2/bin/trond --pid-file=/var/run/trond.pid --working-dir=/home/syd/tron --host=192.168.99.51 --log-conf=/home/syd/tron/logging.conf |
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
# vi /etc/security/limits.conf | |
[Modify or add "nofile" (number of file) entries - note | |
that a userid can be used in place of *] | |
* soft nofile 64000 | |
* hard nofile 64000 | |
# vi /etc/pam.d/login | |
[Add the line] | |
session required /lib/security/pam_limits.so |
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
Ctrl+b " - split pane horizontally | |
Ctrl+b % - 将当前窗格垂直划分 | |
Ctrl+b 方向键 - 在各窗格间切换 | |
Ctrl+b,并且不要松开Ctrl,方向键 - 调整窗格大小 | |
Ctrl+b c - (c)reate 生成一个新的窗口 | |
Ctrl+b n - (n)ext 移动到下一个窗口 | |
Ctrl+b p - (p)revious 移动到前一个窗口. | |
Ctrl+b 空格键 - 采用下一个内置布局 | |
Ctrl+b q - 显示分隔窗口的编号 | |
Ctrl+b o - 跳到下一个分隔窗口 |
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
sshfs [email protected]:/var/www /var/www -o idmap=user -o allow_other -o uid=33 -o gid=33 |
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
sh.addShard("rs0/srv-7:27019") | |
sh.addShard("rs1/srv-5:27019") | |
sh.addShard("rs2/srv-6:27019") | |
sh.enableSharding("oplog") | |
sh.enableSharding("sem_crawler") | |
sh.enableSharding("aggregate") | |
sh.enableSharding("keyword_insights") | |
sh.enableSharding('crawler') | |
sh.enableSharding('words') | |
sh.shardCollection("oplog.oplogs", {campaign_id:1}) |
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
du | sort -nr | cut -f2- | xargs du -hs |
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
export DOOZER_BOOT_URI="doozer:?ca=192.168.99.51:8046&ca=192.168.99.52:8046&ca=192.168.99.53:8046" | |
// ON 192.168.99.51 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.51:8046" -w false -c "dzns" > /dev/null 2>&1 & | |
// ON 192.168.99.52 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.52:8046" -w false -c "dzns" -a "192.168.99.51:8046" > /dev/null 2>&1 & | |
printf '' | /var/code/go/bin/doozer -a "doozer:?ca=192.168.99.51:8046" add "/ctl/cal/1" | |
// ON 192.168.99.53 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.53:8046" -w false -c "dzns" -a "192.168.99.51:8046" > /dev/null 2>&1 & | |
printf '' | /var/code/go/bin/doozer -a "doozer:?ca=192.168.99.51:8046" add "/ctl/cal/2" |
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
http { | |
limit_conn_zone $binary_remote_addr zone=perip:10m; | |
server { | |
...... | |
location { | |
limit_conn perip 10; | |
} | |
...... | |
} | |
} |