<?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 2011</copyright>
        <lastBuildDate>Thu, 01 Dec 2011 10:33:08 +0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>dmidecode ipmitool mcelog</title>
            <description><![CDATA[Dmidecode: &nbsp;&nbsp;&nbsp;&nbsp; <br />Type&nbsp;&nbsp; Information<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------------------------------------<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; BIOS<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; System<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; Base Board<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; Chassis<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; Processor<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp; Memory Controller<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp; Memory Module<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp; Cache<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp; Port Connector<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp; System Slots<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; On Board Devices<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp;&nbsp; OEM Strings<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12&nbsp;&nbsp; System Configuration Options<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp;&nbsp; BIOS Language<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14&nbsp;&nbsp; Group Associations<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15&nbsp;&nbsp; System Event Log<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp; Physical Memory Array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17&nbsp;&nbsp; Memory Device<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp; 32-bit Memory Error<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19&nbsp;&nbsp; Memory Array Mapped Address<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; Memory Device Mapped Address<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21&nbsp;&nbsp; Built-in Pointing Device<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22&nbsp;&nbsp; Portable Battery<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23&nbsp;&nbsp; System Reset<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24&nbsp;&nbsp; Hardware Security<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25&nbsp;&nbsp; System Power Controls<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26&nbsp;&nbsp; Voltage Probe<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27&nbsp;&nbsp; Cooling Device<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28&nbsp;&nbsp; Temperature Probe<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29&nbsp;&nbsp; Electrical Current Probe<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30&nbsp;&nbsp; Out-of-band Remote Access<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 31&nbsp;&nbsp; Boot Integrity Services<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32&nbsp;&nbsp; System Boot<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33&nbsp;&nbsp; 64-bit Memory Error<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34&nbsp;&nbsp; Management Device<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35&nbsp;&nbsp; Management Device Component<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36&nbsp;&nbsp; Management Device Threshold Data<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37&nbsp;&nbsp; Memory Channel<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38&nbsp;&nbsp; IPMI Device<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39&nbsp;&nbsp; Power Supply<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <br />Instead of type_id, you can also pass the keyword to the -t option of the dmidecode command. Following are the available keywords.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Keyword&nbsp;&nbsp;&nbsp;&nbsp; Types<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ------------------------------<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bios&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 13<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1, 12, 15, 23, 32<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; baseboard&nbsp;&nbsp; 2, 10<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chassis&nbsp;&nbsp;&nbsp;&nbsp; 3<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processor&nbsp;&nbsp; 4<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5, 6, 16, 17<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connector&nbsp;&nbsp; 8<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp; <br /><br /># dmidecode -t 16<br /><br />#dmidecode -t 17<br />or<br />#dmidecode -t memory<br /><br />[2hei.net]# ipmitool <br />No command provided!<br />Commands:<br />&nbsp;&nbsp;&nbsp; raw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Send a RAW IPMI request and print response<br />&nbsp;&nbsp;&nbsp; i2c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Send an I2C Master Write-Read command and print response<br />&nbsp;&nbsp;&nbsp; spd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print SPD info from remote I2C device<br />&nbsp;&nbsp;&nbsp; lan&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure LAN Channels<br />&nbsp;&nbsp;&nbsp; chassis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get chassis status and set power state<br />&nbsp;&nbsp;&nbsp; power&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Shortcut to chassis power commands<br />&nbsp;&nbsp;&nbsp; event&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Send pre-defined events to MC<br />&nbsp;&nbsp;&nbsp; mc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Management Controller status and global enables<br />&nbsp;&nbsp;&nbsp; sdr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print Sensor Data Repository entries and readings<br />&nbsp;&nbsp;&nbsp; sensor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print detailed sensor information<br />&nbsp;&nbsp;&nbsp; fru&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print built-in FRU and scan SDR for FRU locators<br />&nbsp;&nbsp;&nbsp; gendev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Read/Write Device associated with Generic Device locators sdr<br />&nbsp;&nbsp;&nbsp; sel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print System Event Log (SEL)<br />&nbsp;&nbsp;&nbsp; pef&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure Platform Event Filtering (PEF)<br />&nbsp;&nbsp;&nbsp; sol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure and connect IPMIv2.0 Serial-over-LAN<br />&nbsp;&nbsp;&nbsp; tsol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure and connect with Tyan IPMIv1.5 Serial-over-LAN<br />&nbsp;&nbsp;&nbsp; isol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure IPMIv1.5 Serial-over-LAN<br />&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure Management Controller users<br />&nbsp;&nbsp;&nbsp; channel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure Management Controller channels<br />&nbsp;&nbsp;&nbsp; session&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print session information<br />&nbsp;&nbsp;&nbsp; sunoem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OEM Commands for Sun servers<br />&nbsp;&nbsp;&nbsp; kontronoem&nbsp;&nbsp;&nbsp; OEM Commands for Kontron devices<br />&nbsp;&nbsp;&nbsp; picmg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run a PICMG/ATCA extended cmd<br />&nbsp;&nbsp;&nbsp; fwum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Update IPMC using Kontron OEM Firmware Update Manager<br />&nbsp;&nbsp;&nbsp; firewall&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure Firmware Firewall<br />&nbsp;&nbsp;&nbsp; shell&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Launch interactive IPMI shell<br />&nbsp;&nbsp;&nbsp; exec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run list of commands from file<br />&nbsp;&nbsp;&nbsp; set&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set runtime variable for shell and exec<br />&nbsp;&nbsp;&nbsp; hpm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Update HPM components using PICMG HPM.1 file<br />&nbsp;&nbsp;&nbsp; ekanalyzer&nbsp;&nbsp;&nbsp; run FRU-Ekeying analyzer using FRU files<br />&nbsp;&nbsp;&nbsp; <br />[2hei.net]# ipmitool event 3<br />Sending SAMPLE event: Memory - Correctable ECC<br />&nbsp;&nbsp; 0 | Pre-Init Time-stamp&nbsp;&nbsp; | Memory #0x53 | Correctable ECC | Asserted<br />&nbsp;&nbsp; <br />[2hei.net]# ipmitool sdr elist<br />CPU0 below Tmax&nbsp; | 7Bh | ok&nbsp; |&nbsp; 3.0 | 47 degrees C<br />CPU1 below Tmax&nbsp; | 7Ah | ok&nbsp; |&nbsp; 3.1 | 39 degrees C<br />DIMM0 Area(RT3)&nbsp; | 7Eh | ok&nbsp; |&nbsp; 7.0 | 30 degrees C<br />PCI Area(RT2)&nbsp;&nbsp;&nbsp; | 7Fh | ok&nbsp; |&nbsp; 7.0 | 36 degrees C<br />CPU0 VCORE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 71h | ok&nbsp; |&nbsp; 3.0 | 0.90 Volts<br /><br />&nbsp;&nbsp;&nbsp; <br />[2hei.net~]#mcelog --cpu nehalem --dmi &lt; /var/log/mcelog &gt;&gt; /home/2hei.net/mcelog.dmi<br /><br />CPU1 VCORE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 70h | ok&nbsp; |&nbsp; 3.1 | 1.02 Volts<br />3.3V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 75h | ok&nbsp; |&nbsp; 7.0 | 3.30 Volts<br />+12V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 76h | ok&nbsp; |&nbsp; 7.0 | 11.81 Volts<br />VBAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 79h | ok&nbsp; |&nbsp; 7.0 | 3.12 Volts<br />5V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 77h | ok&nbsp; |&nbsp; 7.0 | 4.90 Volts<br />Sys.1(CPU 1)&nbsp;&nbsp;&nbsp;&nbsp; | 80h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />Sys.2(CPU 0)&nbsp;&nbsp;&nbsp;&nbsp; | 81h | ok&nbsp; |&nbsp; 7.0 | 6720 RPM<br />Sys.3(Front 1)&nbsp;&nbsp; | 82h | ok&nbsp; |&nbsp; 7.0 | 4080 RPM<br />Sys.4(Front 2)&nbsp;&nbsp; | 83h | ok&nbsp; |&nbsp; 7.0 | 3840 RPM<br />Sys.5(Rear 1)&nbsp;&nbsp;&nbsp; | 84h | ok&nbsp; |&nbsp; 7.0 | 4200 RPM<br />Sys.6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 85h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />Sys.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 86h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />Sys.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 87h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />Sys.9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 88h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />Sys.10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 89h | ns&nbsp; |&nbsp; 7.0 | No Reading<br />&nbsp;]]></description>
            <link>http://www.2hei.net/mt/2011/12/dmidecode-ipmitool-mcelog.html</link>
            <guid>http://www.2hei.net/mt/2011/12/dmidecode-ipmitool-mcelog.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">ipmitool</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">mcelog</category>
            
            <pubDate>Thu, 01 Dec 2011 10:33:08 +0800</pubDate>
        </item>
        
        <item>
            <title>ubuntu编译xen报缺少iasl的处理</title>
            <description><![CDATA[解决办法是先编译好iasl，copy到$PATH中。<br /><br />wget http://acpica.org/download/acpica-unix-20110922.tar.gz<br />tar zxvf acpica-unix-20110922.tar.gz<br />cd acpica-unix-20110922/compiler<br />make<br />cp iasl /usr/bin<br /><br />接下来可以顺利的编译通过xen了。<br />wget http://bits.xensource.com/oss-xen/release/4.1.2/xen-4.1.2.tar.gz<br />$ tar zxvf xen-4.1.2.tar.gz<br />$ cd xen-4.1.2/<br />make dist-xen dist-tools dist-stubdom<br />make install-xen<br />make install-tools PYTHON_PREFIX_ARG="--install-layout=deb"<br />make install-stubdom ]]></description>
            <link>http://www.2hei.net/mt/2011/11/ubuntu-install-xen-miss-iasl.html</link>
            <guid>http://www.2hei.net/mt/2011/11/ubuntu-install-xen-miss-iasl.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">ubuntu</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">ubuntu</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">xen</category>
            
            <pubDate>Thu, 24 Nov 2011 22:27:57 +0800</pubDate>
        </item>
        
        <item>
            <title>BUG of kickstart config file of Ubuntu</title>
            <description><![CDATA[利用RHEL的kickstart安装ubuntu，通过已有的一台ubuntu的kickstart工具生成了cfg文件，结果中看不中用，clearpart不起作用，无法完全的无人值守安装，因为无法自动删除raid和lvm，所以安装的时候只好把设定好的raid及分区部分注释掉，然后通过文本安装页面进行配置。<br />另外openssh-server也木有安装好，只能通过console手工安装。<br /><br />cat ubuntu_ks.cfg<br />#Generated by Kickstart Configurator<br />#platform=AMD64 or Intel EM64T<br /><br />#System language<br />lang en_US<br />#Language modules to install<br />langsupport en_US<br />#System keyboard<br />keyboard us<br />#System mouse<br />mouse<br />#System timezone<br />timezone --utc America/New_York<br />#Root password<br />rootpw --iscrypted $1$dIx6XYId$Grao2hlnjSQCXCbmdShWW1<br />#Initial user<br />user fisher --fullname "2hei" --iscrypted --password $1$yFK9gVs1$L9RHTs7B6oClIC4fonT.s/<br />#Reboot after installation<br />reboot<br />#Use text mode install<br />#text<br />graphical<br />#Install OS instead of upgrade<br />install<br />#Use Web installation<br />url --url http://2hei.net/install/ubuntu/9.10/<br />#Clear the Master Boot Record<br />zerombr yes<br />#Partition clearing information<br />clearpart --all --initlabel<br />bootloader --location=mbr<br /><br />#Disk partitioning information<br />#part raid.11 --size 20480 --asprimary --ondisk sda<br />#part raid.12 --size 100 --asprimary --ondisk sda<br />#part raid.13 --size 8192 --ondisk sda<br />#part raid.14 --size 1 --grow --ondisk sda<br />#part raid.21 --size 20480 --asprimary --ondisk sdb<br />#part raid.22 --size 100 --asprimary --ondisk sdb<br />#part raid.23 --size 8192 --ondisk sdb<br />#part raid.24 --size 1 --grow --ondisk sdb<br />#raid / --level=1 --device=md1 raid.11 raid.21<br />#raid /boot --level=1 --device=md0 raid.12 raid.22<br />#raid swap --level=1 --device=md2 raid.13 raid.23<br />#raid&nbsp; --level=1 --device=md3 raid.14 raid.24<br />#System authorization infomation<br />auth&nbsp; --useshadow&nbsp; --enablemd5<br />#Network information<br />network --bootproto=static --ip=192.168.100.2 --netmask=255.255.255.0 --gateway=192.168.100.1 --nameserver=192.168.100.1 --device=eth0<br />#Firewall configuration<br />firewall --disabled --http --ssh<br />#X Window System configuration information<br />xconfig --depth=32 --resolution=800x600 --defaultdesktop=GNOME --startxonboot<br />%packages<br />@Ubuntu-desktop<br />openssh-server<br /><br /> ]]></description>
            <link>http://www.2hei.net/mt/2011/11/bug-of-kickstart-config-file-of-ubuntu.html</link>
            <guid>http://www.2hei.net/mt/2011/11/bug-of-kickstart-config-file-of-ubuntu.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">kickstart</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">ubuntu</category>
            
            <pubDate>Thu, 24 Nov 2011 22:14:49 +0800</pubDate>
        </item>
        
        <item>
            <title>pexpect Timeout exceeded in read_nonblocking()</title>
            <description><![CDATA[gg resolve from bbs:<br />vi /usr/lib/python2.6/site-packages/pxssh.py<br />#add line 134,135:<br />&nbsp;&nbsp;&nbsp; 123&nbsp;&nbsp;&nbsp;&nbsp; def synch_original_prompt (self):<br />&nbsp;&nbsp;&nbsp; 124 <br />&nbsp;&nbsp;&nbsp; 125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """This attempts to find the prompt. Basically, press enter and record<br />&nbsp;&nbsp;&nbsp; 126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the response; press enter again and record the response; if the two<br />&nbsp;&nbsp;&nbsp; 127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; responses are similar then assume we are at the original prompt. """<br />&nbsp;&nbsp;&nbsp; 128 <br />&nbsp;&nbsp;&nbsp; 129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # All of these timing pace values are magic.<br />&nbsp;&nbsp;&nbsp; 130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # I came up with these based on what seemed reliable for<br />&nbsp;&nbsp;&nbsp; 131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # connecting to a heavily loaded machine I have.<br />&nbsp;&nbsp;&nbsp; 132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If latency is worse than these values then this will fail.<br />&nbsp;&nbsp;&nbsp; 133 <br /><font style="font-size: 1.5625em;">&nbsp;&nbsp;&nbsp; 134&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.sendline()<br />&nbsp;&nbsp;&nbsp; 135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time.sleep(0.5)</font><br />&nbsp;&nbsp;&nbsp; 136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt<br />&nbsp;&nbsp;&nbsp; 137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time.sleep(0.1)<br /><br /><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Arial; font-size: 14px; line-height: 20px;">we just put something there before ssh </span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Arial; font-size: 14px; line-height: 20px;">expect </span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Arial; font-size: 14px; line-height: 20px;">read.</span></span> ]]></description>
            <link>http://www.2hei.net/mt/2011/10/pexpect-timeout-exceeded.html</link>
            <guid>http://www.2hei.net/mt/2011/10/pexpect-timeout-exceeded.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">python</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">pxssh</category>
            
            <pubDate>Mon, 24 Oct 2011 17:43:07 +0800</pubDate>
        </item>
        
        <item>
            <title>Linux Keyboard shortcut keys</title>
            <description><![CDATA[CTRL + C&nbsp;&nbsp;&nbsp; Cancels the currently running command.<br />CTRL + D&nbsp;&nbsp;&nbsp; Logs out of the current session.<br />CTRL + Z&nbsp;&nbsp;&nbsp; Cancels current operation, moves back a directory or takes the current operation and moves it to the background. <br />
CTRL + A&nbsp;&nbsp;&nbsp; Moves the cursor to first character.<br />CTRL + E&nbsp;&nbsp;&nbsp; Moves the cursor to last character.<br />CTRL + R&nbsp;&nbsp;&nbsp; Search history command<br />CTRL + W&nbsp;&nbsp;&nbsp; Deletes the last word typed in. For example, if you typed 'mv file1 file2' this shortcut would delete file2.<br />
CTRL + U&nbsp;&nbsp;&nbsp; Erases the complete line.<br />CTRL + P&nbsp;&nbsp;&nbsp; Paste previous line(s). same as up<br />CTRL + B&nbsp;&nbsp;&nbsp; Moves the cursor backward one character.<br />CTRL + F&nbsp;&nbsp;&nbsp; Moves the cursor forward one character.<br />CTRL + H&nbsp;&nbsp;&nbsp; Erase one character. Similar to pressing backspace.<br />
CTRL + S&nbsp;&nbsp;&nbsp; Stops all output on screen (XOFF).<br />CTRL + Q&nbsp;&nbsp;&nbsp; Turns all output stopped on screen back on (XON). ]]></description>
            <link>http://www.2hei.net/mt/2011/10/linux-keyboard-shortcut-keys.html</link>
            <guid>http://www.2hei.net/mt/2011/10/linux-keyboard-shortcut-keys.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">shortcut keys</category>
            
            <pubDate>Fri, 21 Oct 2011 12:45:16 +0800</pubDate>
        </item>
        
        <item>
            <title>nice linux</title>
            <description><![CDATA[<div>Just a mark:</div><div>nice -n 19 nice</div><div>19</div><div>sudo nice -n -20 nice</div><div>-20</div><div>-------------</div><div>$man nice</div><div><br /></div><div>NICE(1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;User Commands &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NICE(1)</div><div><br /></div><div>NAME</div><div>&nbsp;&nbsp; &nbsp; &nbsp; nice - run a program with modified scheduling priority</div><div><br /></div><div>SYNOPSIS</div><div>&nbsp;&nbsp; &nbsp; &nbsp; nice [OPTION] [COMMAND [ARG]...]</div><div><br /></div><div>DESCRIPTION</div><div>&nbsp;&nbsp; &nbsp; &nbsp; Run &nbsp;COMMAND &nbsp;with an adjusted niceness, which affects process scheduling. &nbsp;With no COMMAND, print the current nice-</div><div>&nbsp;&nbsp; &nbsp; &nbsp; ness. &nbsp;Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).</div><div><br /></div><div>&nbsp;&nbsp; &nbsp; &nbsp; -n, --adjustment=N</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add integer N to the niceness (default 10)</div><div><br /></div><div>&nbsp;&nbsp; &nbsp; &nbsp; --help display this help and exit</div><div><br /></div><div>&nbsp;&nbsp; &nbsp; &nbsp; --version</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output version information and exit</div><div><br /></div><div>&nbsp;&nbsp; &nbsp; &nbsp; NOTE: your shell may have its own version of nice, which usually supersedes &nbsp;the &nbsp;version &nbsp;described &nbsp;here. &nbsp; Please</div><div>&nbsp;&nbsp; &nbsp; &nbsp; refer to your shell?. documentation for details about the options it supports.</div> ]]></description>
            <link>http://www.2hei.net/mt/2011/09/nice-linux.html</link>
            <guid>http://www.2hei.net/mt/2011/09/nice-linux.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">nice</category>
            
            <pubDate>Thu, 15 Sep 2011 16:42:04 +0800</pubDate>
        </item>
        
        <item>
            <title>reset low speed USB device using ehci_hcd</title>
            <description><![CDATA[<div>dmesg has such logs:</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div><br /></div><div><b># modprobe --help</b></div><div>modprobe: unrecognized option `--help'</div><div>Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o &lt;modname&gt;] &lt;modname&gt; [parameters...]</div><div>modprobe -r [-n] [-i] [-v] &lt;modulename&gt; ...</div><div>modprobe -l -t &lt;dirname&gt; [ -a &lt;modulename&gt; ...]</div><div><br /></div><div><b>#modprobe -r ehci_hcd</b></div><div>Sep &nbsp;6 03:32:05 2hei.net kernel: usb 1-5.1: reset low speed USB device using ehci_hcd and address 4</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: ehci_hcd 0000:00:1d.7: remove, state 1</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb usb1: USB disconnect, address 1</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 1-5: USB disconnect, address 3</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 1-5.1: USB disconnect, address 4</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: ehci_hcd 0000:00:1d.7: USB bus 1 deregistered</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: ACPI: PCI interrupt for device 0000:00:1d.7 disabled</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 4-1: new full speed USB device using uhci_hcd and address 2</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 4-1: configuration #1 chosen from 1 choice</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: hub 4-1:1.0: USB hub found</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: hub 4-1:1.0: 3 ports detected</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 4-1.1: new full speed USB device using uhci_hcd and address 3</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: usb 4-1.1: configuration #1 chosen from 1 choice</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: input: American Megatrends Inc. Virtual Keyboard and Mouse as /class/input/input4</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: input: USB HID v1.10 Keyboard [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.2-1.1</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: input: American Megatrends Inc. Virtual Keyboard and Mouse as /class/input/input5</div><div>Sep &nbsp;6 03:33:44 2hei.net kernel: input: USB HID v1.10 Mouse [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.2-1.1</div> ]]></description>
            <link>http://www.2hei.net/mt/2011/09/reset-low-speed-usb-device-using-ehci-hcd.html</link>
            <guid>http://www.2hei.net/mt/2011/09/reset-low-speed-usb-device-using-ehci-hcd.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Tue, 06 Sep 2011 12:38:49 +0800</pubDate>
        </item>
        
        <item>
            <title>Linux will keep /tmp files for 10 days by default</title>
            <description><![CDATA[For files in /tmp directory, linux has cron at /etc/cron.daily to deal with:<br />[2hei.net cron.daily]$ cat tmpwatch <br />flags=-umc<br />/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \<br />&nbsp;&nbsp; &nbsp;-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp<br />/usr/sbin/tmpwatch "$flags" 720 /var/tmp<br />for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do<br />&nbsp;&nbsp;&nbsp; if [ -d "$d" ]; then<br />&nbsp;&nbsp; &nbsp;/usr/sbin/tmpwatch "$flags" -f 720 "$d"<br />&nbsp;&nbsp;&nbsp; fi<br />done<br /><br />Linux will keep 10 days files in /tmp and 30 days in /var/tmp by default.<br /><br />[2hei.net cron.daily]$ man tmpwatch<br />NAME<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpwatch - removes files which haven?. been accessed for a period of time<br /><br />SYNOPSIS<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpwatch [-u|-m|-c] [-MUadfqstvx] [--verbose] [--force] [--all]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [--nodirs] [--nosymlinks] [--test] [--fuser] [--quiet]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [--atime|--mtime|--ctime] [--dirmtime] [--exclude &lt;path&gt;]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [--exclude-user &lt;user&gt;] &lt;hours&gt; &lt;dirs&gt;<br />OPTIONS<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -u, --atime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Make the decision about deleting a file based on the file?. atime (access time). This is the default.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note that the periodic updatedb file system scans keep the atime of directories recent.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -m, --mtime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Make the decision about deleting a file based on the file?. mtime (modification time) instead of the atime.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -c, --ctime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Make the decision about deleting a file based on the file?. ctime (inode change time) instead of&nbsp; the&nbsp; atime;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for directories, make the decision based on the mtime.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -M, --dirmtime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Make&nbsp; the&nbsp; decision&nbsp; about deleting a directory based on the directory?. mtime (modification time) instead of<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the atime; completely ignore atime for directories.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -a, --all<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remove all file types, not just regular files, symbolic links and directories.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d, --nodirs<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do not attempt to remove directories, even if they are empty.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d, --nosymlinks<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do not attempt to remove symbolic links.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -f, --force<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remove files even if root doesn?. have write access (akin to rm -f).<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -q, --quiet<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Report only fatal errors.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -s, --fuser<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attempt to use the "fuser" command to see if a file is already open&nbsp; before&nbsp; removing&nbsp; it.&nbsp;&nbsp; Not&nbsp; enabled&nbsp; by<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default.&nbsp;&nbsp;&nbsp; Does&nbsp; help in some circumstances, but not all.&nbsp; Dependent on fuser being installed in /sbin.&nbsp; Not<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supported on HP-UX or Solaris.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -t, --test<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Don?. remove files, but go through the motions of removing them. This implies -v.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -U, --exclude-user=user<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Don?. remove files owned by user, which can be an user name or numeric user ID.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -v, --verbose<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print a verbose display. Two levels of verboseness are available -- use this option twice&nbsp; to&nbsp; get&nbsp; the&nbsp; most<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verbose output.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -x, --exclude=path<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Skip&nbsp; path;&nbsp; if&nbsp; path&nbsp; is a directory, all files contained in it are skipped too.&nbsp; If path does not exist, it<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; must be an absolute path that contains no symbolic links. ]]></description>
            <link>http://www.2hei.net/mt/2011/08/linux-will-keep-tmp-files-for-10-days-by-default.html</link>
            <guid>http://www.2hei.net/mt/2011/08/linux-will-keep-tmp-files-for-10-days-by-default.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Wed, 03 Aug 2011 19:01:07 +0800</pubDate>
        </item>
        
        <item>
            <title>从源码编译rpm，安装升级 openssl及openssh 最新版本</title>
            <description><![CDATA[当前版本：<br />$ ssh -V<br />OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008<br />目标版本：<br />openssh-5.8p2.tar.gz<br />openssl-0.9.8r.tar.gz<br /><br />compile and upgrade openssl-0.9.8r<br />wget http://www.openssl.org/source/openssl-0.9.8r.tar.gz<br />tar zxvf openssl-0.9.8r.tar.gz<br />mkdir -p /usr/src/redhat/SPECS/<br />mkdir -p /usr/src/redhat/SOURCES/<br />cp openssl-0.9.8r/openssl.spec /usr/src/redhat/SPECS/<br />cp openssl-0.9.8r.tar.gz /usr/src/redhat/SOURCES/<br />cd /usr/src/redhat/SPECS<br /><br />#源码自带的SPEC文件有点问题，需要替换一下关键字License<br />perl -i.bak -pe 's/^Copyright: Freely distributable$/License: Freely distributable/' openssl.spec<br /><br />[2hei.net ~]#rpmbuild -bb openssl.spec<br />#如果系统找不到rpmbuild，需要先安装<br />yum install rpm-build<br />yum install redhat-rpm-config<br />yum install pam-devel<br /><br />#安装结束：<br />---<br />Wrote: /usr/src/redhat/RPMS/i386/openssl-0.9.8r-1.i386.rpm<br />Wrote: /usr/src/redhat/RPMS/i386/openssl-devel-0.9.8r-1.i386.rpm<br />Wrote: /usr/src/redhat/RPMS/i386/openssl-doc-0.9.8r-1.i386.rpm<br />Wrote: /usr/src/redhat/RPMS/i386/openssl-debuginfo-0.9.8r-1.i386.rpm<br />Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.36929<br />+ umask 022<br />+ cd /usr/src/redhat/BUILD<br />+ cd openssl-0.9.8r<br />+ rm -rf /var/tmp/openssl-0.9.8r-root<br />+ exit 0<br />---<br />[2hei.net ~]#cd /usr/src/redhat/RPMS/i386/<br />ls -l<br />-rw-r--r-- 1 root root 1198354 Jul 22 15:31 openssl-0.9.8r-1.i386.rpm<br />-rw-r--r-- 1 root root&nbsp; 117348 Jul 22 15:31 openssl-debuginfo-0.9.8r-1.i386.rpm<br />-rw-r--r-- 1 root root 2149166 Jul 22 15:31 openssl-devel-0.9.8r-1.i386.rpm<br />-rw-r--r-- 1 root root&nbsp; 596803 Jul 22 15:31 openssl-doc-0.9.8r-1.i386.rpm<br />rpm -Uvh openssl*.rpm<br />error: Failed dependencies:<br />&nbsp;&nbsp; &nbsp;libcrypto.so.6 is needed by (installed) python-2.4.3-27.el5.i386<br />&nbsp;&nbsp; &nbsp;libcrypto.so.6 is needed by (installed) openldap-2.3.43-12.el5.i386<br />&nbsp;&nbsp; &nbsp;libcrypto.so.6 is needed by (installed) curl-7.15.5-9.el5.i386<br />&nbsp;&nbsp; &nbsp;libcrypto.so.6 is needed by (installed) net-snmp-libs-5.3.2.2-9.el5.i386<br />&nbsp;&nbsp; &nbsp;...<br />&nbsp;&nbsp; &nbsp;libssl.so.6 is needed by (installed) python-2.4.3-27.el5.i386<br />&nbsp;&nbsp; &nbsp;libssl.so.6 is needed by (installed) openldap-2.3.43-12.el5.i386<br />&nbsp;&nbsp; &nbsp;libssl.so.6 is needed by (installed) curl-7.15.5-9.el5.i386<br />&nbsp;&nbsp; &nbsp;...<br />use --nodeps force install<br />rpm --nodeps -Uvh openssl-*.rpm<br />Preparing...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [100%]<br />&nbsp;&nbsp; 1:openssl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [ 25%]<br />&nbsp;&nbsp; 2:openssl-debuginfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [ 50%]<br />&nbsp;&nbsp; 3:openssl-devel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [ 75%]<br />&nbsp;&nbsp; 4:openssl-doc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [100%]<br /><br />#添加旧的链接库链接，使之支持已安装的其他软件的依赖：<br />[2hei.net ~]#cd /usr/lib<br />ln -s libcrypto.so.0.9.8 libcrypto.so.6<br />ln -s libssl.so.0.9.8 libssl.so.6<br /><br />openssh的编译寄安装过程类似，不过要比openssl的简单一些，因为依赖关系少了很多，在此略去。。。<br /><br />#重启sshd服务：<br />service sshd restart<br />#检查版本：<br />[root@test-test01 ~]# ssh -V<br />OpenSSH_5.8p2, OpenSSL 0.9.8r 8 Feb 2011<br /><br />至此大功告成，不过升级openssl要谨慎，有可能影响其他服务，如httpd，openvpn等等，本文在vm上测试通过，权作记录备忘~<br /> ]]></description>
            <link>http://www.2hei.net/mt/2011/07/complile-src-to-rpm-openssl-openssh.html</link>
            <guid>http://www.2hei.net/mt/2011/07/complile-src-to-rpm-openssl-openssh.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">openssh</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">openssl</category>
            
            <pubDate>Fri, 22 Jul 2011 17:07:54 +0800</pubDate>
        </item>
        
        <item>
            <title>cassandra cluster install and configuration</title>
            <description><![CDATA[<b><font style="font-size: 1.25em;">1) Install</font></b><br /><br />http://labs.renren.com/apache-mirror/cassandra/0.7.6-2/apache-cassandra-0.7.6-2-bin.tar.gz(apache官网推荐人人的mirror，不过link有问题 ^_^)<br /><br />&nbsp; * tar -zxvf apache-cassandra-$VERSION.tar.gz<br />&nbsp; * cd apache-cassandra-$VERSION<br />&nbsp; * sudo mkdir -p /var/log/cassandra<br />&nbsp; * sudo chown -R `whoami` /var/log/cassandra<br />&nbsp; * sudo mkdir -p /var/lib/cassandra<br />&nbsp; * sudo chown -R `whoami` /var/lib/cassandra<br /><br /><br />Note: The sample configuration files in conf/ determine the file-system <br />locations Cassandra uses for logging and data storage. You are free to<br />change these to suit your own environment and adjust the path names<br />used here accordingly.<br /><br />Now that we're ready, let's start it up!<br />#start up front<br />&nbsp; * bin/cassandra -f<br /><br /><b><font style="font-size: 1.25em;">2) two nodes configuration:</font></b><br />node1:192.168.46.155<br />node2:192.168.46.179<br /><br /><br />[2hei.net conf]$ cat cassandra.yaml<br />cluster_name: 'Test Cluster'<br />initial_token:<br />auto_bootstrap: false<br />hinted_handoff_enabled: true<br />max_hint_window_in_ms: 3600000 # one hour<br />hinted_handoff_throttle_delay_in_ms: 50<br />authenticator: org.apache.cassandra.auth.AllowAllAuthenticator<br />authority: org.apache.cassandra.auth.AllowAllAuthority<br />partitioner: org.apache.cassandra.dht.RandomPartitioner<br />data_file_directories:<br />&nbsp;&nbsp;&nbsp; - /var/lib/cassandra/data<br />commitlog_directory: /var/lib/cassandra/commitlog<br />saved_caches_directory: /var/lib/cassandra/saved_caches<br />commitlog_rotation_threshold_in_mb: 128<br />commitlog_sync: periodic<br />commitlog_sync_period_in_ms: 10000<br />flush_largest_memtables_at: 0.75<br />reduce_cache_sizes_at: 0.85<br />reduce_cache_capacity_to: 0.6<br />seeds:<br />&nbsp;&nbsp;&nbsp; - node2<br />concurrent_reads: 32<br />concurrent_writes: 32<br />memtable_flush_queue_size: 4<br />sliced_buffer_size_in_kb: 64<br />storage_port: 7000<br />listen_address: 192.168.46.155<br />rpc_address: 0.0.0.0<br />rpc_port: 9160<br />rpc_keepalive: true<br />thrift_framed_transport_size_in_mb: 15<br />thrift_max_message_length_in_mb: 16<br />incremental_backups: false<br />snapshot_before_compaction: false<br />column_index_size_in_kb: 64<br />in_memory_compaction_limit_in_mb: 64<br />compaction_preheat_key_cache: true<br />rpc_timeout_in_ms: 10000<br />endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch<br />dynamic_snitch: true<br />dynamic_snitch_update_interval_in_ms: 100 <br />dynamic_snitch_reset_interval_in_ms: 600000<br />dynamic_snitch_badness_threshold: 0.0<br />request_scheduler: org.apache.cassandra.scheduler.NoScheduler<br />index_interval: 128<br /><br /><font style="font-size: 1.25em;"><b>the same as node2,just need change </b></font><br />seeds:<br />&nbsp;&nbsp;&nbsp; - node1<br /><br />cat /etc/hosts&nbsp;&nbsp; &nbsp;<br />192.168.46.155&nbsp; node1<br />192.168.46.179&nbsp; node2<br /><br /><b><font style="font-size: 1.25em;">Logs</font></b><br />#node1:<br />&nbsp;INFO 10:23:46,151 Listening for thrift clients...<br />&nbsp;INFO 10:23:46,315 Compacted to /var/lib/cassandra/data/system/LocationInfo-tmp-f-33-Data.db.&nbsp; 942 to 536 (~56% of original) bytes for 4 keys.&nbsp; Time: 178ms.<br />&nbsp;INFO 10:23:52,089 Node /192.168.46.179 has restarted, now UP again<br />&nbsp;INFO 10:23:52,095 Node /192.168.46.179 state jump to normal<br />&nbsp;INFO 10:24:02,177 Deleted /var/lib/cassandra/data/system/LocationInfo-f-32<br />&nbsp;INFO 10:24:02,179 Deleted /var/lib/cassandra/data/system/LocationInfo-f-31<br />&nbsp;INFO 10:24:52,097 Started hinted handoff for endpoint /192.168.46.179<br />&nbsp;INFO 10:24:52,100 Finished hinted handoff of 0 rows to endpoint /192.168.46.179 &nbsp;<br />#node2:<br />&nbsp;INFO 10:23:51,930 Binding thrift service to /0.0.0.0:9160<br />&nbsp;INFO 10:23:51,939 Using TFastFramedTransport with a max frame size of 15728640 bytes.<br />&nbsp;INFO 10:23:51,988 Listening for thrift clients...<br />&nbsp;INFO 10:23:52,133 Node /192.168.46.155 has restarted, now UP again<br />&nbsp;INFO 10:23:52,137 Node /192.168.46.155 state jump to normal<br />&nbsp;INFO 10:23:53,548 InetAddress /192.168.46.155 is now dead.<br />&nbsp;INFO 10:23:53,646 InetAddress /192.168.46.155 is now UP<br />&nbsp;INFO 10:24:33,362 Started hinted handoff for endpoint /192.168.46.155<br />&nbsp;INFO 10:24:33,365 Finished hinted handoff of 0 rows to endpoint /192.168.46.155<br />&nbsp;<br /><b><font style="font-size: 1.25em;">3) use cassandra:</font></b><br /><b>#check cluster:</b><br />[2hei.net apache-cassandra-0.7.6-2]$ bin/nodetool -host localhost ring<br />Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Status State&nbsp;&nbsp; Load&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owns&nbsp;&nbsp;&nbsp; Token&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 168969914150282478893277211064871807700&nbsp;&nbsp;&nbsp;&nbsp; <br />192.168.46.155&nbsp;&nbsp; Up&nbsp;&nbsp;&nbsp;&nbsp; Normal&nbsp; 53.28 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 42.38%&nbsp; 70927753273796620281025030712152398970&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />192.168.46.179&nbsp;&nbsp; Up&nbsp;&nbsp;&nbsp;&nbsp; Normal&nbsp; 45.16 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57.62%&nbsp; 168969914150282478893277211064871807700 <br /><br /><b>#use cassandra-cli:</b><br />[2hei.net apache-cassandra-0.7.6-2]$bin/cassandra-cli --host localhost<br />[default@unknown] create keyspace FisherKeyspace;<br />2b1e86b8-ac65-11e0-9677-2edcd0f45bc6<br />Waiting for schema agreement...<br />... schemas agree across the cluster<br />[default@unknown] use FisherKeyspace;<br />Authenticated to keyspace: FisherKeyspace<br />[default@FisherKeyspace] create column family 2hei with comparator=UTF8Type and default_validation_class=UTF8Type;<br />3a0e8809-ac65-11e0-9677-2edcd0f45bc6<br />Waiting for schema agreement...<br />... schemas agree across the cluster<br />[default@FisherKeyspace] set Users[2hei][first] = 'Fisher';<br />Users not found in current keyspace.<br />[default@FisherKeyspace] set 2hei[2hei][first] = 'Fisher';<br />Value inserted.<br />[default@FisherKeyspace]&nbsp; set 2hei[2hei][last] = 'fishman';<br />Value inserted.<br />[default@FisherKeyspace] set 2hei[2hei][age] = long(42);<br />Value inserted.<br />[default@FisherKeyspace] get 2hei[2hei];<br />=&gt; (column=age, value=42, timestamp=1310461245929000)<br />=&gt; (column=first, value=Fisher, timestamp=1310461237981000)<br />=&gt; (column=last, value=fishman, timestamp=1310461242014000)<br />Returned 3 results. <br /><br />[default@unknown] show keyspaces; <br />Keyspace: FisherKeyspace:<br />&nbsp; Replication Strategy: org.apache.cassandra.locator.SimpleStrategy<br />&nbsp;&nbsp;&nbsp; Replication Factor: 1<br />&nbsp; Column Families:<br />&nbsp;&nbsp;&nbsp; ColumnFamily: 2hei<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default_validation_class: org.apache.cassandra.db.marshal.UTF8Type<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Row cache size / save period in seconds: 0.0/0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Key cache size / save period in seconds: 200000.0/14400<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Memtable thresholds: 0.0234375/5/1440 (millions of ops/minutes/MB)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GC grace seconds: 864000<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Compaction min/max thresholds: 4/32<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Read repair chance: 1.0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Built indexes: []<br /><br /><b>#other useful command of nodetool</b><br />bin/nodetool -host localhost ring<br />bin/nodetool -host localhost info<br />[2hei.net apache-cassandra-0.7.6-2]$ bin/nodetool -host localhost info<br />70927753273796620281025030712152398970<br />Gossip active&nbsp;&nbsp;&nbsp; : true<br />Load&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 57.4 KB<br />Generation No&nbsp;&nbsp;&nbsp; : 1310523824<br />Uptime (seconds) : 645<br />Heap Memory (MB) : 25.27 / 183.31<br />[2hei.net apache-cassandra-0.7.6-2]$ bin/nodetool -host localhost cfstats<br />Keyspace: FisherKeyspace<br />&nbsp;&nbsp;&nbsp; Read Count: 0<br />&nbsp;&nbsp;&nbsp; Read Latency: NaN ms.<br />&nbsp;&nbsp;&nbsp; Write Count: 0<br />&nbsp;&nbsp;&nbsp; Write Latency: NaN ms.<br />&nbsp;&nbsp;&nbsp; Pending Tasks: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Column Family: 2hei<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SSTable count: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Space used (live): 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Space used (total): 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Memtable Columns Count: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Memtable Data Size: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Memtable Switch Count: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Read Count: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Read Latency: NaN ms.<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write Count: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write Latency: NaN ms.<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Pending Tasks: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Key cache capacity: 200000<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Key cache size: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Key cache hit rate: NaN<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Row cache: disabled<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Compacted row minimum size: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Compacted row maximum size: 0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Compacted row mean size: 0<br /><br />--------------------------------<br />接下来会继续完善cassandra的应用及api。<br /><br />&nbsp;]]></description>
            <link>http://www.2hei.net/mt/2011/07/cassandra-cluster-install-and-configuration.html</link>
            <guid>http://www.2hei.net/mt/2011/07/cassandra-cluster-install-and-configuration.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">cassandra</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">cluster</category>
            
            <pubDate>Wed, 13 Jul 2011 11:17:11 +0800</pubDate>
        </item>
        
        <item>
            <title>Smartctl: Device Read Identity Failed</title>
            <description><![CDATA[/usr/sbin/smartctl --all /dev/sda -d ata <br />smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen<br />Home page is http://smartmontools.sourceforge.net/<br />Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)<br /><br />A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.<br /><br />#my ENV:<br />[2hei.net ~]$ uname -a<br />Linux 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux<br />[2hei.net ~]$ cat /etc/redhat-release <br />CentOS release 5.5 (Final)<br />[2hei.net ~]# rpm -qa|grep smart<br />smartmontools-5.38-2.el5<br />[2hei.net ~]# rpm -qf /usr/sbin/smartctl<br />smartmontools-5.38-2.el5<br /><br />Looks Sata discs are not accessed via the '-d ata' option<br />#smartctl --help<br />&nbsp; -d TYPE, --device=TYPE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Specify device type to one of: ata, scsi, marvell, sat, 3ware,N<br /><br />#get rid of -d ata&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <br />[2hei.net ~]# /usr/sbin/smartctl --all /dev/sda<br />smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen<br />Home page is http://smartmontools.sourceforge.net/<br /><br />=== START OF INFORMATION SECTION ===<br />Device Model:&nbsp;&nbsp;&nbsp;&nbsp; WDC WD1002FBYS-02A6B0<br />Serial Number:&nbsp;&nbsp;&nbsp; WD-WMATV6555969<br />Firmware Version: 03.00C06<br />User Capacity:&nbsp;&nbsp;&nbsp; 1,000,204,886,016 bytes<br />Device is:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Not in smartctl database [for details use: -P showall]<br />ATA Version is:&nbsp;&nbsp; 8<br />ATA Standard is:&nbsp; Exact ATA specification draft version not indicated<br />Local Time is:&nbsp;&nbsp;&nbsp; Wed Jul&nbsp; 6 03:32:03 2011 UTC<br />SMART support is: Available - device has SMART capability.<br />SMART support is: Enabled<br /><br />=== START OF READ SMART DATA SECTION ===<br />SMART overall-health self-assessment test result: PASSED<br /><br />General SMART Values:<br />Offline data collection status:&nbsp; (0x84)&nbsp;&nbsp; &nbsp;Offline data collection activity<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;was suspended by an interrupting command from host.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Auto Offline Data Collection: Enabled.<br />Self-test execution status:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;&nbsp; 0)&nbsp;&nbsp; &nbsp;The previous self-test routine completed<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;without error or no self-test has ever <br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;been run.<br />Total time to complete Offline <br />data collection: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; (18600) seconds.<br />Offline data collection<br />capabilities: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; (0x7b) SMART execute Offline immediate.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Auto Offline data collection on/off support.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Suspend Offline collection upon new<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;command.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Offline surface scan supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Self-test supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Conveyance Self-test supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Selective Self-test supported.<br />SMART capabilities:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x0003)&nbsp;&nbsp; &nbsp;Saves SMART data before entering<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;power-saving mode.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Supports SMART auto save timer.<br />Error logging capability:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x01)&nbsp;&nbsp; &nbsp;Error logging supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;General Purpose Logging supported.<br />Short self-test routine <br />recommended polling time: &nbsp;&nbsp; &nbsp; (&nbsp;&nbsp; 2) minutes.<br />Extended self-test routine<br />recommended polling time: &nbsp;&nbsp; &nbsp; ( 214) minutes.<br />Conveyance self-test routine<br />recommended polling time: &nbsp;&nbsp; &nbsp; (&nbsp;&nbsp; 5) minutes.<br />SCT capabilities: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x303f)&nbsp;&nbsp; &nbsp;SCT Status supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SCT Feature Control supported.<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SCT Data Table supported.<br /><br />SMART Attributes Data Structure revision number: 16<br />Vendor Specific SMART Attributes with Thresholds:<br />ID# ATTRIBUTE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FLAG&nbsp;&nbsp;&nbsp;&nbsp; VALUE WORST THRESH TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATED&nbsp; WHEN_FAILED RAW_VALUE<br />&nbsp; 1 Raw_Read_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp; 0x002f&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 051&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp; 3 Spin_Up_Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0027&nbsp;&nbsp; 253&nbsp;&nbsp; 253&nbsp;&nbsp; 021&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1100<br />&nbsp; 4 Start_Stop_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28<br />&nbsp; 5 Reallocated_Sector_Ct&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 140&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp; 7 Seek_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x002e&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp; 9 Power_On_Hours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 089&nbsp;&nbsp; 089&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8195<br />&nbsp;10 Spin_Retry_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp;11 Calibration_Retry_Count 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp;12 Power_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26<br />192 Power-Off_Retract_Count 0x0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25<br />193 Load_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br />194 Temperature_Celsius&nbsp;&nbsp;&nbsp;&nbsp; 0x0022&nbsp;&nbsp; 116&nbsp;&nbsp; 112&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34<br />196 Reallocated_Event_Count 0x0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />197 Current_Pending_Sector&nbsp; 0x0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />198 Offline_Uncorrectable&nbsp;&nbsp; 0x0030&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />199 UDMA_CRC_Error_Count&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />200 Multi_Zone_Error_Rate&nbsp;&nbsp; 0x0008&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br /><br />SMART Error Log Version: 1<br />No Errors Logged<br /><br />SMART Self-test log structure revision number 1<br />Num&nbsp; Test_Description&nbsp;&nbsp;&nbsp; Status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remaining&nbsp; LifeTime(hours)&nbsp; LBA_of_first_error<br /># 1&nbsp; Extended offline&nbsp;&nbsp;&nbsp; Completed without error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -<br /># 2&nbsp; Short offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Completed without error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8189&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -<br /><br />SMART Selective self-test log data structure revision number 1<br />&nbsp;SPAN&nbsp; MIN_LBA&nbsp; MAX_LBA&nbsp; CURRENT_TEST_STATUS<br />&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; Not_testing<br />&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; Not_testing<br />&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; Not_testing<br />&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; Not_testing<br />&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; Not_testing<br />Selective self-test flags (0x0):<br />&nbsp; After scanning selected spans, do NOT read-scan remainder of disk.<br />If Selective self-test is pending on power-up, resume after 0 minute delay.<br /><br />also some said libata patch is needed! ]]></description>
            <link>http://www.2hei.net/mt/2011/07/smartctl-device-read-identity-failed.html</link>
            <guid>http://www.2hei.net/mt/2011/07/smartctl-device-read-identity-failed.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">smartctl</category>
            
            <pubDate>Wed, 06 Jul 2011 14:58:58 +0800</pubDate>
        </item>
        
        <item>
            <title>linux 入侵监测工具 chkrootkit </title>
            <description><![CDATA[wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz<br /><br />compile:<br />make sense<br />gcc -DHAVE_LASTLOG_H -o chklastlog chklastlog.c<br />gcc -DHAVE_LASTLOG_H -o chkwtmp chkwtmp.c<br />chkwtmp.c: In function ?.ain?.<br />chkwtmp.c:95: warning: incompatible implicit declaration of built-in function ?.xit?<br />gcc -DHAVE_LASTLOG_H&nbsp;&nbsp; -D_FILE_OFFSET_BITS=64 -o ifpromisc ifpromisc.c<br />gcc&nbsp; -o chkproc chkproc.c<br />gcc&nbsp; -o chkdirs chkdirs.c<br />gcc&nbsp; -o check_wtmpx check_wtmpx.c<br />gcc -static&nbsp; -o strings-static strings.c<br />gcc&nbsp; -o chkutmp chkutmp.c<br /><br />Usage: ./chkrootkit [options] [testname ...]<br />&nbsp;Options:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show this help and exit<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show version information and exit<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show available tests<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -q&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; quiet mode<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expert mode<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -r dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use dir as the root directory<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -p dir1:dir2:dirN path for the external commands used by chkrootkit<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; skip NFS mounted dirs<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <br />sudo ./chkrootkit <br />ROOTDIR is `/'<br />Checking `amd'... not found<br />Checking `basename'... not infected<br />Checking `biff'... not found<br />Checking `chfn'... not infected<br />Checking `chsh'... not infected<br />Checking `cron'... not infected<br />Checking `crontab'... not infected<br />Checking `date'... not infected<br />Checking `du'... not infected<br />Checking `dirname'... not infected<br />Checking `echo'... not infected<br />Checking `egrep'... not infected<br />Checking `env'... not infected<br />Checking `find'... not infected<br />Checking `fingerd'... not found<br />Checking `gpm'... not infected<br />Checking `grep'... not infected<br />Checking `hdparm'... not infected<br />Checking `su'... not infected<br />Checking `ifconfig'... not infected<br />Checking `inetd'... not tested<br />Checking `inetdconf'... not found<br />Checking `identd'... not found<br />Checking `init'... not infected<br />Checking `killall'... not infected<br />Checking `ldsopreload'... not infected<br />Checking `login'... not infected<br />Checking `ls'... not infected<br />Checking `lsof'... not infected<br />Checking `mail'... not infected<br />Checking `mingetty'... not infected<br />Checking `netstat'... not infected<br />Checking `named'... not infected<br />Checking `passwd'... not infected<br />Checking `pidof'... not infected<br />Checking `pop2'... not found<br />Checking `pop3'... not found<br />Checking `ps'... not infected<br />Checking `pstree'... not infected<br />Checking `rpcinfo'... not infected<br />Checking `rlogind'... not found<br />Checking `rshd'... not found<br />Checking `slogin'... not infected<br />Checking `sendmail'... not infected<br />Checking `sshd'... not infected<br />Checking `syslogd'... not infected<br />Checking `tar'... not infected<br />Checking `tcpd'... not infected<br />Checking `tcpdump'... not infected<br />Checking `top'... not infected<br />Checking `telnetd'... not found<br />Checking `timed'... not found<br />Checking `traceroute'... not infected<br />Checking `vdir'... not infected<br />Checking `w'... not infected<br />Checking `write'... not infected<br />Checking `aliens'... no suspect files<br />Searching for sniffer's logs, it may take a while... nothing found<br />Searching for HiDrootkit's default dir... nothing found<br />Searching for t0rn's default files and dirs... nothing found<br />Searching for t0rn's v8 defaults... nothing found<br />Searching for Lion Worm default files and dirs... nothing found<br />Searching for RSHA's default files and dir... nothing found<br />Searching for RH-Sharpe's default files... nothing found<br />Searching for Ambient's rootkit (ark) default files and dirs... nothing found<br />Searching for suspicious files and dirs, it may take a while... <br />/usr/lib/gtk-2.0/immodules/.relocation-tag /lib/.libssl.so.0.9.8e.hmac /lib/.libcrypto.so.6.hmac /lib/.libcrypto.so.0.9.8e.hmac /lib/.libssl.so.6.hmac<br /><br />Searching for LPD Worm files and dirs... nothing found<br />Searching for Ramen Worm files and dirs... nothing found<br />Searching for Maniac files and dirs... nothing found<br />Searching for RK17 files and dirs... nothing found<br />Searching for Ducoci rootkit... nothing found<br />Searching for Adore Worm... nothing found<br />Searching for ShitC Worm... nothing found<br />Searching for Omega Worm... nothing found<br />Searching for Sadmind/IIS Worm... nothing found<br />Searching for MonKit... nothing found<br />Searching for Showtee... nothing found<br />Searching for OpticKit... nothing found<br />Searching for T.R.K... nothing found<br />Searching for Mithra... nothing found<br />Searching for LOC rootkit... nothing found<br />Searching for Romanian rootkit... nothing found<br />Searching for HKRK rootkit... nothing found<br />Searching for Suckit rootkit... nothing found<br />Searching for Volc rootkit... nothing found<br />Searching for Gold2 rootkit... nothing found<br />Searching for TC2 Worm default files and dirs... nothing found<br />Searching for Anonoying rootkit default files and dirs... nothing found<br />Searching for ZK rootkit default files and dirs... nothing found<br />Searching for ShKit rootkit default files and dirs... nothing found<br />Searching for AjaKit rootkit default files and dirs... nothing found<br />Searching for zaRwT rootkit default files and dirs... nothing found<br />Searching for Madalin rootkit default files... nothing found<br />Searching for Fu rootkit default files... nothing found<br />Searching for ESRK rootkit default files... nothing found<br />Searching for rootedoor... nothing found<br />Searching for ENYELKM rootkit default files... nothing found<br />Searching for common ssh-scanners default files... nothing found<br />Searching for suspect PHP files... nothing found<br />Searching for anomalies in shell history files... nothing found<br />Checking `asp'... not infected<br />Checking `bindshell'... not infected<br />Checking `lkm'... chkproc: nothing detected<br />chkdirs: nothing detected<br />Checking `rexedcs'... not found<br />Checking `sniffer'... eth0: not promisc and no PF_PACKET sockets<br />eth0: not promisc and no PF_PACKET sockets<br />eth1: PF_PACKET(/usr/sbin/dhcpd)<br />Checking `w55808'... not infected<br />Checking `wted'... chkwtmp: nothing deleted<br />Checking `scalper'... not infected<br />Checking `slapper'... not infected<br />Checking `z2'... chklastlog: nothing deleted<br />Checking `chkutmp'... chkutmp: nothing deleted<br />Checking `OSX_RSPLUG'... not infected<br /><br />&nbsp;]]></description>
            <link>http://www.2hei.net/mt/2011/06/linux-chkrootkit.html</link>
            <guid>http://www.2hei.net/mt/2011/06/linux-chkrootkit.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">OpenSource</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">chkrootkit</category>
            
            <pubDate>Thu, 23 Jun 2011 18:48:24 +0800</pubDate>
        </item>
        
        <item>
            <title>Set Default Value on Shell</title>
            <description><![CDATA[#!/bin/sh<br /># v_test.sh<br /># by 2hei.net&nbsp; 06/22/2011<br />#<br />#get param from command line<br />fisr_param=$1<br />second_param=$2<br /><br />#set default value when null<br />fisr_param=${fisr_param:="First"} <br />second_param=${second_param:="Second"}<br /><br />#print values<br />printf "fisr_param:\t"$fisr_param"\n"<br />printf "second_param:\t"$second_param"\n"<br /><br /><br />Run script...<br />#no params<br />[localhost]$sh v_test.sh <br />fisr_param:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; First<br />second_param:&nbsp; Second<br /><br />#add params<br />[localhost]$sh v_test.sh hello baby<br />fisr_param:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hello<br />second_param:&nbsp; baby<br /><br /> ]]></description>
            <link>http://www.2hei.net/mt/2011/06/set-default-value-on-shell.html</link>
            <guid>http://www.2hei.net/mt/2011/06/set-default-value-on-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>Wed, 22 Jun 2011 18:00:00 +0800</pubDate>
        </item>
        
        <item>
            <title>ATA bus error SError: { PHYRdyChg DevExch }</title>
            <description><![CDATA[<div>ATA bus error in /var/log/messages:</div><div><br /></div><div>SCSI device sdb: 490350672 512-byte hdwr sectors (251060 MB)</div><div>sdb: Write Protect is off</div><div>sdb: Mode Sense: 00 3a 00 00</div><div>SCSI device sdb: drive cache: write back</div><div>ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen</div><div>ata1.00: irq_stat 0x00400040, connection status changed</div><div>ata1: SError: { PHYRdyChg DevExch }</div><div>ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; res 40/00:c4:d1:67:e4/00:00:03:00:00/40 Emask 0x10 (ATA bus error)</div><div>ata1.00: status: { DRDY }</div><div>ata1: hard resetting link</div><div>ata1: link is slow to respond, please be patient (ready=0)</div><div>ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)</div><div>ata1.00: configured for UDMA/133</div><div>ata1: EH complete</div><div>SCSI device sda: 490350672 512-byte hdwr sectors (251060 MB)</div><div>sda: Write Protect is off</div><div>sda: Mode Sense: 00 3a 00 00</div><div>SCSI device sda: drive cache: write back</div><div>md: syncing RAID array md0</div><div>md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.</div><div>md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.</div><div>md: using 128k window, over a total of 104320 blocks.</div><div>md: delaying resync of md1 until md0 has finished resync (they share one or more physical units)</div><div>md: md0: sync done.</div><div>md: syncing RAID array md1</div><div>RAID1 conf printout:</div><div>md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.</div><div>md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.</div><div>md: using 128k window, over a total of 8385856 blocks.</div><div>&nbsp;--- wd:2 rd:2</div><div>&nbsp;disk 0, wo:0, o:1, dev:sda1</div><div>&nbsp;disk 1, wo:0, o:1, dev:sdb1</div><div>md: md1: sync done.</div><div>RAID1 conf printout:</div><div>&nbsp;--- wd:2 rd:2</div><div>&nbsp;disk 0, wo:0, o:1, dev:sda2</div><div>&nbsp;disk 1, wo:0, o:1, dev:sdb2</div><div><br /></div><div>&nbsp;cat /proc/mdstat&nbsp;</div><div>Personalities : [raid1]&nbsp;</div><div>md0 : active raid1 sdb1[1] sda1[0]</div><div>&nbsp;&nbsp; &nbsp; &nbsp;104320 blocks [2/2] [UU] &nbsp; &nbsp; &nbsp;</div><div>md1 : active raid1 sdb2[1] sda2[0]</div><div>&nbsp;&nbsp; &nbsp; &nbsp;8385856 blocks [2/2] [UU] &nbsp; &nbsp; &nbsp;</div><div>md2 : active raid1 sdb3[1] sda3[0]</div><div>&nbsp;&nbsp; &nbsp; &nbsp;236677504 blocks [2/2] [UU]</div><div><br /></div><div>smartctl -a /dev/sdb</div><div>smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen</div><div>Home page is http://smartmontools.sourceforge.net/</div><div><br /></div><div>=== START OF INFORMATION SECTION ===</div><div>Device Model: &nbsp; &nbsp; WDC WD2502ABYS-01B7A0</div><div>Serial Number: &nbsp; &nbsp;WD-WCAT1C148773</div><div>Firmware Version: 02.03B02</div><div>User Capacity: &nbsp; &nbsp;251,059,544,064 bytes</div><div>Device is: &nbsp; &nbsp; &nbsp; &nbsp;Not in smartctl database [for details use: -P showall]</div><div>ATA Version is: &nbsp; 8</div><div>ATA Standard is: &nbsp;Exact ATA specification draft version not indicated</div><div>Local Time is: &nbsp; &nbsp;Mon Jun 20 03:23:22 2011 UTC</div><div>SMART support is: Available - device has SMART capability.</div><div>SMART support is: Enabled</div><div><br /></div><div>=== START OF READ SMART DATA SECTION ===</div><div>SMART overall-health self-assessment test result: PASSED</div><div><br /></div><div>General SMART Values:</div><div>Offline data collection status: &nbsp;(0x84)<span class="Apple-tab-span" style="white-space:pre">	</span>Offline data collection activity</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>was suspended by an interrupting command from host.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Auto Offline Data Collection: Enabled.</div><div>Self-test execution status: &nbsp; &nbsp; &nbsp;( &nbsp; 0)<span class="Apple-tab-span" style="white-space:pre">	</span>The previous self-test routine completed</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>without error or no self-test has ever&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>been run.</div><div>Total time to complete Offline&nbsp;</div><div>data collection: <span class="Apple-tab-span" style="white-space:pre">		</span> (4800) seconds.</div><div>Offline data collection</div><div>capabilities: <span class="Apple-tab-span" style="white-space:pre">			</span> (0x7b) SMART execute Offline immediate.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Auto Offline data collection on/off support.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Suspend Offline collection upon new</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>command.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Offline surface scan supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Self-test supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Conveyance Self-test supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Selective Self-test supported.</div><div>SMART capabilities: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(0x0003)<span class="Apple-tab-span" style="white-space:pre">	</span>Saves SMART data before entering</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>power-saving mode.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>Supports SMART auto save timer.</div><div>Error logging capability: &nbsp; &nbsp; &nbsp; &nbsp;(0x01)<span class="Apple-tab-span" style="white-space:pre">	</span>Error logging supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>General Purpose Logging supported.</div><div>Short self-test routine&nbsp;</div><div>recommended polling time: <span class="Apple-tab-span" style="white-space:pre">	</span> ( &nbsp; 2) minutes.</div><div>Extended self-test routine</div><div>recommended polling time: <span class="Apple-tab-span" style="white-space:pre">	</span> ( &nbsp;59) minutes.</div><div>Conveyance self-test routine</div><div>recommended polling time: <span class="Apple-tab-span" style="white-space:pre">	</span> ( &nbsp; 5) minutes.</div><div>SCT capabilities: <span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; (0x303f)<span class="Apple-tab-span" style="white-space:pre">	</span>SCT Status supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>SCT Feature Control supported.</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>SCT Data Table supported.</div><div><br /></div><div>SMART Attributes Data Structure revision number: 16</div><div>Vendor Specific SMART Attributes with Thresholds:</div><div>ID# ATTRIBUTE_NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLAG &nbsp; &nbsp; VALUE WORST THRESH TYPE &nbsp; &nbsp; &nbsp;UPDATED &nbsp;WHEN_FAILED RAW_VALUE</div><div>&nbsp;&nbsp;1 Raw_Read_Error_Rate &nbsp; &nbsp; 0x002f &nbsp; 200 &nbsp; 200 &nbsp; 051 &nbsp; &nbsp;Pre-fail &nbsp;Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>&nbsp;&nbsp;3 Spin_Up_Time &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x0027 &nbsp; 200 &nbsp; 195 &nbsp; 021 &nbsp; &nbsp;Pre-fail &nbsp;Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 1000</div><div>&nbsp;&nbsp;4 Start_Stop_Count &nbsp; &nbsp; &nbsp; &nbsp;0x0032 &nbsp; 100 &nbsp; 100 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 36</div><div>&nbsp;&nbsp;5 Reallocated_Sector_Ct &nbsp; 0x0033 &nbsp; 200 &nbsp; 200 &nbsp; 140 &nbsp; &nbsp;Pre-fail &nbsp;Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>&nbsp;&nbsp;7 Seek_Error_Rate &nbsp; &nbsp; &nbsp; &nbsp; 0x002e &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>&nbsp;&nbsp;9 Power_On_Hours &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x0032 &nbsp; 078 &nbsp; 078 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 16351</div><div>&nbsp;10 Spin_Retry_Count &nbsp; &nbsp; &nbsp; &nbsp;0x0032 &nbsp; 100 &nbsp; 253 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>&nbsp;11 Calibration_Retry_Count 0x0032 &nbsp; 100 &nbsp; 253 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>&nbsp;12 Power_Cycle_Count &nbsp; &nbsp; &nbsp; 0x0032 &nbsp; 100 &nbsp; 100 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 33</div><div>192 Power-Off_Retract_Count 0x0032 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 30</div><div>193 Load_Cycle_Count &nbsp; &nbsp; &nbsp; &nbsp;0x0032 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 36</div><div>194 Temperature_Celsius &nbsp; &nbsp; 0x0022 &nbsp; 112 &nbsp; 099 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 31</div><div>196 Reallocated_Event_Count 0x0032 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>197 Current_Pending_Sector &nbsp;0x0032 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>198 Offline_Uncorrectable &nbsp; 0x0030 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Offline &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; 1</div><div>199 UDMA_CRC_Error_Count &nbsp; &nbsp;0x0032 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Always &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0</div><div>200 Multi_Zone_Error_Rate &nbsp; 0x0008 &nbsp; 200 &nbsp; 200 &nbsp; 000 &nbsp; &nbsp;Old_age &nbsp; Offline &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; 1</div><div><br /></div><div>SMART Error Log Version: 1</div><div>No Errors Logged</div><div><br /></div><div>SMART Self-test log structure revision number 1</div><div>Num &nbsp;Test_Description &nbsp; &nbsp;Status &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Remaining &nbsp;LifeTime(hours) &nbsp;LBA_of_first_error</div><div># 1 &nbsp;Extended offline &nbsp; &nbsp;Completed without error &nbsp; &nbsp; &nbsp; 00% &nbsp; &nbsp; &nbsp; &nbsp;51 &nbsp; &nbsp; &nbsp; &nbsp; -</div><div><br /></div><div>SMART Selective self-test log data structure revision number 1</div><div>&nbsp;SPAN &nbsp;MIN_LBA &nbsp;MAX_LBA &nbsp;CURRENT_TEST_STATUS</div><div>&nbsp;&nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;Not_testing</div><div>&nbsp;&nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;Not_testing</div><div>&nbsp;&nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;Not_testing</div><div>&nbsp;&nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;Not_testing</div><div>&nbsp;&nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;Not_testing</div><div>Selective self-test flags (0x0):</div><div>&nbsp;&nbsp;After scanning selected spans, do NOT read-scan remainder of disk.</div><div>If Selective self-test is pending on power-up, resume after 0 minute delay.</div><div><br /></div><div><br /></div><div>Poor quality SATA cables possibly,may need change SATA cables.</div><div><br /></div><div>ref link:</div><div>https://ata.wiki.kernel.org/index.php/Libata_error_messages</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp;</div><div><br /></div> ]]></description>
            <link>http://www.2hei.net/mt/2011/06/ata-bus-error.html</link>
            <guid>http://www.2hei.net/mt/2011/06/ata-bus-error.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Mon, 20 Jun 2011 14:30:08 +0800</pubDate>
        </item>
        
        <item>
            <title>linux 环境变量中配置参数 use function but not use alias </title>
            <description><![CDATA[<div>例子：使用两个参数匹配域名，其他部分自动补齐，减少键盘输入，然后ssh登陆到目的主机。</div><div>cat .bashrc&nbsp;</div><div># .bashrc</div><div><br /></div><div># Source global definitions</div><div>if [ -f /etc/bashrc ]; then</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>. /etc/bashrc</div><div>fi</div><div><br /></div><div># update the PATH</div><div>export PATH=${PATH}:/usr/sbin:/sbin</div><div><br /></div><div>sss() {</div><div>&nbsp;&nbsp;ssh $1.$2.2hei.net</div><div>}</div><div><br /></div><div>use:</div><div>$sss test blog&nbsp;</div><div>The authenticity of host 'test.blog.2hei.net (192.168.1.12)' can't be established.</div><div>RSA key fingerprint is 00:45:c8:28:29:cd:a6:50:26:a6:5d:23:a4:fb:10:9a.</div><div>Are you sure you want to continue connecting (yes/no)? yes</div><div>Warning: Permanently added 'test.blog.2hei.net,192.168.1.12' (RSA) to the list of known hosts.</div><div>2hei@test.blog.2hei.net's password:&nbsp;</div><div>Last login: Thu Jun &nbsp;9 06:12:21 2011 from 192.168.1.11</div><div>Kickstart-installed Red Hat Linux Wed Sep 15 22:25:51 UTC 2010</div><div>$</div><div><br /></div> ]]></description>
            <link>http://www.2hei.net/mt/2011/06/linux-use-function-but-not-use-alias.html</link>
            <guid>http://www.2hei.net/mt/2011/06/linux-use-function-but-not-use-alias.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Mon, 20 Jun 2011 11:33:17 +0800</pubDate>
        </item>
        
    </channel>
</rss>

