<?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>vivaz.net</title>
	<atom:link href="http://vivaz.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://vivaz.net</link>
	<description>Ride Like The Wind</description>
	<lastBuildDate>Wed, 10 Mar 2010 08:18:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>a logrotate scripts</title>
		<link>http://vivaz.net/2010/03/a-logrotate-scripts/</link>
		<comments>http://vivaz.net/2010/03/a-logrotate-scripts/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 08:18:12 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[#Linux]]></category>
		<category><![CDATA[#Shell]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=210</guid>
		<description><![CDATA[logrotate.sh 
#!/bin/bash
cd `dirname $0`
d=`date +%Y%m%d`
d7=`date -d'7 day ago' +%Y%m%d`
cp tu.log tu.log.${d}
echo "" > tu.log
rm -rf tu.log.${d7}
dirname $0 是代表脚本所在目录
]]></description>
			<content:encoded><![CDATA[<p>logrotate.sh </p>
<blockquote><p>#!/bin/bash</p>
<p>cd `dirname $0`<br />
d=`date +%Y%m%d`<br />
d7=`date -d'7 day ago' +%Y%m%d`</p>
<p>cp tu.log tu.log.${d}<br />
echo "" > tu.log<br />
rm -rf tu.log.${d7}</p></blockquote>
<p>dirname $0 是代表脚本所在目录</p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2010/03/a-logrotate-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use cacti monitor http online users</title>
		<link>http://vivaz.net/2010/03/use-cacti-monitor-http-online-users/</link>
		<comments>http://vivaz.net/2010/03/use-cacti-monitor-http-online-users/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 08:06:43 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[#Linux]]></category>
		<category><![CDATA[cacti]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=204</guid>
		<description><![CDATA[1.vi /etc/snmp/snmpd.conf, add scripts
extend .1.3.6.1.4.1.2021.50 tuhttp /bin/bash /opt/httpd2/conf/tuhttp.sh
2.vi tuhttp.sh
#!/bin/bash
num=$(ps -e &#124;grep http&#124;grep -v grep&#124;grep -v jkhttp&#124;wc -l)
#num=$(grep "ONLINE USERS=" /opt/photo/log/tu.log &#124; sed '$!d' &#124; sed 's/\(.*\)USERS=\([0-9]*\)$/\2/')
echo $num
echo OK

ps: tu.log is my system log, ignore
3.reload snmpd
/etc/init.d/snmpd reload
4.check snmp info
snmpwalk -v 2c 10.30.0.22 -c public .1.3.6.1.4.1.2021.50
display:
UCD-SNMP-MIB::ucdavis.50.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.50.2.1.2.6.116.117.104.116.116.112 = STRING: "/bin/bash"
UCD-SNMP-MIB::ucdavis.50.2.1.3.6.116.117.104.116.116.112 = STRING: "/opt/httpd2/conf/tuhttp.sh"
UCD-SNMP-MIB::ucdavis.50.2.1.4.6.116.117.104.116.116.112 = ""
UCD-SNMP-MIB::ucdavis.50.2.1.5.6.116.117.104.116.116.112 [...]]]></description>
			<content:encoded><![CDATA[<p>1.vi /etc/snmp/snmpd.conf, add scripts</p>
<blockquote><p>extend .1.3.6.1.4.1.2021.50 tuhttp /bin/bash /opt/httpd2/conf/tuhttp.sh</p></blockquote>
<p>2.vi tuhttp.sh</p>
<blockquote><p>#!/bin/bash<br />
num=$(ps -e |grep http|grep -v grep|grep -v jkhttp|wc -l)<br />
#num=$(grep "ONLINE USERS=" /opt/photo/log/tu.log | sed '$!d' | sed 's/\(.*\)USERS=\([0-9]*\)$/\2/')<br />
echo $num<br />
echo OK
</p></blockquote>
<p>ps: tu.log is my system log, ignore</p>
<p>3.reload snmpd</p>
<blockquote><p>/etc/init.d/snmpd reload</p></blockquote>
<p>4.check snmp info</p>
<blockquote><p>snmpwalk -v 2c 10.30.0.22 -c public .1.3.6.1.4.1.2021.50</p></blockquote>
<p>display:</p>
<blockquote><p>UCD-SNMP-MIB::ucdavis.50.1.0 = INTEGER: 1<br />
UCD-SNMP-MIB::ucdavis.50.2.1.2.6.116.117.104.116.116.112 = STRING: "/bin/bash"<br />
UCD-SNMP-MIB::ucdavis.50.2.1.3.6.116.117.104.116.116.112 = STRING: "/opt/httpd2/conf/tuhttp.sh"<br />
UCD-SNMP-MIB::ucdavis.50.2.1.4.6.116.117.104.116.116.112 = ""<br />
UCD-SNMP-MIB::ucdavis.50.2.1.5.6.116.117.104.116.116.112 = INTEGER: 5<br />
UCD-SNMP-MIB::ucdavis.50.2.1.6.6.116.117.104.116.116.112 = INTEGER: 1<br />
UCD-SNMP-MIB::ucdavis.50.2.1.7.6.116.117.104.116.116.112 = INTEGER: 1<br />
UCD-SNMP-MIB::ucdavis.50.2.1.20.6.116.117.104.116.116.112 = INTEGER: 4<br />
UCD-SNMP-MIB::ucdavis.50.2.1.21.6.116.117.104.116.116.112 = INTEGER: 1<br />
UCD-SNMP-MIB::ucdavis.50.3.1.1.6.116.117.104.116.116.112 = STRING: "3"<br />
UCD-SNMP-MIB::ucdavis.50.3.1.2.6.116.117.104.116.116.112 = STRING: "3<br />
OK"<br />
UCD-SNMP-MIB::ucdavis.50.3.1.3.6.116.117.104.116.116.112 = INTEGER: 2<br />
UCD-SNMP-MIB::ucdavis.50.3.1.4.6.116.117.104.116.116.112 = INTEGER: 0<br />
UCD-SNMP-MIB::ucdavis.50.4.1.2.6.116.117.104.116.116.112.1 = STRING: "3"<br />
UCD-SNMP-MIB::ucdavis.50.4.1.2.6.116.117.104.116.116.112.2 = STRING: "OK"</p></blockquote>
<p>ps:we need <strong>.1.3.6.1.4.1.2021.50.3.1.1.6.116.117.104.116.116.112</strong></p>
<p>5.add cacti data templates<br />
Console -> Data Templates<br />
<a href="http://www.flickr.com/photos/nikogoo/4421329117/" title="data_templates by vivaz.net, on Flickr"><img src="http://farm5.static.flickr.com/4043/4421329117_3b8714ea50_b.jpg" width="413" height="1024" alt="data_templates" /></a></p>
<p>6.add cacti graph templates<br />
Console -> Graph Templates<br />
<a href="http://www.flickr.com/photos/nikogoo/4422095004/" title="graph_templates by vivaz.net, on Flickr"><img src="http://farm3.static.flickr.com/2744/4422095004_bd4121d128_o.png" width="570" height="1081" alt="graph_templates" /></a></p>
<p>7.add these templates to host<br />
Console -> Devices -> Create Graphs for this Host</p>
<p>8.All Done<br />
<a href="http://www.flickr.com/photos/nikogoo/4422107820/" title="cacti_httpnum by vivaz.net, on Flickr"><img src="http://farm5.static.flickr.com/4067/4422107820_851148246a.jpg" width="500" height="182" alt="cacti_httpnum" /></a></p>
<p>refer: http://bbs.linuxtone.org/thread-1372-1-1.html</p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2010/03/use-cacti-monitor-http-online-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Memcached + Php extension at Centos5.2 x64</title>
		<link>http://vivaz.net/2010/02/compile-memcached-php-extension-at-centos5-2-x64/</link>
		<comments>http://vivaz.net/2010/02/compile-memcached-php-extension-at-centos5-2-x64/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 10:24:10 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[#Linux]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=194</guid>
		<description><![CDATA[1.get source
wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz

2.compile libevent
tar -zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure
make
make install
3.compile memcached
tar -zxvf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure --prefix=/opt/memcached --with-libevent
make
make install
4.start memcached
cd /opt/memcached/bin
./memcached -d -m 256 -p 11211 -u root  // -d daemon, -m ram, -p port default is 11211, -u user
if your os is 64bit maybe get a error "cant find libevent" try this
在 64bit 系统启动，会报找不到 libenent，可以如下操作
cp -R [...]]]></description>
			<content:encoded><![CDATA[<p>1.get source</p>
<blockquote><p>wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz<br />
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
</p></blockquote>
<p>2.compile libevent</p>
<blockquote><p>tar -zxvf libevent-1.4.13-stable.tar.gz<br />
cd libevent-1.4.13-stable<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>3.compile memcached</p>
<blockquote><p>tar -zxvf memcached-1.4.4.tar.gz<br />
cd memcached-1.4.4<br />
./configure --prefix=/opt/memcached --with-libevent<br />
make<br />
make install</p></blockquote>
<p>4.start memcached</p>
<blockquote><p>cd /opt/memcached/bin<br />
./memcached -d -m 256 -p 11211 -u root  // -d daemon, -m ram, -p port default is 11211, -u user<br />
if your os is 64bit maybe get a error "cant find libevent" try this<br />
在 64bit 系统启动，会报找不到 libenent，可以如下操作<br />
cp -R /usr/local/lib/libevent* /usr/lib64/
</p></blockquote>
<p>5.php memcache ext</p>
<blockquote><p>wget http://pecl.php.net/get/memcache-2.2.4.tgz<br />
cd memcache-2.2.4<br />
whereis php-config<br />
whereis phpize<br />
phpize &#038;& ./configure --enable-memcache --with-php-config=/usr/local/bin/php-config<br />
make<br />
make test<br />
make install</p></blockquote>
<p>vi /usr/local/lib/php.ini</p>
<blockquote><p>extension_dir = "/usr/local/lib/php/extensions/no-debug-zts-20060613/"<br />
extension = "memcache.so"</p></blockquote>
<p>6.monitor memcached</p>
<blockquote><p>wget http://livebookmark.net/memcachephp/memcachephp.zip<br />
put memcache.php file to wwwroot</p></blockquote>
<p>vi memcache.php</p>
<blockquote><p>define('ADMIN_USERNAME','user');       // Admin Username<br />
define('ADMIN_PASSWORD','pass');        // Admin Password<br />
$MEMCACHE_SERVERS[] = 'yourMemCachedHost:11211'; // add more as an array</p></blockquote>
<p>http://host.com/memcache.php</p>
<p><a href="http://www.flickr.com/photos/nikogoo/4350358489/" title="memcache.php by vivaz.net, on Flickr"><img src="http://farm3.static.flickr.com/2753/4350358489_d810679d2b.jpg" width="500" height="250" alt="memcache.php" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2010/02/compile-memcached-php-extension-at-centos5-2-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FF13全英文奖杯对照及获得方法</title>
		<link>http://vivaz.net/2010/01/ff13%e5%85%a8%e8%8b%b1%e6%96%87%e5%a5%96%e6%9d%af%e5%af%b9%e7%85%a7%e5%8f%8a%e8%8e%b7%e5%be%97%e6%96%b9%e6%b3%95/</link>
		<comments>http://vivaz.net/2010/01/ff13%e5%85%a8%e8%8b%b1%e6%96%87%e5%a5%96%e6%9d%af%e5%af%b9%e7%85%a7%e5%8f%8a%e8%8e%b7%e5%be%97%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 02:53:08 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Game]]></category>
		<category><![CDATA[FF13]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=192</guid>
		<description><![CDATA[       http://bbs.a9vg.com/read.php?tid=1380341&#038;fpage=1
奖杯类别      奖杯描述      获得方法
     白金      Ultimate      所有奖杯全部获得
     铜      Instruments of Fate      [...]]]></description>
			<content:encoded><![CDATA[<p> <img src='http://vivaz.net/wp-includes/images/smilies/ico2.gif' alt=':2:' class='wp-smiley' />  <img src='http://vivaz.net/wp-includes/images/smilies/ico2.gif' alt=':2:' class='wp-smiley' />  <img src='http://vivaz.net/wp-includes/images/smilies/ico2.gif' alt=':2:' class='wp-smiley' />  http://bbs.a9vg.com/read.php?tid=1380341&#038;fpage=1</p>
<p>奖杯类别      奖杯描述      获得方法<br />
     白金      Ultimate      所有奖杯全部获得<br />
     铜      Instruments of Fate                 序章剧情后获得<br />
     铜      Instruments of Dissent      第2章剧情后获得<br />
     铜      Instruments of Tragedy      第3章剧情后获得<br />
     铜      Instruments of Flight      第4章剧情后获得<br />
     铜      Instruments of Vengeance      第5章剧情后获得<br />
     铜      Instruments of Survival      第6章剧情后获得<br />
     铜      Instruments of Rebellion      第7章剧情后获得<br />
     铜      Instruments of Shame      第8章剧情后获得<br />
     铜      Instruments of Wrath      第9章剧情后获得<br />
     铜      Instruments of Truth      第10章剧情后获得<br />
     铜      Instruments of Hope      第11章剧情后获得<br />
     银      Instruments of Faith      第12章剧情后获得<br />
     金      Instruments of Change      游戏通关<br />
     铜      Pulsian Pioneer      行走10000步以上，机器人パクティ修理完了之后与机器人对话<br />
     铜      Gysahl Wreath      用陆行鸟挖到リボン<br />
     铜      Kelger’s Cup      完成全部难易度为D(1～5)的冥碑任务<br />
     铜      Xezat’s Chalice      完成全部难易度为C(6～15、18～22、28、35～37、39、56～57)的冥碑任务<br />
     银      Exorcist      完成第64个冥碑任务<br />
     银      Floraphobe      完成第54个冥碑任务<br />
     银      Natural Selector      完成全部泰坦试炼<br />
     银      Dorgann’s      难易度为B的任务全部完成<br />
     银      Galuf’s Grail      完成全部64个冥碑任务<br />
     金      L’Cie Paragon      64个冥碑任务全部取得5星评价<br />
     铜      Commando’s Seal      Attacker等级达到5级<br />
     铜      Ravager’s Seal      Blaster等级达到5级<br />
     铜      Sentinel’s Seal      defencer等级达到5级<br />
     铜      Saboteur’s Seal      Jammer等级达到5级<br />
     铜      Synergist’s Seal      Enhancer等级达到5级<br />
     铜      Medic’s Seal      Healler等级达到5级<br />
     银      Limit Breaker      给予敌人单击伤害达到100000以上<br />
     银      Adamant Will      完成编号为56～62的冥碑任务后，将出现在大平原的ロングイ(龙龟)击倒<br />
     银      Master’s Seal      将Lv10的水晶盘全部填满<br />
     金      Treasure Hunter      全部武器(102种)与饰品(119种)取得过一次后与机器人パクティ对话<br />
     金      Loremaster      完全获得100种敌人的情报<br />
     金      Superstar      最终决战得到5星评价 </p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2010/01/ff13%e5%85%a8%e8%8b%b1%e6%96%87%e5%a5%96%e6%9d%af%e5%af%b9%e7%85%a7%e5%8f%8a%e8%8e%b7%e5%be%97%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Xmas Gift</title>
		<link>http://vivaz.net/2009/12/my-xmas-gift/</link>
		<comments>http://vivaz.net/2009/12/my-xmas-gift/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 15:56:37 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Normal]]></category>

		<guid isPermaLink="false">http://vivaz.net/2009/12/my-xmas-gift/</guid>
		<description><![CDATA[


xmas_gift, originally uploaded by nikogoo.

]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/nikogoo/4209090460/" title="photo sharing"><img src="http://farm5.static.flickr.com/4034/4209090460_d35da437de.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/nikogoo/4209090460/">xmas_gift</a>, originally uploaded by <a href="http://www.flickr.com/people/nikogoo/">nikogoo</a>.</span>
</div></p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/12/my-xmas-gift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kinder</title>
		<link>http://vivaz.net/2009/12/kinder/</link>
		<comments>http://vivaz.net/2009/12/kinder/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 06:35:01 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Normal]]></category>

		<guid isPermaLink="false">http://vivaz.net/2009/12/kinder/</guid>
		<description><![CDATA[


kinder, originally uploaded by nikogoo.

]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/nikogoo/4208289478/" title="photo sharing"><img src="http://farm5.static.flickr.com/4031/4208289478_6c013b2006.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/nikogoo/4208289478/">kinder</a>, originally uploaded by <a href="http://www.flickr.com/people/nikogoo/">nikogoo</a>.</span>
</div></p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/12/kinder/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>taobao玩偶</title>
		<link>http://vivaz.net/2009/12/taobao%e7%8e%a9%e5%81%b6-2/</link>
		<comments>http://vivaz.net/2009/12/taobao%e7%8e%a9%e5%81%b6-2/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 05:19:16 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Normal]]></category>

		<guid isPermaLink="false">http://vivaz.net/2009/12/taobao%e7%8e%a9%e5%81%b6-2/</guid>
		<description><![CDATA[


taobao玩偶, originally uploaded by nikogoo.


终于到了，这个 pose 潮人伐
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/nikogoo/4151593125/" title="photo sharing"><img src="http://farm3.static.flickr.com/2575/4151593125_088cda1c67.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/nikogoo/4151593125/">taobao玩偶</a>, originally uploaded by <a href="http://www.flickr.com/people/nikogoo/">nikogoo</a>.</span>
</div>
<p>
终于到了，这个 pose 潮人伐</p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/12/taobao%e7%8e%a9%e5%81%b6-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>just noise</title>
		<link>http://vivaz.net/2009/12/just-noise/</link>
		<comments>http://vivaz.net/2009/12/just-noise/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 09:59:42 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=171</guid>
		<description><![CDATA[很久没关注自己的 blog 了，今天才发现好几个插件已经宕掉  ，另外还有一名老外看了偶的教程并留言欣喜中  
说说近期的情况和生活吧。
1. PS3 神机入手，当时只在 twitter 上留言 CX 一哈，特此补发（2009.10.03 入手）

2. 远在哈尔滨的小姨子和妹夫 11 月份来上海看望了我们，并带来许多干肠，怨念啊  
3. 随公司去了一次东方绿洲和朱家角，感觉良好


4. 好友终于买车了，这样每个周末的 羽毛球+FB+三国杀 队伍扩充至 6 人（偶在乡下比较远）
5. 孝敬了 哈尼 大人一台 ipod nano5（背面刻有她的 twitter id 哦  ） 
6. 移动 IDC 杯具，导致整整业务中断了 48 小时，以后无线业务会越来越难做
7. 参加了同学婚礼，目前算下来朋友中该摆酒的都摆了，偶们自己的还是遥遥无期，真有点对不起哈尼  
]]></description>
			<content:encoded><![CDATA[<p>很久没关注自己的 blog 了，今天才发现好几个插件已经宕掉 <img src='http://vivaz.net/wp-includes/images/smilies/ico23.gif' alt=':23:' class='wp-smiley' /> ，另外还有一名老外看了偶的教程并留言欣喜中 <img src='http://vivaz.net/wp-includes/images/smilies/ico11.gif' alt=':4:' class='wp-smiley' /> </p>
<p>说说近期的情况和生活吧。</p>
<p>1. PS3 神机入手，当时只在 twitter 上留言 CX 一哈，特此补发（2009.10.03 入手）<br />
<a href="http://www.flickr.com/photos/nikogoo/3977476880/" title="DSC05415 by nikogoo, on Flickr"><img src="http://farm4.static.flickr.com/3491/3977476880_4c793272ee.jpg" width="500" height="375" alt="DSC05415" /></a></p>
<p>2. 远在哈尔滨的小姨子和妹夫 11 月份来上海看望了我们，并带来许多干肠，怨念啊 <img src='http://vivaz.net/wp-includes/images/smilies/ico18.gif' alt=':39:' class='wp-smiley' /> </p>
<p>3. 随公司去了一次东方绿洲和朱家角，感觉良好<br />
<a href="http://www.flickr.com/photos/nikogoo/4067172680/" title="CIMG0307 by nikogoo, on Flickr"><img src="http://farm3.static.flickr.com/2425/4067172680_2d6c56a1e9.jpg" width="500" height="375" alt="CIMG0307" /></a></p>
<p><a href="http://www.flickr.com/photos/nikogoo/4066779169/" title="P1010497 by nikogoo, on Flickr"><img src="http://farm3.static.flickr.com/2788/4066779169_7fd7e56762.jpg" width="500" height="375" alt="P1010497" /></a></p>
<p>4. 好友终于买车了，这样每个周末的 羽毛球+FB+三国杀 队伍扩充至 6 人（偶在乡下比较远）</p>
<p>5. 孝敬了 哈尼 大人一台 ipod nano5（背面刻有她的 twitter id 哦 <img src='http://vivaz.net/wp-includes/images/smilies/ico29.gif' alt=':36:' class='wp-smiley' /> ） </p>
<p>6. 移动 IDC 杯具，导致整整业务中断了 48 小时，以后无线业务会越来越难做</p>
<p>7. 参加了同学婚礼，目前算下来朋友中该摆酒的都摆了，偶们自己的还是遥遥无期，真有点对不起哈尼 <img src='http://vivaz.net/wp-includes/images/smilies/ico8.gif' alt=':15:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/12/just-noise/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>鋼殻のレギオス</title>
		<link>http://vivaz.net/2009/08/%e9%8b%bc%e6%ae%bb%e3%81%ae%e3%83%ac%e3%82%ae%e3%82%aa%e3%82%b9/</link>
		<comments>http://vivaz.net/2009/08/%e9%8b%bc%e6%ae%bb%e3%81%ae%e3%83%ac%e3%82%ae%e3%82%aa%e3%82%b9/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 07:21:16 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Anime]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=164</guid>
		<description><![CDATA[最近比较好看的一部动画，异生物+格斗+学院爱情，人设也不错，最喜欢小菲丽，很萌  


]]></description>
			<content:encoded><![CDATA[<p>最近比较好看的一部动画，异生物+格斗+学院爱情，人设也不错，最喜欢小菲丽，很萌 <img src='http://vivaz.net/wp-includes/images/smilies/ico25.gif' alt=':3:' class='wp-smiley' /> </p>
<p><a href="http://vivaz.net/wp-content/uploads/2009/08/20regios1.jpg"><img src="http://vivaz.net/wp-content/uploads/2009/08/20regios1.jpg" alt="20regios1" title="20regios1" width="300" height="393" class="aligncenter size-full wp-image-165" /></a></p>
<p><a href="http://vivaz.net/wp-content/uploads/2009/08/regi33.jpg"><img src="http://vivaz.net/wp-content/uploads/2009/08/regi33-300x225.jpg" alt="regi33" title="regi33" width="300" height="225" class="aligncenter size-medium wp-image-166" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/08/%e9%8b%bc%e6%ae%bb%e3%81%ae%e3%83%ac%e3%82%ae%e3%82%aa%e3%82%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cacti install and threshold settings</title>
		<link>http://vivaz.net/2009/06/cacti-install-and-threshold-settings/</link>
		<comments>http://vivaz.net/2009/06/cacti-install-and-threshold-settings/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 07:08:24 +0000</pubDate>
		<dc:creator>viva</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[#Linux]]></category>
		<category><![CDATA[cacti]]></category>

		<guid isPermaLink="false">http://vivaz.net/?p=135</guid>
		<description><![CDATA[CentOS5.2 x64/ net-snmp 5.3.1 / rrd-tool 1.2.30
Cacti 0.8.7d
cacti-plugin-0.8.7d-PA-v2.4
Settings - v0.5
Thold - v0.4.1
1. install package
yum -y install httpd
yum -y install php
yum -y install php-mysql
yum -y install php-snmp
yum -y install mysql-server
yum -y install perl
yum -y install net-snmp-utils
yum -y install libpng
yum -y install freetype
yum -y install libart_lgpl 
2. set chkconfig
chkconfig httpd on
chkconfig mysqld on
3.download rrdtool http://oss.oetiker.ch/rrdtool/download.var
wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm
4.install [...]]]></description>
			<content:encoded><![CDATA[<p>CentOS5.2 x64/ net-snmp 5.3.1 / rrd-tool 1.2.30<br />
Cacti 0.8.7d<br />
cacti-plugin-0.8.7d-PA-v2.4<br />
Settings - v0.5<br />
Thold - v0.4.1</p>
<p>1. install package</p>
<blockquote><p>yum -y install httpd<br />
yum -y install php<br />
yum -y install php-mysql<br />
yum -y install php-snmp<br />
yum -y install mysql-server<br />
yum -y install perl<br />
yum -y install net-snmp-utils<br />
yum -y install libpng<br />
yum -y install freetype<br />
yum -y install libart_lgpl </p></blockquote>
<p>2. set chkconfig</p>
<blockquote><p>chkconfig httpd on<br />
chkconfig mysqld on</p></blockquote>
<p>3.download rrdtool http://oss.oetiker.ch/rrdtool/download.var</p>
<blockquote><p>wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm<br />
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm</p></blockquote>
<p>4.install rddtool</p>
<blockquote><p>rpm -ivh perl-rrdtool-1.2.23-1.el5.rf.i386.rpm rrdtool-1.2.23-1.el5.rf.i386.rpm</p></blockquote>
<p>5. change mysql charset<br />
vi /etc/my.cnf</p>
<blockquote><p>[mysqld]<br />
collation-server = utf8_general_ci<br />
default-collation = utf8_general_ci<br />
character-set-server = utf8<br />
default-character-set = utf8</p></blockquote>
<p>6. download cacti</p>
<blockquote><p>wget http://www.cacti.net/downloads/cacti-0.8.7d.tar.gz<br />
tar zxvf cacti-0.8.7d.tar.gz</p></blockquote>
<p>7. download cacti-plugin-0.8.7d-PA-v2.4.zip from cactiuser &#038; extract it<br />
2 method of install:</p>
<blockquote><p>1) cd /path/cacti-0.8.7d &#038;& patch -p1 -N --dry-run < /path/to/cacti-plugin-0.8.7d-PA-v2.4.diff<br />
2) cd /path/cacti-0.8.7d &#038;& cp -R /path/to/files-0.8.7d/* ./</p></blockquote>
<p>注： 第一种方式在我这里报错了，官方论坛上也有提及，如果你也有遇到可以直接用第二种方式更新</p>
<p>8. imp cacti db</p>
<blockquote><p>
mysqladmin create cacti<br />
mysql -u root -p cacti < /path/to/cacti.sql<br />
mysql -u root -p cacti < /path/to/pa.sql<br />
mysql> create user cacti@’localhost’;<br />
mysql> create user cacti@’127.0.0.1′;<br />
mysql> grant all privileges on cacti.* to cacti@’localhost’;<br />
mysql> grant all privileges on cacti.* to cacti@’127.0.01′;<br />
mysql> set password for cacti@’localhost’ = password(’cactipasswd’);<br />
mysql> set password for cacti@’127.0.0.1′ = password(’cactipasswd’);
</p></blockquote>
<p>9. ensure the db-section at global.php is correct</p>
<blockquote><p>vi /opt/www/html/cacti/include/global.php #-->check this section: /* Default database settings*/</p></blockquote>
<p>10. set crontab<br />
crontab -u cacti -e</p>
<blockquote><p>*/5 * * * * /usr/bin/php /opt/www/html/cacti/poller.php > /dev/null 2>&#038;1</p></blockquote>
<p>11. install threshold</p>
<blockquote><p>wget http://cactiusers.org/downloads/settings.tar.gz<br />
wget http://cactiusers.org/downloads/thold.tar.gz<br />
wget http://cactiusers.org/downloads/monitor.tar.gz</p></blockquote>
<p>12. exract</p>
<blockquote><p>tar zxvf settings.tar.gz<br />
tar zxvf thold.tar.gz<br />
tar zxvf monitor.tar.gz</p></blockquote>
<p>13. place plug-in files into appropriate directory</p>
<blockquote><p>mv settings /opt/www/html/cacti/plugins/<br />
mv thold /opt/www/html/cacti/plugins/<br />
mv monitor /opt/www/html/cacti/plugins/</p></blockquote>
<p>14. update mysql db</p>
<blockquote><p>mysql -u root -p cacti < thold.sql<br />
mysql -u root -p cacti < monitor.sql</p></blockquote>
<p>15. activate plug-ins now:<br />
vi /opt/www/html/cacti/include/global.php</p>
<blockquote><p>$plugins = array();<br />
$plugins[] = 'settings';<br />
$plugins[] = 'thold';<br />
$plugins[] = 'monitor';</p></blockquote>
<p>16. After installation, the 1st thing u need do is edit admin account, otherwise the “plug-in management” &#038; “ThreshHold Templates” will not be added into console tab<br />
Console -> User Management -> admin<br />
<a href="http://vivaz.net/wp-content/uploads/2009/06/cacti1.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/cacti1.png" alt="cacti user" title="cacti user" width="609" height="533" class="aligncenter size-full wp-image-146" /></a></p>
<p><a href="http://vivaz.net/wp-content/uploads/2009/06/cacti2.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/cacti2.png" alt="cacti plugin" title="cacti plugin" width="819" height="249" class="aligncenter size-full wp-image-148" /></a></p>
<p>Now go to:<br />
Console -> Plugin Management<br />
At “Thresholds”, click “Install” &#038; “Enable”<br />
<a href="http://vivaz.net/wp-content/uploads/2009/06/cacti3.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/cacti3.png" alt="enable thresholds" title="enable thresholds" width="704" height="511" class="aligncenter size-full wp-image-149" /></a></p>
<p>17. Use Tholds<br />
17.1 mail settings<br />
Go to console -> Settings    select the “Mail/DNS” tab<br />
Go to console -> Settings    select the “Alerting/Thold” tab<br />
enable “Dead Hosts Notifications”<br />
Dead Host Notifications Email:		enter the web-admin mail account<br />
From Email Address:				cacti alert mail accout<br />
Save the configuration.<br />
Then we will receive alter-mail when a host goes down or up:</p>
<p>17.2 create Threshhold Templates<br />
Go to Console -> Threshhold Templates<br />
Create <a href="http://vivaz.net/wp-content/uploads/2009/06/cacti41.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/cacti41.png" alt="Threshhold Templates" title="Threshhold Templates" width="417" height="344" class="aligncenter size-full wp-image-152" /></a> you need</p>
<p>17.3 Apply the Threshhold Templaes</p>
<p>Then Go to Console -> devices<br />
Click the device you want to apply the Threshhold Template<br />
And then click “Create Graphs for this Host”</p>
<p>Create Graphs for this Host -> Auto-create thresholds</p>
<p>17.4 some threshold examples</p>
<p>Create disk usage Thold template<br />
When (used_space/total_space%) > 90%, cacti will send alert mail<br />
4.1.1 Add “VALUE_OF_HDD_TOTAL” at  global _arrays.php</p>
<p>vi /opt/www/html/cacti/include/global _arrays.php<br />
add VALUE_OF_HDD_TOTAL</p>
<p>find</p>
<blockquote><p>$custom_data_source_types = array(</p></blockquote>
<p>add</p>
<blockquote><p>"VALUE_OF_HDD_TOTAL" => "Value of hdd_total data source",</p></blockquote>
<p>add a new CDEF<br />
Now go to  Console -> Graph Management -> CDEFs  click “Add” to add a new CDEF<br />
Add new CDEF named like “Used Disk Space Percent”, at this CDEF, add 5 items:</p>
<blockquote><p>Item #1  Special Data Source: CURRENT_DATA_SOURCE<br />
Item #2  Custom String: 100<br />
Item #3  Operator: *<br />
Item #4  Special Data Source: VALUE_OF_HDD_TOTAL<br />
Item #5  Operator: / </p></blockquote>
<p><a href="http://vivaz.net/wp-content/uploads/2009/06/cacti5.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/cacti5.png" alt="cdef" title="cdef" width="575" height="298" class="aligncenter size-full wp-image-153" /></a></p>
<p>create new Threshold Templates<br />
Go to Console -> Threshold Templates -> click Add<br />
For linux host, we choose “ucd/net – CPU Usage - user” template;<br />
for windows host, we choose “Host MIB - Hard Drive Space” template<br />
this depends on what templates we used in device graphic:</p>
<blockquote><p>Data Field: 		hdd_used<br />
Enabled: 			yes<br />
Threshold Type: 	High / Low<br />
High Threshold:		90<br />
Low Threshold:		0<br />
Data Type:			CDEF</p></blockquote>
<p>Threshold CDEF:	Used Disk Space Percent   (the CDEF Name we just created)<br />
Alert E-Mail:		the email-address that alert message will send to</p>
<p>ucdnet memroy  usage linux<br />
<a href='http://vivaz.net/wp-content/uploads/2009/06/cacti_graph_template_ucdnet_-_memory_usage_linux.xml'>cacti_graph_template_ucdnet_-_memory_usage_linux</a></p>
<p><a href="http://vivaz.net/wp-content/uploads/2009/06/graph_image.php.png"><img src="http://vivaz.net/wp-content/uploads/2009/06/graph_image.php.png" alt="graph_image" title="graph_image" width="603" height="394" class="aligncenter size-full wp-image-155" /></a></p>
<p>Reference:</p>
<p>http://forums.cacti.net/viewtopic.php?t=13829</p>
<p>http://cactiusers.org/wiki/TholdDocs</p>
<p>http://www.bsdmap.com/2008/12/07/how-to-install-cacti/</p>
<p>pyopyo docs</p></blockquote>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://vivaz.net/2009/06/cacti-install-and-threshold-settings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.289 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 16:51:53 -->
