<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>WHO IS 2HEI?</title>
        <link>http://www.2hei.net/mt/</link>
        <description>on my way ... </description>
        <language>zh-cn</language>
        <copyright>Copyright 2008</copyright>
        <lastBuildDate>Wed, 12 Nov 2008 23:05:52 +0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>解决mysql Client does not support authentication 错误！</title>
            <description><![CDATA[今天遇到这样一个问题，mysql无法登陆，日志提示如下：<br />[Wed Nov 12 14:15:38 CST 2008][MysqlDb.connectDB]java.sql.SQLException: Client does not support authentication protocol requested by server; consider upgrading MySQL client<br /><br />搜了一下，好多人遇到此问题，大致是mysql版本不通造成的，以下是解决办法：<br />mysql&gt;UPDATE mysql.user SET Password = OLD_PASSWORD('yourpass') WHERE Host = 'localhost' AND User = 'username';<br />mysql&gt;FLUSH PRIVILEGES;<br /><br />这里是mysql官方的解释！<br /><a href="http://dev.mysql.com/doc/refman/5.0/en/old-client.html">http://dev.mysql.com/doc/refman/5.0/en/old-client.html</a><br /> ]]></description>
            <link>http://www.2hei.net/mt/2008/11/mysql-client-does-not-support.html</link>
            <guid>http://www.2hei.net/mt/2008/11/mysql-client-does-not-support.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">database</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">mysql</category>
            
            <pubDate>Wed, 12 Nov 2008 23:05:52 +0800</pubDate>
        </item>
        
        <item>
            <title>how to resove  --  kernel: mptbase: ioc0: LogInfo</title>
            <description><![CDATA[cat /var/log/messages<br />&nbsp;i meet such logs:<br />&nbsp;kernel: mptbase: ioc0: LogInfo(0x31120401): Originator={PL}, Code={Abort}, SubCode(0x0401)<br />&nbsp;<br />#modinfo mptbase<br />filename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib/modules/2.6.18-53.1.13.el5/kernel/drivers/message/fusion/mptbase.ko<br />version:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.04.04<br />license:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GPL<br />description:&nbsp;&nbsp;&nbsp; Fusion MPT base driver<br />author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LSI Logic Corporation<br />srcversion:&nbsp;&nbsp;&nbsp;&nbsp; DEE575D01207DC868D4D69B<br />depends:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />vermagic:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.6.18-53.1.13.el5 SMP mod_unload gcc-4.1<br />parm:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpt_msi_enable: MSI Support Enable (default=0) (int)<br />parm:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpt_channel_mapping: Mapping id's to channels (default=0) (int)<br /><br />#lsmod<br />Module&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size&nbsp; Used by<br />ipv6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 411425&nbsp; 16 <br />dm_mirror&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60105&nbsp; 0 <br />dm_mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 96017&nbsp; 1 dm_mirror<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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 160977&nbsp; 1 ata_piix<br />pcspkr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36289&nbsp; 0 <br />mptsas&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62545&nbsp; 6 <br />mptscsih&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56513&nbsp; 1 mptsas<br />mptbase&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 92640&nbsp; 2 mptsas,mptscsih<br />scsi_transport_sas&nbsp;&nbsp;&nbsp;&nbsp; 66753&nbsp; 1 mptsas<br />sd_mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56257&nbsp; 7 <br />scsi_mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 186361&nbsp; 6 sg,libata,mptsas,mptscsih,scsi_transport_sas,sd_mod<br />ext3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 166993&nbsp; 5 <br />jbd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 93873&nbsp; 1 ext3<br />ehci_hcd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65229&nbsp; 0 <br />ohci_hcd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 54493&nbsp; 0 <br />uhci_hcd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57433&nbsp; 0<br /><br />cat /proc/mdstat<br />Personalities : <br />unused devices: &lt;none&gt;<br /><br />google and google, no answer!<br />~ who can help me ? ~&nbsp; <br /><br />]]></description>
            <link>http://www.2hei.net/mt/2008/10/kernel-mptbase-ioc0-loginfo.html</link>
            <guid>http://www.2hei.net/mt/2008/10/kernel-mptbase-ioc0-loginfo.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">kernel</category>
            
            <pubDate>Fri, 31 Oct 2008 22:38:51 +0800</pubDate>
        </item>
        
        <item>
            <title>计算机网络基础视频教程-上海交大</title>
            <description><![CDATA[教程列表地址：<br /><a href="http://www.youku.com/playlist_show/id_2566735_ascending_1_page_1.html">http://www.youku.com/playlist_show/id_2566735_ascending_1_page_1.html</a><br /><br /><br /> 

下面是第26讲，ip协议
<embed src="http://player.youku.com/player.php/Type/Folder/Fid/2566735/Ob/1/Pt/26/sid/XNDk0OTc3NDQ=/v.swf" quality="high" allowscriptaccess="allways" mode="transparent" type="application/x-shockwave-flash" align="middle" width="480" height="400">]]></description>
            <link>http://www.2hei.net/mt/2008/10/sjtu-computer-network-video.html</link>
            <guid>http://www.2hei.net/mt/2008/10/sjtu-computer-network-video.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">compuer</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">network</category>
            
            <pubDate>Sun, 26 Oct 2008 23:04:31 +0800</pubDate>
        </item>
        
        <item>
            <title>php compile in 64bit Linux error</title>
            <description><![CDATA[I install php5.2.6 with apache2.x, I meet this error!<br /><br />Installing PHP SAPI module:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; apache2handler<br />/home/apache2/build/instdso.sh SH_LIBTOOL='/home/apache2/build/libtool' libphp5.la /home/apache2/modules<br />/home/apache2/build/libtool --mode=install cp libphp5.la /home/apache2/modules/<br />cp .libs/libphp5.lai /home/apache2/modules/libphp5.la<br />cp .libs/libphp5.a /home/apache2/modules/libphp5.a<br />chmod 644 /home/apache2/modules/libphp5.a<br />ranlib /home/apache2/modules/libphp5.a<br />libtool: install: warning: remember to run `libtool --finish /home/yujingtao/soft/php-5.2.6/libs'<br />Warning!&nbsp; dlname not found in /home/apache2/modules/libphp5.la.<br />Assuming installing a .so rather than a libtool archive.<br />chmod 755 /home/apache2/modules/libphp5.so<br />chmod: cannot access `/home/apache2/modules/libphp5.so': No such file or directory<br />apxs:Error: Command failed with rc=65536<br />.<br />make: *** [install-sapi] Error 1<br /><br />my configure script is below:<br />./configure --with-apxs2=/home/apache2/bin/apxs --with-mysql-sock=/tmp/mysql.sock LDFLAGS='-L/usr/lib64' <br /><br />google for a along time , still have this error, Can anybody help me??<br />]]></description>
            <link>http://www.2hei.net/mt/2008/10/php-compile-in-64bit-linux-err.html</link>
            <guid>http://www.2hei.net/mt/2008/10/php-compile-in-64bit-linux-err.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">php</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">php</category>
            
            <pubDate>Thu, 23 Oct 2008 23:32:52 +0800</pubDate>
        </item>
        
        <item>
            <title>遭遇 c000021a unknown hard error</title>
            <description><![CDATA[经过连续几天加班后，可怜的破本终于向我示威了，先是发烧，温度高达摄氏70多度，然后变得迟钝，糊涂起来，打开记事本都需要想上半天，而且听见硬盘灯狅闪、还伴随卡拉卡拉的声响，风扇就跟抽风机似的，那叫一个吵！<br />垃圾本也真是往死里折腾啊，今天早上终于挂掉了，开机后居然蓝屏，蔚蓝的屏幕看着真是让人轻松，只是那两行醒目的英文着实有些扎眼：&nbsp; <br />c000021a unknown hard error<br />凭借多年的经验，我断定重新启动一下应该可以恢复，试了几次，可惜都不管用！ Xp启动时的进度条闪过去后，还是迅速地转为蓝屏的，好喝的，充足的，我呸呸！<br />试过了安全模式居然也无法进入。。。<br />无语了<br /><br />去其他电脑google了一番，发现怎么解释的都有，不过都不靠谱、再说不靠谱的事也并不适合我，<br />回想起来最近的操作，最令我感到怀疑的就是昨晚勤劳勇敢的卡巴曾经提示有个dll文件是木马，问我是否删除，哎！想都没想就点击了删除。工作到深夜，合上本就睡了。<br /><br />早上，忙，很多事情堆到了一起，没有电脑，工作真是没法进行啊！<br />赶紧把破本还给了IT去检查，先借了一个更破的本本用先，可惜是个裸奔，嘛软件也木有，麻烦死了，我的n多环境的安装啊，不过也没有办法，凑合先用着吧。。<br /><br />中午过后，IT大哥下山，结果出炉，本本重装，C盘格掉，其他保留！<br /><br />不错的结果，我很满意！想想如果是硬盘挂掉，等着哭吧就。<br /><br />送各位一句金玉良言：卡巴虽好，也不尽可信，备份麻烦，真的重要啊！<br />]]></description>
            <link>http://www.2hei.net/mt/2008/10/c000021a-unknown-hard-error.html</link>
            <guid>http://www.2hei.net/mt/2008/10/c000021a-unknown-hard-error.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">c000021a</category>
            
            <pubDate>Thu, 16 Oct 2008 00:58:19 +0800</pubDate>
        </item>
        
        <item>
            <title>要比赛啦！</title>
            <description><![CDATA[<br />荒废了几年的足球，如今捡就算起来了，坚持了将近1个多月，<br />one week one time ！<br />但是踢球的感觉明显不一样了，位置明显靠后，<br />昔日的前锋到现在的后卫，甚至门将。。。<br />岁月的磨砺终于显示出它的力量，<br />每况愈下的体力成就了现在只能靠意识踢球的“懒人”。<br /><br />遥想当年皮肤黝黑、浑身臭汗的疯狂少年，<br />也曾是个整天天泡在在绿荫场，不知疲惫的小小球星；<br />那个当年龙江通信杯身披10号战袍的优秀年轻人，如今也已不再年轻，<br />对于足球的热爱或许只能通过品头论足来体现吧！<br /><br />如今，每周一次的足球运动对于我来讲是如此的难得，也是如此的珍惜，<br />现在不需要多么的表现自己的华丽脚法，<br />也无需一次次体验进球后的快感，<br />只要能够跑在那柔软的草坪上，<br />尽情享受足球的乐趣就是那么的让我心满意足！<br /><br />3年后，终于又可以踢上了大场，3年后也终于又参加正式的比赛，<br />兄弟，拿出激情来吧，<br />哪怕是只有疯狂的呐喊！<br />《<a href="http://baom.sina.com.cn/3/2008/0927/2179.html">第四届中国网络媒体足球精英赛</a>》必将留下俺闪耀的身影！<br />]]></description>
            <link>http://www.2hei.net/mt/2008/10/4th-network-football-match.html</link>
            <guid>http://www.2hei.net/mt/2008/10/4th-network-football-match.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">football</category>
            
            <pubDate>Tue, 14 Oct 2008 22:49:57 +0800</pubDate>
        </item>
        
        <item>
            <title>山寨机很好、很弓虽大，我服！</title>
            <description><![CDATA[<p>路上，一对情侣与俺对面坐</p>
<p>男小伙帅呆了，野人花园出来的，头发都立着；女娃子也真漂亮，一脸的青春还有些红豆豆！</p>
<p>亲亲我我，腻腻歪歪，眉来眼去的好不黏糊，令人好生羡慕啊！！</p>
<p>稍许，那兄弟掏出超级大手机，对着女人深情地说了一句：啊！哥们功能就是强！</p>
<p>我吃了一惊，心里暗暗赞许，这才是真爷们，有胆量、敢表白，众目睽睽之下居然如此这般、这般如此！</p>
<p>那手机也真是油品味，衰呆了、呕像！</p>
<p>手机闪着七彩的光芒，还伴随着美妙的音乐 --- 亲爱的，你慢慢飞，小心前面带刺的玫瑰！（让我想起了小品里说的，瞎啊！往刺上撞？）</p>
<p>那音响效果超赞，绝对立体声，如果再接个功放，那是相当有感觉，绝对可以达到院线效果。</p>
<p>我们一路走，丫的一路放，我的这个心啊，都碎了！</p>
<p>我无语，我崩溃，那些歌曲真的让我听的好累！</p>
<p>丫丫个呸的，这就是所谓的MTK！</p>
<p>这一路翻来覆去的《无所谓》整我直反胃！</p>
<p>终于到站，俺要下车了，机会终于来了，</p>
<p>憋了50分钟的我终于有了表达自己心意的机会了，</p>
<p>俺深情地望了一下这对神仙般摇头晃脑的鸳鸯，</p>
<p>还有那部超牛B的泛着神的光芒的山寨机，</p>
<p>我咬了咬嘴唇，浑身战栗着，</p>
<p>思绪万千，化作无言的泪水，</p>
<p>最后终于在汽车将近关门的一刹那，俺直挺挺、恶狠狠的抛出一句话：</p>
<p>大哥，你的山寨机很好，很弓虽大，哪儿买地？</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></description>
            <link>http://www.2hei.net/mt/2008/10/mtk-make-me-mad.html</link>
            <guid>http://www.2hei.net/mt/2008/10/mtk-make-me-mad.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">live</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">MTK</category>
            
            <pubDate>Tue, 07 Oct 2008 23:12:18 +0800</pubDate>
        </item>
        
        <item>
            <title>计算1970到今天的天数的shell脚本</title>
            <description><![CDATA[<p>#!/bin/bash<br />#得到1970年到今天的累计天数</p>
<p>get_day()<br />{<br />&nbsp; Begin_Year=1970<br />&nbsp; TO_Year=`date&nbsp;+%Y`<br />&nbsp; L=`expr&nbsp;$TO_Year - $Begin_Year`<br />&nbsp; To_Mon=`date +m%d`<br />&nbsp; To_day=`date +%j`<br />&nbsp; nu=1<br />&nbsp; all_day=0<br />&nbsp; while&nbsp;[ $nu -le $L ]<br />&nbsp; do<br />&nbsp;&nbsp;&nbsp; Y=`expr $Begin_Year + $nu`<br />&nbsp;&nbsp;&nbsp; is_runnian=`expr $Y \% 4`<br />&nbsp;&nbsp;&nbsp; if [ $is_runnian -eq 0 ]<br />&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; day_nu=366<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; day_nu=365<br />&nbsp;&nbsp;&nbsp; fi<br />&nbsp;&nbsp;&nbsp; nu=`expr $nu + 1`<br />&nbsp;&nbsp;&nbsp; all_day=`expr $all_day + $day_nu`<br />&nbsp; done<br />&nbsp; echo `expr $To_day + $all_day`<br />}</p>]]></description>
            <link>http://www.2hei.net/mt/2008/10/exec-1970-to-today-shell.html</link>
            <guid>http://www.2hei.net/mt/2008/10/exec-1970-to-today-shell.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">shell</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">shell</category>
            
            <pubDate>Tue, 07 Oct 2008 23:07:08 +0800</pubDate>
        </item>
        
        <item>
            <title>liba52在AMD64位机器下的编译问题</title>
            <description><![CDATA[<a href="http://liba52.sourceforge.net/">http://liba52.sourceforge.net/</a><br />http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz<br /><br />liba52 is a free library for decoding ATSC A/52 streams. It is released under the terms of the GPL license. <br />The A/52 standard is used in a variety of applications, including digital television and DVD. It is also known as AC-3.<br /><br />./configure <br />make<br />/usr/bin/ld: .libs/imdct.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC<br />.libs/imdct.o: could not read symbols: Bad value<br />collect2: ld returned 1 exit status<br />make[1]: *** [liba52.la] Error 1<br />make[1]: Leaving directory `/home/buynintw/src/a52dec-0.7.4/liba52'<br />make: *** [install-recursive] Error 1<br /><br />This trouble me for a week!!!<br />Finally I resolve it!<br /><br />Just do below:<br />./configure --prefix=/usr&nbsp; --enable-shared 'CFLAGS=-fPIC' <br />make &amp;&amp; make install<br /><br /> ]]></description>
            <link>http://www.2hei.net/mt/2008/09/liba52-compile-in-amd64.html</link>
            <guid>http://www.2hei.net/mt/2008/09/liba52-compile-in-amd64.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">liba52</category>
            
            <pubDate>Thu, 18 Sep 2008 00:43:18 +0800</pubDate>
        </item>
        
        <item>
            <title>nagios的check_ping使用</title>
            <description><![CDATA[nagios的一些辅助工具很有用处，如check_ping,check_tcp等等，这里介绍一下check_ping的用法：<br /><link href="BLOCKQUOTE%7Bmargin-Top:%200px;%20margin-Bottom:%200px;%20margin-Left:%202em%7D" rel="stylesheet"><div><br />nagios的check_ping命令：</div>
<div>源码可见 nagios插件： nagios-plugins-1.4.12/plugins/check_ping.c</div>
<div>&nbsp;</div>
<div>用法：</div>
<div>
<div>./check_ping&nbsp;</div>
<div>
<div>Usage:&nbsp;check_ping&nbsp;-H&nbsp;&lt;host_address&gt;&nbsp;-w&nbsp;&lt;wrta&gt;,&lt;wpl&gt;%&nbsp;-c&nbsp;&lt;crta&gt;,&lt;cpl&gt;%</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-p&nbsp;packets]&nbsp;[-t&nbsp;timeout]&nbsp;[-L]&nbsp;[-4|-6]</div></div>
<div>具体如下：</div>
<div>-H&nbsp;&nbsp;&nbsp; 主机地址</div>
<div>-w&nbsp;&nbsp;&nbsp;&nbsp;WARNING&nbsp;状态：&nbsp;&nbsp;响应时间(毫秒)，丢包率&nbsp;(%)&nbsp;&nbsp; 阀值</div>
<div>-c&nbsp;&nbsp;&nbsp;&nbsp;CRITICAL状态：&nbsp;&nbsp;&nbsp; 响应时间(毫秒)，丢包率&nbsp;(%)&nbsp;&nbsp; 阀值</div>
<div>-p&nbsp;&nbsp;&nbsp;&nbsp;发送的包数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 默认5个包</div>
<div>-t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;超时时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 默认10秒</div>
<div>-4|-6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用ipv4|ipv6&nbsp;地址&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;默认ipv4</div>
<div>&nbsp;</div>
<div></div>
<div>如：</div>
<div>1、正常：</div>
<div></div>
<div>./check_ping&nbsp;-H www.google.com -w&nbsp;100.0,20%&nbsp;-c&nbsp;200.0,50%&nbsp;-p&nbsp;3&nbsp;-t&nbsp;2</div></div>
<div>PING&nbsp;OK&nbsp;-&nbsp;Packet&nbsp;loss&nbsp;=&nbsp;0%,&nbsp;RTA&nbsp;=&nbsp;1.49&nbsp;ms </div>
<div>命令执行结果返回：&nbsp;echo $?&nbsp;&nbsp; 为 0</div>
<div>2、WARNING&nbsp;：</div>
<div>
<div>./check_ping&nbsp;-H www.google.com -w&nbsp;0.1,20%&nbsp;-c&nbsp;200.0,50%&nbsp;-p&nbsp;3&nbsp;-t&nbsp;2</div></div>
<div>PING&nbsp;WARNING&nbsp;-&nbsp;Packet&nbsp;loss&nbsp;=&nbsp;0%,&nbsp;RTA&nbsp;=&nbsp;1.71&nbsp;ms </div>
<div>命令执行结果返回：&nbsp;echo $?&nbsp;&nbsp; 为 1</div>
<div>3、CRITICAL</div>
<div>./check_ping&nbsp;-H www.google.com -w&nbsp;0.1,20%&nbsp;-c&nbsp;0.9,50%&nbsp;-p&nbsp;3&nbsp;-t&nbsp;2</div>
<div>PING&nbsp;CRITICAL&nbsp;-&nbsp;Packet&nbsp;loss&nbsp;=&nbsp;0%,&nbsp;RTA&nbsp;=&nbsp;1.60&nbsp;ms </div>
<div>命令执行结果返回：&nbsp;echo $?&nbsp;&nbsp; 为 2</div>
<div>&nbsp;</div>
<div>返回结果为：状态&nbsp; 丢包率 ping响应时间</div>
<div>因为check_ping的返回值非常清晰，<br />可以在其他程序中调用check_ping命令，作为辅助的网络检测工具。</div> ]]></description>
            <link>http://www.2hei.net/mt/2008/09/nagios-check-ping-use.html</link>
            <guid>http://www.2hei.net/mt/2008/09/nagios-check-ping-use.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">nagios</category>
            
            <pubDate>Wed, 17 Sep 2008 22:17:29 +0800</pubDate>
        </item>
        
        <item>
            <title>Seattle Conference on Scalability: YouTube Scalability</title>
            <description><![CDATA[YouTube 的架构扩展：
http://kylecordes.com/2007/07/12/youtube-scalability/

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ZW5_eEKEC28&amp;hl=en&amp;fs=1" /><param name="allowFullScreen" value="true" /><embed src="http://www.youtube.com/v/ZW5_eEKEC28&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></object>]]></description>
            <link>http://www.2hei.net/mt/2008/09/seattle-conference-on-scalability.html</link>
            <guid>http://www.2hei.net/mt/2008/09/seattle-conference-on-scalability.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">python</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">youtube</category>
            
            <pubDate>Tue, 02 Sep 2008 23:21:29 +0800</pubDate>
        </item>
        
        <item>
            <title>python socket exception</title>
            <description><![CDATA[<br />python socket.errorTab's error List<br /><br />{<br />10048: 'The network address is in use.', <br />10054: 'The connection has been reset.', <br />10022: 'An invalid operation was attempted.', <br />10058: 'The network has been shut down.', <br />10060: 'The operation timed out.', <br />10061: 'Connection refused.', <br />10063: 'The name is too long.', <br />10064: 'The host is down.', <br />10065: 'The host is unreachable.', <br />10035: 'The socket operation would block', <br />10004: 'The operation was interrupted.', <br />10036: 'A blocking operation is already in progress.', <br />10009: 'A bad file handle was passed.', <br />10013: 'Permission denied.', <br />10014: 'A fault occurred on the network??'<br />}<br />]]></description>
            <link>http://www.2hei.net/mt/2008/09/python-socket-exception.html</link>
            <guid>http://www.2hei.net/mt/2008/09/python-socket-exception.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">python</category>
            
            <pubDate>Mon, 01 Sep 2008 22:53:43 +0800</pubDate>
        </item>
        
        <item>
            <title>java调用awt做图片验证码显示的问题解决</title>
            <description><![CDATA[错误症状：<br /><br />500 Servlet Exception<br />java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0'<br />as the value of the DISPLAY variable.<br />&nbsp;&nbsp;&nbsp; at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)<br />&nbsp;&nbsp;&nbsp; at sun.awt.X11GraphicsEnvironment.&lt;clinit&gt;(X11GraphicsEnvironment.java:134)<br />&nbsp;&nbsp;&nbsp; at java.lang.Class.forName0(Native Method)<br />&nbsp;&nbsp;&nbsp; at java.lang.Class.forName(Class.java:141)<br />&nbsp;&nbsp;&nbsp; at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)<br />&nbsp;&nbsp;&nbsp; at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)<br />&nbsp;&nbsp;&nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)<br />&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:534)<br /><br />google了半天，试过了安装xorg-x11-Xvfb包，export DISPLAY=:0等等，无奈，没有解决。<br />最后终于找到了解决方案：<br />可以在java的jvm上 加入参数&nbsp;&nbsp; –Djava.awt.headless=true<br /><br /> ]]></description>
            <link>http://www.2hei.net/mt/2008/08/java-awt-display.html</link>
            <guid>http://www.2hei.net/mt/2008/08/java-awt-display.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">java</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">jvm</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">X11</category>
            
            <pubDate>Mon, 25 Aug 2008 21:40:13 +0800</pubDate>
        </item>
        
        <item>
            <title>mysql OLD_PASSWORD&apos;s problem</title>
            <description><![CDATA[In my mysql slave and master's <br />i meet a problem:<br />[MysqlDb.connectDB]java.sql.SQLException: Client does not support authentication protocol requested by server; consider upgrading MySQL client<br /><br />this is a problem of mysql update version 4.1 and more!<br /><br />to sovle it , we can do this<br /><br />1st:<br />mysql&gt; SET PASSWORD FOR<br />&nbsp;&nbsp;&nbsp; -&gt; 'some_user'@'some_host' = OLD_PASSWORD('newpwd');<br />2nd:<br />mysql&gt; UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')<br />&nbsp;&nbsp;&nbsp; -&gt; WHERE Host = 'some_host' AND User = 'some_user';<br />mysql&gt; FLUSH PRIVILEGES;<br /> ]]></description>
            <link>http://www.2hei.net/mt/2008/08/mysql-old-passwords-problem.html</link>
            <guid>http://www.2hei.net/mt/2008/08/mysql-old-passwords-problem.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">database</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">mysql</category>
            
            <pubDate>Mon, 25 Aug 2008 21:36:41 +0800</pubDate>
        </item>
        
        <item>
            <title>learn shell check_tcpconn.sh from nagios</title>
            <description><![CDATA[#check_tcpconn.sh<br /># warning value<br />W=1500<br /># critical value<br />C=2190<br />if [ -f /proc/net/tcp6 ]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP_FILE6="/proc/net/tcp6"<br />fi<br />if [ -f /proc/net/tcp ]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP_FILE="/proc/net/tcp"<br />fi<br />cat $TCP_FILE6 $TCP_FILE &gt; /tmp/tcpstat<br />awk -v TOTAL_W="$W" -v TOTAL_C="$C" 'BEGIN{ ESTABLISHED=TIME_WAIT=SYN_RECV=TOTAL=0}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {if($4 ~/01/) {ESTABLISHED++ ; TOTAL++} else if($4 ~/06/) {TIME_WAIT++; TOTAL++} else if($4 ~/03/) {SYN_RECV++; TOTA<br />L++} else TOTAL++ }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (TOTAL &lt; TOTAL_W)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {printf "OK CONN %s ESTABLISHED&nbsp; %s TIME_WAIT&nbsp; %s SYN_RECV&nbsp; %s&nbsp; TOTAL|CONN,%s,%s,%s,%s;",ESTABLISHED,TIME_WA<br />IT,SYN_RECV,TOTAL,ESTABLISHED,TIME_WAIT,SYN_RECV,TOTAL ; exit 0}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (TOTAL &lt; TOTAL_C)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {printf "WARNING CONN %s ESTABLISHED&nbsp; %s TIME_WAIT&nbsp; %s SYN_RECV&nbsp; %s&nbsp; TOTAL|CONN,%s,%s,%s,%s;",ESTABLISHED,TI<br />ME_WAIT,SYN_RECV,TOTAL,ESTABLISHED,TIME_WAIT,SYN_RECV,TOTAL ; exit 0}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {printf "CRITICAL CONN %s ESTABLISHED&nbsp; %s TIME_WAIT&nbsp; %s SYN_RECV&nbsp; %s&nbsp; TOTAL|CONN,%s,%s,%s,%s;",ESTABLISHED,T<br />IME_WAIT,SYN_RECV,TOTAL,ESTABLISHED,TIME_WAIT,SYN_RECV,TOTAL ; exit 0}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }' /tmp/tcpstat<br /><br />this script check&nbsp; /proc/net/tcp , u can find tcp connect status&nbsp; .<br /><br />cat /proc/net/tcp<br />enum {<br />&nbsp; TCPF_ESTABLISHED = (1 &lt;&lt; 1),<br />&nbsp; TCPF_SYN_SENT&nbsp; = (1 &lt;&lt; 2),<br />&nbsp; TCPF_SYN_RECV&nbsp; = (1 &lt;&lt; 3),<br />&nbsp; TCPF_FIN_WAIT1 = (1 &lt;&lt; 4),<br />&nbsp; TCPF_FIN_WAIT2 = (1 &lt;&lt; 5),<br />&nbsp; TCPF_TIME_WAIT = (1 &lt;&lt; 6),<br />&nbsp; TCPF_CLOSE&nbsp;&nbsp;&nbsp;&nbsp; = (1 &lt;&lt; 7),<br />&nbsp; TCPF_CLOSE_WAIT = (1 &lt;&lt; 8),<br />&nbsp; TCPF_LAST_ACK&nbsp; = (1 &lt;&lt; 9),<br />&nbsp; TCPF_LISTEN&nbsp;&nbsp;&nbsp; = (1 &lt;&lt; 10),A<br />&nbsp; TCPF_CLOSING&nbsp;&nbsp; = (1 &lt;&lt; 11),B<br />};<br /> ]]></description>
            <link>http://www.2hei.net/mt/2008/08/learn-shell-check-tcpconnsh-fr.html</link>
            <guid>http://www.2hei.net/mt/2008/08/learn-shell-check-tcpconnsh-fr.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">nagios</category>
            
            <pubDate>Mon, 25 Aug 2008 21:31:15 +0800</pubDate>
        </item>
        
    </channel>
</rss>
