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
# rsyslog configuration file | |
# note that most of this config file uses old-style format, | |
# because it is well-known AND quite suitable for simple cases | |
# like we have with the default config. For more advanced | |
# things, RainerScript configuration is suggested. | |
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html | |
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html | |
#### MODULES #### |
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: weizhifeng | |
status=$(ps aux|grep haproxy | grep -v grep | grep -v bash | wc -l) | |
if [ "${status}" = "0" ]; then | |
/etc/init.d/haproxy start | |
status2=$(ps aux|grep haproxy | grep -v grep | grep -v bash |wc -l) | |
if [ "${status2}" = "0" ]; then | |
/etc/init.d/keepalived stop |
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 config needs haproxy-1.1.28 or haproxy-1.2.1 | |
global | |
log 127.0.0.1 local3 debug | |
#log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 65535 | |
#chroot /usr/share/haproxy | |
user haproxy | |
group haproxy |
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
! Configuration File for keepalived | |
global_defs { | |
notification_email { | |
[email protected] | |
} | |
notification_email_from [email protected] | |
smtp_server mail.sina.com.cn | |
smtp_connect_timeout 30 | |
router_id LVS_1 |
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
! Configuration File for keepalived | |
2 | |
3 global_defs { | |
4 notification_email { | |
5 [email protected] | |
6 } | |
7 notification_email_from [email protected] | |
8 smtp_server mail.sina.com.cn | |
9 smtp_connect_timeout 30 | |
10 router_id LVS_DEVEL_252 |
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
--Lua timer library based on C signal. | |
--Notice: signal need Posfix system support | |
local ffi = require "ffi" | |
ffi.cdef[[ | |
typedef void (*sighandler_t) (int32_t); | |
extern sighandler_t signal (int32_t signum, sighandler_t handler); | |
unsigned int alarm(unsigned int seconds); | |
]] |
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
addon_name=ngx_http_echo_module | |
HTTP_MODULES="$HTTP_MODULES ngx_http_echo_module" | |
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_echo_module.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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
chmod=0777 | |
chown=supervisord:supervisord | |
[inet_http_server] | |
port=1222 | |
username=sinasec | |
password=hello |
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
pid file = /var/run/rsyncd.pid | |
port = 873 | |
address = 0.0.0.0 | |
uid = root | |
gid = root | |
use chroot = no |
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
import threading | |
import requests | |
#Reference for weirong. | |
Max_concurrency = 50 | |
def request(url): |
NewerOlder