<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[linuxの飘扬]]></title> 
<link>https://www.linuxfly.org/index.php</link> 
<description><![CDATA[Power by www.linuxfly.org]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[linuxの飘扬]]></copyright>
<item>
<link>https://www.linuxfly.org/post/565/</link>
<title><![CDATA[[转]用xinetd实现小型网络服务]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Thu, 30 Sep 2010 04:13:57 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/565/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp; linux 里带了一个 xinetd ，可以用来很方便地实现一些小型的网络服务。处理网络链接，fork 子进程等等都交给它来办，而我们自己只需要操作标准输入输出的程序就可以了。<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/php/" rel="tag">php</a> , <a href="https://www.linuxfly.org/tags/xinetd/" rel="tag">xinetd</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/347/</link>
<title><![CDATA[[原]流量监控脚本 v1.3]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Mon, 23 Mar 2009 07:54:24 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/347/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v1.2版的脚本已经实现了通过Web网页监控流量的功能，可惜受root权限的影响，没有达到实时的效果，也就是显示我访问Web网页所在一刻的流量。要解决这问题，就需要<span style="color: #FF0000;">在Web页面上可调用iptables命令</span>。幸亏通过这两天的测试，我已经实现了让apache可执行本地及远程需root权限的命令。OK，既然前提条件都解决了，脚本的编写就简单了。<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/iptables/" rel="tag">iptables</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/342/</link>
<title><![CDATA[[原]流量监控脚本 v1.2]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Wed, 18 Mar 2009 02:59:00 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/342/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;从功能的角度来说，ipflow.pl和banip.sh已经基本满足我的要求。但使用中，还有个问题：每次查看想查看网络流量时，都必须登陆到路由网关服务器上运行ipflow.pl脚本，太麻烦了。所以，接下来我要做的，就是把输出结果进行格式化，显示为HTML样式。这样，我只要通过浏览器就能知道大概的网络流量。（为什么是大概呢？因为结果并不是实时的，而是对上一次crontab运行的时间段的结果）<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/iptables/" rel="tag">iptables</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/341/</link>
<title><![CDATA[[原]流量监控脚本 v1.1]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Tue, 17 Mar 2009 07:14:57 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/341/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;昨天，介绍了如何在网关上利用iptables实现监控各客户端IP流量的原理，并且提供了一个简单的监控脚本。今天，我继续修改完善该脚本，工作的目标是：希望可定时运行该脚本，当发现超出限定流量的客户端时，暂时终止其IP。<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/iptables/" rel="tag">iptables</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/340/</link>
<title><![CDATA[[原]在Linux路由网关下查看客户端IP的实际流量]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Mon, 16 Mar 2009 02:31:24 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/340/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;相信不少朋友都知道，使用Linux搭建路由网关，提供nat上网服务是非常简单的事情，而且性能也不错。但现在p2p的工具很多，有时候带宽会被这些工具在无意中就占满了（例如：使用迅雷、BT下载等）。这时候，总希望看看到底是谁在占用带宽。这样的工具有很多，如ntop、bandwidthd、iftop、IPTraf、MRTG等等，它们也提供了非常方便的图形监控界面，操作也非常简单。可惜，它们都有一些缺点，像实时性不够、IP流量分散、需要使用Web来查看等，恰好这些就是好我需要的。<br/>&nbsp;&nbsp;&nbsp;&nbsp;为此，我<span style="color: #FF0000;">利用iptables的统计功能</span>，编写了一个小脚本来实现要求。（原想用Perl的Net::Pcap模块的对数据包解码统计的，但既然有现成的，为什么不用呢？）O(∩_∩)O哈哈~<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/iptables/" rel="tag">iptables</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/281/</link>
<title><![CDATA[[原]自动执行注册红旗 HA License的脚本]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Fri, 26 Dec 2008 10:12:03 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/281/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;红旗 HA安装时使用测试 License，在安装完毕后，需根据机器信息注册正式 License。其过程虽然简单，但输入内容较多，容易出错。故用expect写了一个简单的脚本协助。<br/><br/>用法：<br/><br/><div class="code">./registerHA_v0.2.sh &#91;正式序列号文件&#93;</div><br/>其中，正式序列号文件在申请后，由红旗提供，一般是一个.txt的文本文件。如果不输入该选项，默认使用当前目录下的<span style="color: #FF0000;">License.txt</span>作为序列号文件。<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/scripts/" rel="tag">scripts</a> , <a href="https://www.linuxfly.org/tags/bash/" rel="tag">bash</a> , <a href="https://www.linuxfly.org/tags/ha/" rel="tag">ha</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/232/</link>
<title><![CDATA[[原]寻找未创建为PV的硬件设备]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Sat, 14 Jun 2008 07:59:54 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/232/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;在使用lvm的系统中，首先需要把物理设别创建为PV，然后才能组成VG及创建LV逻辑盘。对于盘符不多的情况下，这通常不是问题，只要一一对应寻找即可。但这次在一个项目中，遇到的情况是：<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">有三个系统共享一个盘柜，盘柜中划分了约30个LUN映射到系统中。由于不同系统连接到盘柜的路径不同，导致同一个LUN设备，在不同系统上其设备号并不相同。例如：在A系统上是/dev/sdx，而在B系统上则是/dev/sdy。</div></div><br/>&nbsp;&nbsp;&nbsp;&nbsp;这样，万一我需要在原有的系统上增加PV，需逐一手动匹配物理设备，并且不同系统上还需要匹配多次，相当麻烦。所以，我写了下面的脚本协助寻找那些仍未创建为PV的设备。<br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/lvm/" rel="tag">lvm</a> , <a href="https://www.linuxfly.org/tags/qla2300/" rel="tag">qla2300</a>
]]>
</description>
</item><item>
<link>https://www.linuxfly.org/post/140/</link>
<title><![CDATA[[原]整合红旗CD安装光盘为DVD光盘的脚本]]></title> 
<author>linuxing &lt;emos#linuxfly.org&gt;</author>
<category><![CDATA[示例]]></category>
<pubDate>Mon, 16 Jul 2007 07:49:28 +0000</pubDate> 
<guid>https://www.linuxfly.org/post/140/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;花费了几天的时间，写了一个把红旗CD安装光盘整合成DVD光盘的脚本。顺便也复习了一次bash脚本的知识。理论部分的介绍，请参考前面的几篇日志，这里就不详细说明了。<br/><strong><span style="color: #4169E1;">一、参数使用</span></strong><br/>&nbsp;&nbsp;&nbsp;&nbsp;脚本以红旗DC 5.0 for x86 sp2为范例进行编写。而考虑到兼容过去和其他的版本，也加入了一下简单的参数，命令：<br/>usage: <br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">dvdtogether.sh [-a x86&#124;x86_64] [-c copy&#124;release] [-v dc4.1&#124;dc5.0]&nbsp;&nbsp;SOURCEPATH TARGETPATH</div></div><br/>参数：<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">-a 可选择两个架构： x86;x86_64<br/>-v 可选择操作系统的版本： dc4.1;dc5.0<br/>-c 决定对工具盘是拷贝还是一同释放到安装光盘中： copy;release<br/><span style="color: #FF4500;">（释放后，就不需要单独安装工具光盘了）</span><br/>-i 定义iso的名称，例如：<br/>&nbsp;&nbsp; 假设RedFlag DC 5.0 for x86&#039;s CD盘名称为：redflag-dc5.0-sp2-x86-release-disc&#123;1234&#125;.iso<br/>&nbsp;&nbsp; 那么，可使用参数： -i redflag-dc5.0-sp2-x86-release<br/><span style="color: #FF4500;">（这主要是为了兼容更多的iso，请注意写法，不要写错）</span><br/>-p 定义patch的版本，例如：sp2<br/>-h 帮助信息<br/>SOURCEPATH 定义原CD安装盘的iso路径<br/>TARGETPATH 定义生成DVD的存放路径</div></div><br/>............<br/><br/>Tags - <a href="https://www.linuxfly.org/tags/install/" rel="tag">install</a> , <a href="https://www.linuxfly.org/tags/script/" rel="tag">script</a>
]]>
</description>
</item>
</channel>
</rss>