<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>百里挑一</title> 
<link>http://www.admin99.net/index.php</link> 
<description>linux命令 &#124; seo优化技术 &#124; linux系统管理员指南 --我的学习园地</description> 
<language>zh-cn</language> 
<copyright>Powered by Bo-blog 2.0.2 sp2</copyright>
<item>
<link>http://www.admin99.net/read.php?487</link>
<title>sed使用shell变量</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Wed, 04 Aug 2010 13:52:50 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?487</guid> 
<description>
<![CDATA[ 
	sed -i "s/${oldstring}/${newstring}/g" filename<br/>sed要用双引号<br/>变量要用{}括起来，注意括号位置<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?485</link>
<title>timezone的相关操作</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Mon, 02 Aug 2010 03:08:06 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?485</guid> 
<description>
<![CDATA[ 
	Linux 的 时区数据库存放在 /usr/share/zoneinfo 下<br/>系统启动时阅读 /etc/localtime 文件，采用 ln -s 命令即可方便的把时区设置为指定的时区文件。<br/>比如<br/>ln -sf /usr/share/zoneinfo/posix/Asia/Shanghai /etc/localtime<br/>即可把时间设置为中国时间<br/>clock -w 或者 hwclock 可以将时间信息写入bios<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?483</link>
<title>phpwind实现sphinx全文检索 增量</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Fri, 16 Jul 2010 04:20:35 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?483</guid> 
<description>
<![CDATA[ 
	1.在论坛的数据库中创建一个表<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">CREATE TABLE IF NOT EXISTS `search_counter` (<br/> &nbsp;`counterid` int(11) NOT NULL DEFAULT '0',<br/> &nbsp;`max_doc_id` int(11) NOT NULL DEFAULT '0',<br/> &nbsp;`min_doc_id` int(10) NOT NULL DEFAULT '0',<br/> &nbsp;PRIMARY KEY (`counterid`)<br/>) ENGINE=MyISAM DEFAULT CHARSET=gbk;</div></div><br/>2.安装mmseg<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">cd /usr/src<br/>wget http://www.coreseek.cn/uploads/csft/3.1/Source/mmseg-3.1.tar.gz<br/>tar xzf mmseg-3.1.tar.gz<br/>cd mmseg-3.1<br/>./configure --prefix=/usr/local/mmseg<br/>make<br/>make install</div></div><br/>3.如果数据库是gbk编码，需要先安装libiconv。如果是utf8编码则省略这一步<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">cd /usr/src/<br/>wget http://ftp.gnu.org/gnu/libiconv/libiconv-1.13.tar.gz<br/>tar xzf libiconv-1.13.tar.gz<br/>cd libiconv-1.13<br/>./configure<br/>make<br/>make install</div></div><br/>4.安装csft<br/>先看看有没有安装expat-devel<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">yum -y install expat-devel</div></div><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">cd /usr/src<br/>wget http://www.coreseek.cn/uploads/csft/3.1/Source/csft-3.1.tar.gz<br/>tar xzf csft-3.1.tar.gz<br/>cd csft-3.1<br/>./configure --prefix=/usr/local/csft --with-mysql=/usr/local/mysql --with-mmseg=/usr/local/mmseg --with-mmseg-includes=/usr/local/mmseg/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg/lib/</div></div><br/>vi src/Makefile<br/>在182行下面添加一行<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">LIBS = -lm -lz -lexpat -liconv -L/usr/local/lib -lpthread</div></div><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">make<br/>make install</div></div><br/>5.启动searchd进程<br/>/usr/local/csft/bin/searchd<br/>有可能会报找不到某个.so的错误，需要先找到该so文件，链接到/usr/lib/下<br/>6.编辑配置文件<br/>下面是个简单的配置文件，只做了一个索引<br/>vi /usr/local/csft/etc/csft.conf<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">source threads<br/>{<br/> &nbsp; &nbsp;type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= mysql<br/> &nbsp; &nbsp;sql_host &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= localhost<br/> &nbsp; &nbsp;sql_user &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= admin99<br/> &nbsp; &nbsp;sql_pass &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= admin99<br/> &nbsp; &nbsp;sql_db &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= admin99<br/> &nbsp; &nbsp;sql_port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 3306 &nbsp;# optional, default is 3306<br/> &nbsp; &nbsp;sql_sock &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /tmp/mysql.sock<br/> &nbsp; &nbsp;sql_query_pre &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SET NAMES gbk<br/> &nbsp; &nbsp;sql_query_pre &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SET SESSION query_cache_type=OFF<br/> &nbsp; &nbsp;sql_query_pre &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = REPLACE INTO search_counter SELECT 3,MAX(tid),MIN(tid) FROM pw_threads<br/> &nbsp; &nbsp;sql_query_range &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SELECT min_doc_id, max_doc_id FROM search_counter WHERE counterid = 3<br/> &nbsp; &nbsp;sql_range_step &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1000<br/><br/>sql_query &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SELECT th.tid,th.subject,th.authorid,th.postdate,th.lastpost,th.fid,th.digest,th.hits,th.replies FROM pw_threads th &nbsp;WHERE th.tid > $start AND th.tid <= $end<br/> &nbsp; &nbsp;sql_attr_uint &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = authorid<br/> &nbsp; &nbsp;sql_attr_uint &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = hits<br/> &nbsp; &nbsp;sql_attr_uint &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = replies<br/> &nbsp; &nbsp;sql_attr_uint &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = fid<br/> &nbsp; &nbsp;sql_attr_timestamp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= postdate<br/> &nbsp; &nbsp;sql_attr_timestamp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= lastpost<br/> &nbsp; &nbsp;sql_attr_uint &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = digest<br/>}<br/><br/>index threadsindex<br/>{<br/> &nbsp; &nbsp; &nbsp; &nbsp;source &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= threads<br/> &nbsp; &nbsp; &nbsp; &nbsp;path &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /data/csft/threads<br/> &nbsp; &nbsp; &nbsp; &nbsp;docinfo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = extern<br/> &nbsp; &nbsp; &nbsp; &nbsp;charset_type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= zh_cn.gbk<br/> &nbsp; &nbsp; &nbsp; &nbsp;#min_prefix_len &nbsp;= 0<br/> &nbsp; &nbsp; &nbsp; &nbsp;#min_infix_len &nbsp;= 2<br/> &nbsp; &nbsp; &nbsp; &nbsp;#ngram_len = 2<br/> &nbsp; &nbsp; &nbsp; &nbsp;charset_dictpath &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /usr/local/csft<br/> &nbsp; &nbsp; &nbsp; &nbsp;min_prefix_len &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0<br/> &nbsp; &nbsp; &nbsp; &nbsp;min_infix_len &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br/> &nbsp; &nbsp; &nbsp; &nbsp;min_word_len &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 2<br/>}<br/><br/>indexer<br/>{<br/> &nbsp; &nbsp; &nbsp; &nbsp;mem_limit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 128M<br/>}<br/><br/>searchd<br/>{<br/> &nbsp; &nbsp; &nbsp; &nbsp;listen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 127.0.0.1:3312<br/> &nbsp; &nbsp; &nbsp; &nbsp;log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = /usr/local/csft/var/log/searchd.log<br/> &nbsp; &nbsp; &nbsp; &nbsp;query_log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp;/usr/local/csft/var/log/query.log<br/> &nbsp; &nbsp; &nbsp; &nbsp;read_timeout &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 50<br/> &nbsp; &nbsp; &nbsp; &nbsp;max_children &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 300<br/> &nbsp; &nbsp; &nbsp; &nbsp;pid_file &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;/usr/local/csft/var/log/searchd.pid<br/> &nbsp; &nbsp; &nbsp; &nbsp;max_matches &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 50000<br/> &nbsp; &nbsp; &nbsp; &nbsp;seamless_rotate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 1<br/> &nbsp; &nbsp; &nbsp; &nbsp;preopen_indexes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br/> &nbsp; &nbsp; &nbsp; &nbsp;unlink_old &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1<br/>}</div></div><br/>7.建立索引<br/>/usr/local/csft/bin/indexer --all<br/>有可能会报找不到某个.so的错误，需要先找到该so文件，链接到/usr/lib/下<br/>8.在后台开启对全文检索的支持<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?481</link>
<title>centos 5 配置snmpd以便本机做流量监控</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Mon, 05 Jul 2010 03:48:06 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?481</guid> 
<description>
<![CDATA[ 
	一、MRTG需要以SNMP服务为基础，所以请确保你的系统已经启用了此服务<br/>1.请确保你的系统安装了以下软件包<br/>net-snmp-5.3.1-14.el5<br/>net-snmp-libs-5.3.1-14.el5<br/>2.修改/etc/snmp/snmpd.conf<br/>去掉如下一行的注释<br/>view mib2 &nbsp; included &nbsp;.iso.org.dod.internet.mgmt.mib-2 fc<br/>把如下行<br/>access &nbsp;notConfigGroup "" &nbsp; &nbsp; &nbsp;any &nbsp; &nbsp; &nbsp; noauth &nbsp; &nbsp;exact &nbsp;systemview none none<br/>改作：<br/>access &nbsp;notConfigGroup "" &nbsp; &nbsp; &nbsp;any &nbsp; &nbsp; &nbsp; noauth &nbsp; &nbsp;exact &nbsp;mib2 none none<br/><br/>3.启用snmpd服务<br/>service snmpd start<br/>chkconfig --levle 2345 snmpd on<br/><br/>4.查看端口的开启状况<br/> netstat -tunlp &#124;grep snmp<br/>tcp &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;127.0.0.1:199 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0.0.0:* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTEN &nbsp; &nbsp; &nbsp;4973/snmpd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>udp &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;0 0.0.0.0:161 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0.0.0:* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4973/snmpd
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?472</link>
<title>centos 5.4 安装xen并安装客户机</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Thu, 15 Apr 2010 09:43:30 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?472</guid> 
<description>
<![CDATA[ 
	yum -y install kernel-xen xen<br/>vi /etc/grub.conf<br/>修改default=1 <br/>将default改到带有xen的内核上。注意列表是从0开始计数的<br/><br/>安装第一个客户机<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">1.首先开辟一个10G的空间给客户机用<br/>dd if=/dev/zero of=/data/virtul/real bs=1024 count=10000000<br/>2.然后设置一个安装源。最简单的办法是用http。启用宿主机上的apache，将centos 5.4的安装光盘上的所有内容copy到apache的htdocs下。默认的apache的htdocs目录是/var/www/html<br/>mount /dev/cdrom /mnt<br/>cp -r /mnt/* /var/www/html/<br/>3.安装，本例中宿主机的ip地址是192.168.0.1<br/>virt-install -n real -r 512 --vcpus=1 --file=/data/virtual/real --nographics -l http://192.168.0.1<br/>这样就安装了一个内存为512M的虚拟机<br/>安装过程选择安装源可以用http ftp nfs等方式，本例用http方式。安装时设置一个能访问到宿主机的ip地址能连上安装源即可。剩下的就按部就班安装系统了</div></div><br/><br/>注意要关闭ipv6 或者安装第二个虚拟机的时候修改ipv6的地址，一般都不会注意这个，会造成ipv6地址冲突<br/><br/>安装第二个客户机<br/>如果多个虚拟机的功能一样，不需要重新安装，只需复制一下第一个虚拟机的文件，然后生成一下配置文件即可，步骤如下<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">1.copy文件<br/>cp /data/virtual/real /data/virtual/real2<br/>2.启动一下安装过程，注意用的是新名字和新文件<br/>virt-install -n real2 -r 512 --vcpus=1 --file=/data/virtual/real2 --nographics -l http://192.168.0.1<br/>3.安装过程启动起来之后，到第一个画面即可退出安装过程。退出命令是ctrl + ]<br/>4.退出之后销毁虚拟机 <br/>xm destroy real2<br/>5.然后正常启动即可<br/>xm create real2<br/>6.启动第二个客户机后要通过连接到客户机的控制台登录修改ip地址才可正常使用<br/>xm console real2</div></div><br/><br/><br/>常用命令<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">进入客户机的控制台 xm console vm-name/vm-id<br/>退出客户机的控制台 CTRL+]<br/>列举正在运行的客户机 xm list<br/>关闭正在运行的客户机 xm shutdown vm-name/vm-id<br/>强制关闭正在运行的客户机 xm destroy vm-name/vm-id<br/>开启客户机 xm create vm-name</div></div><br/><br/>要使客户机随宿主机开机自动启动<br/>需要将客户机的配置文件，从/etc/xen 链接到 /etc/xen/auto。例如<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">cd /etc/xen/auto<br/>ln -s ../real .</div></div><br/>即可<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a> , <a href="http://www.admin99.net/tag.php?tag=xen" rel="tag">xen</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?470</link>
<title>linux下查找最耗iowait的进程</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Wed, 14 Apr 2010 05:16:55 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?470</guid> 
<description>
<![CDATA[ 
	转载，忘了是从哪里转的了，不好意思<br/>抓哪个进程干坏事前要先停掉syslog<br/>/etc/init.d/syslog stop<br/>echo 1 > /proc/sys/vm/block_dump<br/>dmesg &#124; egrep "READ&#124;WRITE&#124;dirtied" &#124; egrep -o '([a-zA-Z]*)' &#124; sort &#124; uniq -c &#124; sort -rn &#124; head<br/>1423 kjournald<br/>1075 pdflush<br/>209 indexer<br/>3 cronolog<br/>1 rnald<br/>1 mysqld<br/>不要忘记在抓完之后关掉block_dump和启动syslog<br/>echo 0 > /proc/sys/vm/block_dump<br/>/etc/init.d/syslog start<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?469</link>
<title>Linux环境下 snmp 简单配置</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Wed, 14 Apr 2010 04:20:40 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?469</guid> 
<description>
<![CDATA[ 
	1、确保Linux主机已经安装了snmp服务<br/><br/>[root@real ~]# rpm -qa &#124;grep snmp<br/>net-snmp-libs-5.1.2-11.EL4.7<br/>net-snmp-5.1.2-11.EL4.7<br/><br/>如果没有，那么放入Linux安装盘找到snmp的rpm包进行安装，或者到网上搜索适合自己Linux发行版本的rpm包进行安装<br/><br/>2、 snmpd.conf文件配置<br/>按照如下方式修改snmpd.conf文件<br/><br/>A、修改默认的community string<br/>com2sec notConfigUser default public<br/>将 public修改为你才知道的字符串<br/><br/>B、把下面的#号去掉<br/>#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc<br/><br/>C、把下面的语句<br/>access notConfigGroup "" any noauth exact systemview none none<br/>改成：<br/>access notConfigGroup "" any noauth exact mib2 none none<br/><br/>3、重启snmpd服务<br/><br/>#/etc/rc.d/init.d/snmpd restart<br/><br/>完成snmpd的配置<br/><br/>3、确保Linux的iptables防火墙对我们的流量监控服务器开放了udp 161端口的访问权限<br/>可使用iptables –L –n 查看当前iptables规则<br/>可编辑/etc/sysconfig/iptables文件来修改iptables规则 <br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?467</link>
<title>linux 下安装配置 mrtg</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Wed, 03 Mar 2010 06:23:12 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?467</guid> 
<description>
<![CDATA[ 
	因为要画图，所以系统中要先安装gd-devel libpng-devel libjpeg-devel<br/>交换机地址是192.168.2.10<br/>本机地址是 &nbsp; &nbsp;192.168.2.9<br/>安装<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">cd /usr/src<br/>wget http://oss.oetiker.ch/mrtg/pub/mrtg-2.16.3.tar.gz<br/>tar xzf mrtg-2.16.3.tar.gz<br/>cd mrtg-2.16.3<br/>./configure --prefix=/usr/local/mrtg <br/>make;make install<br/></div></div><br/>配置<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">mkdir /usr/local/mrtg/html<br/>cp -rp /usr/src/mrtg-2.16.3/images/* /usr/local/mrtg/html/<br/>创建配置文件<br/>/usr/local/mrtg/bin/cfgmaker public@192.168.2.10 --global "workdir: /usr/local/mrtg/html" --output=/usr/local/mrtg/switch.cfg<br/>默认是以bytes为流量单位的，图片是往右走的。如果需要更改，修改switch.cfg，大概16行的地方<br/># Options[_]: growright, bits<br/>改为<br/>Options[_]: growright, bits<br/>建立首页<br/>/usr/local/mrtg/bin/indexmaker --output=/usr/local/mrtg/html/index.html --title="bandwith useage" /usr/local/mrtg/switch.cfg<br/>生成图片等，刚开始多执行几次，大概两三次没有error了就好了<br/>env LANG=C /usr/local/mrtg/bin/mrtg /usr/local/mrtg/switch.cfg<br/>设置cron 每5分钟更新一次<br/>*/5 * * * * env LANG=C /usr/local/mrtg/bin/mrtg /usr/local/mrtg/switch.cfg<br/></div></div><br/>设置个虚拟主机指向到/usr/local/mrtg/html/就可以访问了，别忘了加验证<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?465</link>
<title>dell R410 安装网卡驱动</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Mon, 25 Jan 2010 04:39:02 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?465</guid> 
<description>
<![CDATA[ 
	先到dell网站下载Bcom_LAN_12.8.1_Linux_Source_A00.tar.gz，通过u盘copy到/usr/src中<br/>cd /usr/src/<br/>tar xzvf Bcom_LAN_12.8.1_Linux_Source_A00.tar.gz <br/>cd Bcom_LAN_12.8.1_Linux_Source_A00/NetXtremeII/<br/>tar xzvf netxtreme2-4.8.21.tar.gz <br/>cd netxtreme2-4.8.21/bnx2-1.8.7b/src/<br/>make<br/>make install<br/>reboot<br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item><item>
<link>http://www.admin99.net/read.php?454</link>
<title>关于EDAC i5000 MC0: FATAL ERRORS Found</title> 
<author>real &lt;real@admin99.net&gt;</author>
<category>linux系统相关</category>
<pubDate>Mon, 04 Jan 2010 13:43:49 +0000</pubDate> 
<guid>http://www.admin99.net/read.php?454</guid> 
<description>
<![CDATA[ 
	一台服务器，用DSBF-DX/sas主板。centos 5.2 64位<br/>日志中经常会出现下面的内容<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Jan &nbsp;4 16:11:20 admin99 kernel: EDAC i5000 MC0: FATAL ERRORS Found!!! 1st FATAL Err Reg= 0x4<br/>Jan &nbsp;4 16:11:20 admin99 kernel: EDAC i5000 MC0: >Tmid Thermal event with intelligent throttling disabled<br/>Jan &nbsp;4 16:11:20 admin99 kernel: EDAC MC0: UE row 1, channel-a= 0 channel-b= 1 labels "-": (Branch=0 DRAM-Bank=5 RDWR=Read RAS=7663 CAS=0 FATAL Err=0x4)</div></div><br/>以前还出过类似的错误，都是EDAC这个模块出的问题<br/>以前同型号同系统的其它机器也用过很多，都没出过，这个是例外，具体情况不明<br/><br/>问题不大，不影响使用。用memtest86检查不出问题。据说是intel 5000v系列芯片组的bug，但不肯定。出自这里，http://yuppieq.blog.51cto.com/827798/196518/<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">经过研究，在ＩＮＴＥＬ的文档上找到了答案，这是ｉｎｔｅｌ５０００系列芯片组的一个ＢＵＧ....晕死...<br/>在下面这个文档的２０８页，第3.9.22小节<br/>http://www.intel.com/Assets/PDF/datasheet/313071.pdf </div></div><br/>怀疑是内存控制器温度过高引起的，跟华硕工程师联系过，联系了好几位工程师，都用一句话给我打发了，说官方驱动只支持redhat，大爷的。<br/>不过有个佐证<br/>机柜散热不大好，原来这台机器放在一堆机器的最上面，没问题，后来上面又摞了一台，过了大概半个多小时出现这个错误，然后让机房把上面那台机器撤掉了，大概过了半小时问题结束<br/><br/>可以用以下两个命令屏蔽该消息，可以加到/etc/rc.local中以便重启也能生效<br/><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">echo 0 > /sys/devices/system/edac/mc/log_ue<br/>echo 0 > /sys/devices/system/edac/mc/log_ce</div></div><br/><br/>或者如果要永久关闭，则要在/etc/modprobe.d/blacklist 里面加上<br/>blacklist i5000_edac <br/>Tags - <a href="http://www.admin99.net/tag.php?tag=%E7%A1%AC%E4%BB%B6" rel="tag">硬件</a> , <a href="http://www.admin99.net/tag.php?tag=%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86" rel="tag">系统管理</a>
  ]]> 
</description>
</item>
</channel>
</rss>