<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eric&#039;s linux and nginx!</title>
	<atom:link href="http://www.nginxs.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nginxs.com</link>
	<description>eric&#039;s blog</description>
	<lastBuildDate>Tue, 24 Apr 2012 03:27:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>openvpn packet dropped due to output saturation</title>
		<link>http://www.nginxs.com/linux/483.html</link>
		<comments>http://www.nginxs.com/linux/483.html#comments</comments>
		<pubDate>Tue, 24 Apr 2012 03:27:41 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=483</guid>
		<description><![CDATA[用 <strong><a href="http://www.nginxs.com">openvpn</a></strong> 组建复杂的网络环境有段时间了，由于总出口都是从一台VPN 发送和接收，有时候会发现不稳定的情况，查看<strong>openvpn</strong> 日志 发现有时候会发现大量的 packet dropped 日志。很多包都呗 drop 掉了，由于我用的不是默认的 UDP 协议，用的是 TCP 协议。

       解决办法添加参数：
      <pre>
      tcp-queue-limit 256
      </pre><pre>
       此值默认值得 是 64.

     修改后，到目前为止还没有 出现此类 日志。</pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/483.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>招人</title>
		<link>http://www.nginxs.com/linux/480.html</link>
		<comments>http://www.nginxs.com/linux/480.html#comments</comments>
		<pubDate>Tue, 22 Nov 2011 10:20:59 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[招人]]></category>
		<category><![CDATA[招聘]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=480</guid>
		<description><![CDATA[招人： 1.熟悉apache mysql php5 搭建 2.熟悉shell 能自己写些简单脚本 3.熟悉 LVS 和 haproxy 搭建与调试 4.熟悉nagios 监控方式，能独立对一些系统应用编写脚本 5.了解 oracle sqlserver 6.能出短差 3-7天 工作地点： 北京 如有意愿，请投简历： eric@nginxs.com]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/480.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>openvpn 网络对网络</title>
		<link>http://www.nginxs.com/linux/476.html</link>
		<comments>http://www.nginxs.com/linux/476.html#comments</comments>
		<pubDate>Mon, 24 Oct 2011 13:33:44 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[openvpn]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=476</guid>
		<description><![CDATA[前段时间一直在为公司折腾这对各个地方的服务器的管理，因为有这 windows 服务器和linux 服务器，地级市的服务器没有固定IP地址，只有ADSL，所以只能别的办法穿透网络来实现网络对网络。 我的实现方法是 在IDC 机房 放置一台 LINUX 服务器来做 openvpn服务器，然后 各个地级市 的 linux 服务器为客户端，拨入openvpn服务器，然后添加路由，地级市的windows 服务器的网关设置为 本地网络linux 服务器，本地linux 开启转发。]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/476.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mysql 无缝迁移</title>
		<link>http://www.nginxs.com/linux/474.html</link>
		<comments>http://www.nginxs.com/linux/474.html#comments</comments>
		<pubDate>Tue, 28 Jun 2011 06:51:51 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=474</guid>
		<description><![CDATA[说是无缝迁移可能说大了·但是经过这次迁移的确算是无缝迁移，因为凌晨两点做的迁移一直有用户在注册，一个用户也没有丢掉···

四台主机
<pre>mysql  master    10.100.0.2  （要替换掉）
mysql  slave      10.100.0.3  (要替换掉)

mysql master     10.100.0.10  (新的机器)
mysql slave       10.100.0.11  (新的机器)</pre>

迁移过程很简单  
<pre>mysql   master --&#62; slave(master) --&#62; slave(master)--&#62; slave</pre>

注意一点是  原 mysql slave 做新机器(10.100.0.3) 做 master 必须要开启日志的更新。

<pre>cat /etc/mysql/my.cnf</pre>

<pre>server-id       = 20002
master-host     = 10.100.0.2
master-user     = rel_eric
master-password = 123456
master-port     = 3306
<span style="color: #ff0000;"><strong> log-slave-updates </strong></span></pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/474.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iptables 端口针对动态IP（adsl）映射规则</title>
		<link>http://www.nginxs.com/linux/471.html</link>
		<comments>http://www.nginxs.com/linux/471.html#comments</comments>
		<pubDate>Wed, 01 Jun 2011 09:06:46 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=471</guid>
		<description><![CDATA[iptables -A PREROUTING -t nat -i ppp1 -p tcp &#8211;dport 8080 -j DNAT &#8211;to 1.1.1.3:22 iptables -A POSTROUTING -t nat -o ppp1 -p tcp -m tcp &#8211;dport 8080 -j SNAT &#8211;to 1.1.1.1 iptables -A INPUT -p tcp -m state &#8211;state NEW &#8211;dport 22 -i eth1 -j ACCEPT iptables -A PREROUTING -t nat -i ppp1 -p [...]]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/471.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>check_memcache with python</title>
		<link>http://www.nginxs.com/linux/464.html</link>
		<comments>http://www.nginxs.com/linux/464.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 04:21:52 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nagios]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=464</guid>
		<description><![CDATA[在 http://exchange.nagios.org/ 上有shell 写的脚本，<strong><a href="http://www.nginxs.com">nagios</a></strong>可以监控到命中率，他是基于 telnet 的，使用之后看到 进程里有个telnet 进程，很不爽，而且脚本休要修改一下，不然会报错，不知道大家是不是同样的问题，而我，想要的是监控命中率，还有内存使用率以及，当前连接数·所以只能自己动手来写个脚本了·在<strong><a href="http://www.nginxs.com">python</a></strong> 的官网上看到有 python-memcache包，就下来看了一下源码，使用还是很方便的·。

<pre>shell $> cat check_memcache.py</pre>
<pre>
#!/usr/bin/python
import memcache
import getopt
import sys

def usage():
   print """check_memcache is a Nagios to monitor memcached memory Plugin
   Usage:

   check_memcache [-h&#124;--help][-w&#124;warning][-c&#124;critical]

   Options:
       --help&#124;-h)
            print check_memcache help
       --warning&#124;-w)
            Sets a warning level for memcache use memory.Default is :off
       --critical&#124;-c)
            Sets a critical level for memcache use memory.Default is:off. """
   sys.exit(0)</pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/464.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iphone 流媒体服务</title>
		<link>http://www.nginxs.com/linux/459.html</link>
		<comments>http://www.nginxs.com/linux/459.html#comments</comments>
		<pubDate>Wed, 20 Apr 2011 10:38:47 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[媒体服务]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[流媒体]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=459</guid>
		<description><![CDATA[        <strong>iPhone HTTP Streaming with FFMpeg and an Open Source Segmenter</strong>

由于项目需要，需要搭建一个手机流媒体服务器，之前有做过流媒体服务器，不过都是PC客户端的•首选的是 <strong>flash media server</strong>。但是这次客户端是手机，手机客户端的种类很多，Nokia,iphone, android,他们没有一个支持 rtmp协议的而且支持的格式也很少，后来查询google,得知 android 支持rtsp,又是一路的 google 后来锁定在 live555 和 feng stream server,经过试验•用VLC 播放是可以的，在android上rtsp播放就是个废物不给力，也许是我研究的不够透彻，也在网上看其他网站的手机视频，时光网直接给的是http协议mp4•没有做任何处理•这样有一个弊端就是客户端与服务端建立连接一直下载视频，占用服务器带宽和资源，好处是解决各个手机客户端的不兼容问题。就在准备直接使用http 协议播放mp4的时候，有同事提到视频切片，就在google 上搜索，搜索到 一篇老外的文章，通过<strong><a href="http://www.nginxs.com">ffmpeg</a></strong>把视频转码，转成TS流文件，而后通过开源的 segmenter 把流文件切割成几个TS流文件，生成一个播放列表维护切成的散文件。经过试验，效果不错•该作者的 <strong><a href="http://www.nginxs.com">ffmpeg</a></strong> 参数是专门真多 iphone做了优化•在vlc上播放的效果远不如iphone上的效果~下面我把我安装过程与遇到的一些小问题都记录下来•
]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/459.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>nginx的Split Clients模块</title>
		<link>http://www.nginxs.com/linux/455.html</link>
		<comments>http://www.nginxs.com/linux/455.html#comments</comments>
		<pubDate>Fri, 01 Apr 2011 07:53:16 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[模块]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=455</guid>
		<description><![CDATA[在nginx 官网上浏览这些日子nginx 的更新，看到 更新了Split Clients 的模块·然后就看了一下·发现官网wiki的几点问题·写帮助文档的人有些不负责，我编译安装后，按照wiki的方法配置nginx.conf 报错。 官网wiki : http://wiki.nginx.org/HttpSplitClientsModule http { split-clients "${remote-addr}AAA" $variant { 0.5% .one; 2.0% .two; - ""; } server { location / { index index${variant}.html; 我实际的代码是： http { split_clients "${remote_addr}AAA" $variant { 0.5% .one; 2% .two; 3% .eric; 4% .yang; 50% .thr; * ""; } server { location / { [...]]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/455.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>博客服务器搬家美国</title>
		<link>http://www.nginxs.com/linux/450.html</link>
		<comments>http://www.nginxs.com/linux/450.html#comments</comments>
		<pubDate>Wed, 30 Mar 2011 06:18:27 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=450</guid>
		<description><![CDATA[博客关闭了有些日子了，经常来访的朋友不好意思了，由于本人刚刚到新公司，比较忙碌的原因，没有细心照料blog,所以VPS租用时间到期也没有去理会，现在的blog 服务器搬家美国了,相比访问速度会有点慢，我会精心优化的！]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/450.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>更新check_nginx插件</title>
		<link>http://www.nginxs.com/linux/441.html</link>
		<comments>http://www.nginxs.com/linux/441.html#comments</comments>
		<pubDate>Tue, 25 Jan 2011 04:24:02 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=441</guid>
		<description><![CDATA[<strong>新增功能：
增加 BasicAuth 认证功能，
去掉了显示：serveraccepts handled requests
只显示主要的: ActiveConn reading writing waiting
优化代码可以省去不需要的参数。</strong>

源码：
<pre># -*- coding: utf-8 -*-
#!/usr/bin/python
# check_nginx is a Nagios to monitor nginx statu
# my blog: http://www.nginxs.com
# The version is 1.0.1
# MSN: yangzi2008@126.com

import string
import urllib2
import getopt
import sys

def usage():
   print """check_nginx is a Nagios to monitor nginx status
   Usage:

   check_nginx [-h&#124;--help][-u&#124;--url][-p&#124;--path][-w&#124;--warning][-c&#124;--critical]

   Options:
          --help&#124;-h)</pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/441.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

