<?xml version="1.0" encoding="gb2312"?>
	<rss version="2.0">
		<channel>
		<title><![CDATA[星瞳——吾爱]]></title>
		<description><![CDATA[    本BLOG的技术类文章，未注明转贴，都是原创。放在“原创”文件夹的肯定是原创；其它文件夹的有些文章因部分文字是网上各处摘录的，故未放在“原创”文件夹中。

    我的另一BLOG是 http://www.aixchina.net/?1865]]></description>
		<link>http://www.cublog.cn/u/739/</link>
		<language>zh-cn</language>
		<generator>www.cublog.cn</generator>
		<copyright>Copyright 2010 ChinaUnix.Net All Rights Reserved</copyright>
		<pubDate>Fri, 03 Sep 2010 02:10:57 GMT</pubDate>
	
		<item>
			<title><![CDATA[博客迁移声明]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=2200485]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 22 Mar 2010 18:18:42 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<DIV><BR>&nbsp;&nbsp;&nbsp; 本来想一直用CUBLOG的，但公司把URL中带BLOG关键字的网站都给屏蔽了，所以不得不停止本博客的更新，以后的新文章只会发到<A href="http://www.aixchina.net/?1865">http://www.aixchina.net/?1865</A>。非常遗憾！</DIV>  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX平台查看最耗内存的N个进程（续）]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=2118349]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 11 Dec 2009 11:26:54 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 如果想在AIX上部署mtop()，目的就是可以直接用mtop，只需在root用户下复制、粘贴下面的一堆代码就可以了：<BR>export FPATH=${FPATH=/functions}<BR>grep -qw FPATH= /etc/profile || echo export FPATH=$FPATH &gt;&gt;/etc/profile<BR>[ -d $FPATH ] || mkdir $FPATH </P>
<P>cat &lt;&lt;'!' &gt;${FPATH}/mtop<BR>function mtop {<BR>#判断第一个参数是否是正整数<BR>if ! (echo $1 | egrep -q ^[1-9][0-9]*$); then<BR>cat &lt;&lt;EOF<BR>&nbsp;List the top processe(s) using memory. Written by <A href=……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX平台查看最耗内存的N个进程]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=2110685]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 03 Dec 2009 16:30:31 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; AIX平台要查看最耗内存的进程可以用svmon命令，但此命令的输出看不出相关进程的命令全貌，为解决这个问题，写了个mtop()函数，在AIX5.2、5.3、6.1上测试通过：<BR>mtop() {<BR>svmon -Pt $1 | awk -v sq="'" -v dq='"' '<BR>/^--/{a=1}<BR>$1=="Vsid"{<BR>&nbsp; system("echo;ps alxww "pid"|awk -F: -v OFS=: "sq"length($0)&gt;200{for(i=2;i&lt;=NF;i++){gsub("dq" "dq","dq" <A href='file://\\n"dq",$i)}}1"sq'>\\n"dq",$i)}}1"sq</A>)<BR>&nbsp; a=0<BR>&nbsp; }<BR>a{print;if($1~/[1-9]/){pid=$1}}'<BR>}<……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[批量改hdisk盘号]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1911761]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 27 Apr 2009 02:12:02 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 最近实际工作中解决的一个问题：HBA删除重认后，其下的子设备hdisk2-hdisk44全部乱套，用下面的方法可以将“源”批量改成“目标”。</P>
<P>源：<BR>08:30:32 <A href="mailto:root@VIOS3:[/home/padmin]#lspv">root@VIOS3:[/home/padmin]#lspv</A><BR>hdisk1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00c82a80c691ee54&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rootvg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用fsdb恢复JFS2文件系统已删文件学习记录三]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1845016]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 27 Feb 2009 06:18:02 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 前天发现AIX5.2的fsdb命令与AIX5.3的不同，不提供hex dump子命令，导致恢复文件时陷入困境——无法知道已删文件的i-node。不过可以另辟蹊径——观察文件系统下现有文件的i-node的连续性，从而猜出已删文件的i-node。昨天做的一个简单的恢复过程如下：</P>
<P>10:05:58 <A href="mailto:root@ST-6K01:[/test]#find">root@ST-6K01:[/test]#find</A> . -xdev -exec ls -id {} \; | sort -n<BR>&nbsp;&nbsp;&nbsp; 2 .<BR>&nbsp;&nbsp;&nbsp; 3 ./lost+found<BR>&nbsp;&nbsp;&nbsp; 4 ./aa<BR>&nbsp;&nbsp;&nbsp; 6 ./……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[自动显示整句英文的音标]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1815466]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 06 Feb 2009 07:35:04 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<DIV>&nbsp;</DIV>
<DIV>
<DIV>&nbsp;&nbsp;&nbsp; 这些天“再次”开始学习英语，遇到一个需求——如何自动显示整句英文的音标。网上搜了下，发现有此功能的很多程序都要收费，所以就只好自己动手了。</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 主要参考了这篇文章：<A href="http://club.excelhome.net/thread-83613-1-4.html"><FONT color=#800080>http://club.excelhome.net/thread-83613-1-4.html</FONT></A></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<TABLE style="BORDER-COLLAP……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用fsdb恢复JFS2文件系统已删文件学习记录二]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1779394]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 07 Jan 2009 04:59:43 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 如下步骤，节选自昨天做的rm -r 后恢复子目录中所有文件的实际操作过程。本文同样也是依据LOVEUNIX 技术专家projects的文章——http://www.loveunix.net/thread-94093-1-1.html，照猫画虎而来。</P>
<P>17:50:28 <A href="mailto:root@ST-FREE:[/jfs2]#mkdir">root@ST-FREE:[/jfs2]#mkdir</A> dir1<BR>17:50:34 <A href="mailto:root@ST-FREE:[/jfs2]#ls">root@ST-FREE:[/jfs2]#ls</A><BR>dir1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lost+found<BR>17:50:35 <A href="mailto:root@ST-FREE:[/jfs2]#cd">root@……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用fsdb恢复JFS2文件系统已删文件学习记录一]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1779352]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 07 Jan 2009 04:28:51 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 首先，要感谢LOVEUNIX 技术专家projects 提供的用fsdb恢复JFS2文件系统已删文件的使用范例——http://www.loveunix.net/thread-94093-1-1.html</P>
<P>&nbsp;&nbsp;&nbsp; 据此，写了脚本可以列出某JFS2文件系统可能可以恢复的文件、目录列表：<BR>FindRemovedFile () {<BR>FS=$1<BR>fsck $FS &gt;/dev/null<BR>echo "i 2 \n t \n h \n \n x \n q \n" | fsdb $FS |\<BR>awk -F\| '/^0/ {if($2~/^\.{2}/ &amp;&amp; $2!~/\.{16}/) {split($1,a," ");printf $0;printf " i-node: %d\n","0x"a[3]} else {print}}'<BR>……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[利用sudo允许非root用户重启WAS]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1736651]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 23 Dec 2008 06:41:43 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 以前的公司不允许使用sudo，所以一直没研究过这个东西。最近遇到一个问题——下班后，开发人员因测试紧急，需要系统管理员能赶回来为他们重启WAS，类似问题只有通过给个别普通用户赋予启、停WAS的权力来解决。IBM官方的方法是修改一堆文件或目录的权限，我觉得太累，所以上午花时间测试下sudo，发现sudo还真是简单、好用、安全性也比IBM官方的好。</P>
<P>&nbsp;&nbsp;&nbsp; 装完sudo，一条命令改下配置文件，所有工作就完了：<BR>cat &lt;&lt;'!' &gt;&gt;/etc/sudoers</P>
<P>Defaults&nbsp;loglinelen=0<BR>D……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX 6 RBAC学习记录二]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1674519]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 01 Dec 2008 08:53:48 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 继《AIX 6 RBAC学习记录一》，本文专注于分析：要使某用户能运行某命令，需要分配给他什么样的角色。</P>
<P>3、查看“运行某命令”所需要的角色（命令在RBAC特权命令数据库中）<BR>CMD=cfgmgr&nbsp;#此处写cfgmgr、/usr/sbin/cfgmgr都可以<BR>x() {<BR>CMD=`which $1`|| return<BR>AUTH=`lssecattr -c -a accessauths $CMD | awk -F= '{print $2}'`<BR>[[ a$AUTH == a ]] &amp;&amp; return</P>
<P>#将AUTH=aix.system.boot.create变成AUTH=aix.system.boot.create|aix.system.boot,|aix.system.boot$|aix.syste……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX 6 RBAC学习记录一]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1673807]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 01 Dec 2008 02:58:40 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 增强 RBAC（Role Based Access Control，基于角色的访问控制）是AIX 6 的安全新特性。使用RBAC对用户权限的控制颗粒度可以做得很细，所以这个东西还是很有用的。由于RBAC相关命令都是新命令，不太好记，要用的时候却想不起来了，所以决定根据常见的需求，通通写成可重复使用的脚本。</P>
<P>1、查看具有角色的所有用户<BR>lsrole -f -a dfltmsg ALL; lsuser -a default_roles roles ALL |grep -v "roles=$"</P>
<P>命令结果示例:<BR># lsrole -f -a dfltmsg ALL; lsuser -a default_roles roles ALL |grep -v "ro……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX 6 RBAC学习记录三]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1674688]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 01 Dec 2008 11:36:42 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 终于在下班前完成了AIX 6 RBAC学习记录三，现在可以赶紧回家了。</P>
<P>5、查看“读、写某文件”所需要的角色（文件在RBAC特权文件数据库中）<BR>FILE=/var/adm/sulog<BR>x() {<BR>#根据authorization，确定role<BR>get_role() <BR>&nbsp; {<BR>&nbsp; #将AUTH=aix.system.boot.create变成AUTH=aix.system.boot.create|aix.system.boot,|aix.system.boot$|aix.system,|aix.system$<BR>&nbsp; AUTH=$1<BR>&nbsp; STRING=$2<BR>&nbsp; PAUTH=${AUTH%.*}<BR>&nbsp; AUTH="${AUTH}|${PAUTH},|${PAUTH}$"<BR>&nbsp; PA……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用lsof查看WPAR里端口对应的进程]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1358567]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 03 Nov 2008 10:23:36 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; lsof在WPAR里不能使用，所以要想知道WPAR里端口对应的进程是个问题。今天研究了下这个问题，发现不必在WPAR里运行lsof，在GLOBAL环境下运行lsof完全可以知道某个WPAR里所有端口对应的进程名、进程ID。&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp; 方法如下：<BR>WPAR=XXXX<BR>for i in `ps -e@ | awk -v wpar=$WPAR '$1==wpar {print $2}'`;do<BR>&nbsp;lsof -nPp $i 2&gt;/dev/null| grep LIS<BR>done</P>
<P>&nbsp;&nbsp;&nbsp; 示例：<BR>WPAR里可以看到<BR># hostname; netstat -an | grep LIS<BR>wpar4<BR>tcp4&nbsp;&……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[如何防止tar误操作导致文件丢失]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1353838]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 29 Oct 2008 14:29:27 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 在<A href="http://www.loveunix.net/thread-91108-1-1.html">http://www.loveunix.net/thread-91108-1-1.html</A>看到：<BR>#cd /tmp/<BR>#tar -cvf a /tmp/a.tar<BR>会报错说没这个v/tmp/a.tar的文件<BR>执行上面的操作之后，发现/tmp下面没有这个a文件了</P>
<P>&nbsp;&nbsp;&nbsp; 这是使用tar比较常见的一个错误操作。以前我也曾犯过。颜渊不二过，想了个办法，以实际行动学习下颜渊：在/etc/profile里放个alias就可以了——alias tar='mwt(){ [ -e $3 ] &amp;&amp; /usr/bin/tar $1 $2 $3 || echo Can not f……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[VMWare ESX命令行学习笔记]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1286954]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Sun, 12 Oct 2008 06:19:13 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 近来学习了VMWARE ESX下的相关命令，现记录下一些主要的，以便以后可以温故而知新。</P>
<P>man -k esx<BR>man -k vmware<BR>ls /usr/bin | grep vm<BR>ls /usr/sbin | grep vm</P>
<P>find /vmfs \( -name "*.vmdk" -a ! -name "*flat.vmdk" -a ! -name "*-s[0-9][0-9][0-9].vmdk" -a ! -name "*delta.vmdk" \) -exec grep CID {} \;<BR>find /vmfs \( -name "*.vmdk" -a ! -name "*flat.vmdk" -a ! -name "*-s[0-9][0-9][0-9].vmdk" -a ! -name "*delta.vmdk" \) -exec grep -l 61f41183 {} \;<BR>find /vmfs \……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[察看根文件系统中哪些文件或子目录占的空间最大]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1271666]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 02 Oct 2008 15:12:13 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<DIV>&nbsp;&nbsp;&nbsp; 根文件系统比较特殊，特殊之处在于——其它文件系统的mount点都在它下面。当“/”接近100%时如何只查本文件系统中哪些文件或子目录占的空间最大是个问题。想了很久，最终还是用“一句话”搞定了。</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>ls | egrep -v `df | awk -F' /' '$NF !~ /\/|^$|%/ {printf "^"$NF"$|"} END{printf "^$"}'` | xargs du -sk | sort -n</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>========================================================================<BR>任何形式的转载，请写……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX改名三步曲]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1149338]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 26 Aug 2008 07:57:26 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<DIV>&nbsp;&nbsp;&nbsp; smit hostname改名后一个常见的问题是：hostname看到的是新名，uname -n看到的仍是旧名。没见IBM针对改名有官方的步骤，因此共享下我多年来的一直使用的方法。</DIV>
<DIV>1、smit hostname<BR>2、vi /etc/hosts<BR>3、uname -S`hostname|sed 's/\..*$//'` </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 第三步为什么写得这么麻烦？因为是直接照搬/etc/rc.net。显然IBM这么做，是特意针对hostname.XXX.com这样类型的hostname的。</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 另外，补充个另类的方……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[AIX平台IPSEC使用的例子]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1108584]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 06 Aug 2008 01:05:23 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 为LU（<A href="http://www.loveunix.net/thread-87979-1-1.html">http://www.loveunix.net/thread-87979-1-1.html</A>）上的需求写的一个IPSEC使用的例子。</P>
<P>一、 启动IPSEC：<BR># smit ipsec4<BR>-&gt; Start/Stop IP Security<BR>----&gt; Start IP Security -&gt;</P>
<P>Start IP Security</P>
<P>Type or select values in entry fields. <BR>Press Enter AFTER making all desired changes.</P>
<P>--------------------------------[Entry Fields] <BR>Start IP Security -------------[Now and……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[VIO学习之备份VIO SERVER]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1105807]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 04 Aug 2008 08:10:32 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 今天，研究了下VIO SERVER备份、恢复的问题。先试用了下官方推荐的backupios命令，backupios命令可以这样写：backupios -file </P>
<P>/ftp/`hostname`.mksysb -mksysb。但考虑到两个问题：不保留镜像信息问题；排除文件问题，感觉还是直接在root用户下用mksysb好些。</P>
<P>&nbsp;&nbsp;&nbsp; mksysb我觉得做一次就够了，因为除了IO部分VIO SERVER的内容基本是不变的。那剩下的工作就是每天把存储设备的LUN信息和lsmap信息</P>
<P>导出来，保存到异地就可以了。</P>
<P>&nbsp;&nbsp;&nbsp; EMC CLARiiON存储……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[VIO学习之SNA配置]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/739/showart.php?id=1078958]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 11 Jul 2008 07:58:11 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 物理机器迁到VIO上，采用虚拟网卡与AS/400进行SNA通讯过程中遇到了一些问题，简单总结一下。</P>
<P>&nbsp;&nbsp;&nbsp; 首先说明两点：<BR>1、不用怀疑虚VIO的拟网卡是否能与AS/400进行SNA通讯。无论是在相同VLAN直接通讯，还是在不同VLAN采用DLSW方式通讯，肯定都可以通讯成功。<BR>2、对于采用mksysb、alt_disk方式迁移的系统，用于SNA通讯的网卡编号最好先后保持一致。即原先如果是ent3，现在最好也用ent3，即使先虚拟两个无用的ent1、ent2，最后再删掉也值得。因为这时你会发现一切都进行得太顺利了。当然这不……  ]]></description>
		</item>	
			</channel>
	</rss>
