<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bongbank&#039;s Site &#187; Linux</title>
	<atom:link href="http://www.bongbank.net/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bongbank.net</link>
	<description>เว็บบล๊อกเล็กๆที่เขียนถึงเรื่องที่อยากเขียน เขียนในเรื่องที่ทำ เรื่องราวชีวิตของคนคนนึงที่เกิดขึ้นบนโลกใบนี้ที่พร้อมจะแชร์เรื่องราวให้คุณได้รับรู้</description>
	<lastBuildDate>Thu, 14 Jul 2011 08:21:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>LV on RAID</title>
		<link>http://www.bongbank.net/linux/lv-on-raid</link>
		<comments>http://www.bongbank.net/linux/lv-on-raid#comments</comments>
		<pubDate>Thu, 14 Jul 2011 08:20:31 +0000</pubDate>
		<dc:creator>Bongbank</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.bongbank.net/?p=304</guid>
		<description><![CDATA[วันนี้เฮี้ยนอยากลองใช้ LVM (Logical Volume Management) บน Software RAID (RAID5) ดู โดยผมลองใน VMware นะครับ เพื่อความปลอดภัย อิอิ VM configuration - Fedora 9.0 - SCSI disk 8GB x 3 ขั้นที่ 1 สร้าง RAID Array ขึ้นมาก่อน โดย 1. เนื่องจากผมไม่ได้ใช้ทั้ง Disk จึงต้องแบ่ง Partition เอาครับ โดยใช้ fdisk แบ่ง Harddisk ทั้ง 3 ลูกให้มี Partition ขนาด 1000MB (จะลอง RAID 5 จึงต้องใช้ขนาดเท่ากันเป๊ะ ๆ) เป็น [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้เฮี้ยนอยากลองใช้ LVM (Logical Volume Management) บน Software RAID (RAID5) ดู<br />
โดยผมลองใน VMware นะครับ เพื่อความปลอดภัย อิอิ<span id="more-304"></span></p>
<p>VM configuration<br />
- Fedora 9.0<br />
- SCSI disk 8GB x 3</p>
<p><strong>ขั้นที่ 1</strong> สร้าง RAID Array ขึ้นมาก่อน โดย<br />
1. เนื่องจากผมไม่ได้ใช้ทั้ง Disk จึงต้องแบ่ง Partition เอาครับ โดยใช้ fdisk<br />
แบ่ง Harddisk ทั้ง 3 ลูกให้มี Partition ขนาด 1000MB (จะลอง RAID 5 จึงต้องใช้ขนาดเท่ากันเป๊ะ ๆ)<br />
เป็น /dev/sda5, /dev/sdb5, /dev/sdc5</p>
<p>2. สร้าง RAID Array ชื่อ /dev/md0</p>
<pre>[root@localhost ~]# mdadm -Cv /dev/md0 -l5 -n3 /dev/sda5 /dev/sdb5 /dev/sdc5</pre>
<p>3. ตรวจสอบสถานะของ RAID Array ได้โดย</p>
<pre>[root@localhost ~]# mdadm --detail /dev/md0</pre>
<p><strong>ขั้นที่ 2</strong> สร้าง Logical Volume (LV) บน /dev/md0<br />
1. กำหนดให้ /dev/md0 เป็น Physical Volume (PV) ของ LVM</p>
<pre>[root@localhost ~]# pvcreate /dev/md0</pre>
<p>ตรวจสอบสถานะของ PV โดย</p>
<pre>[root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               mainvolume
  PV Size               2.83 GB / not usable 1.88 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              723
  Free PE               685
  Allocated PE          38
  PV UUID               WJFb6g-pLu9-43nw-Bn1F-Ki0g-PBZf-D82EYt</pre>
<p>2. สร้าง Volume Group (VG) ชื่อ mainvolume บน PV /dev/md0</p>
<pre>[root@localhost ~]# vgcreate mainvolume /dev/md0</pre>
<p>ตรวจสอบสถานะของ VG โดย</p>
<pre>[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               mainvolume
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  8
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.82 GB
  PE Size               4.00 MB
  Total PE              723
  Alloc PE / Size       38 / 152.00 MB
  Free  PE / Size       685 / 2.68 GB
  VG UUID               SeF41p-EkAk-xmNB-Wcy6-17ae-8KBl-3nHr4n</pre>
<p>3. สร้าง Logical Volume (LV) home บน VG mainvolume</p>
<pre>[root@localhost ~]# lvcreate -L100M -nhome mainvolume</pre>
<p>ตรวจสอบสถานะของ LV โดย</p>
<pre>[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/mainvolume/home
  VG Name                mainvolume
  LV UUID                vyHnOz-PR2y-fe05-0zq1-GCNE-1N5d-ocJgvG
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                152.00 MB
  Current LE             38
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0</pre>
<p>4. Format LV /dev/mainvolume/home เป็น File system ตามต้องการ</p>
<pre>[root@localhost ~]# mkfs.ext3 /dev/mainvolume/home</pre>
<p>5. จากนั้นก็ mount และใช้งานได้เลย</p>
<pre>[root@localhost ~]# mount /dev/mainvolume/home /data/virtualhome</pre>
<p><strong>ขั้นที่ 3</strong> ทำให้ระบบ mount LV อัตโนมัติตอน boot<br />
1. แก้ไข file /etc/mdadm.conf ให้เป็นดังนี้ เพื่อให้ Service mdmonitor เตรียม RAID Array ให้พร้อม mount</p>
<pre>DEVICE /dev/sd*

ARRAY /dev/md0 uuid=9e10ec61:bde4e7ac:90c708b4:8dd1ef17</pre>
<p>โดยค่า uuid ดูจาก mdadm -D</p>
<p>2. แก้ไข /etc/fstab เพื่อให้ mount อัตโนมัติ</p>
<pre>/dev/mainvolume/home    /data/virtualhome       ext3    defaults        0 0</pre>
<p><strong>ขั้นที่ 4</strong> ทดลองขยายขนาดของ Logical Volume<br />
1. unmount Logical Volume</p>
<pre>[root@localhost ~]# umount /data/virtualhome</pre>
<p>2. เพิ่มขนาดของ Logical Volume</p>
<pre>[root@localhost ~]# lvresize -L 200M /dev/mainvolume/home</pre>
<p>3. Run e2fsck บน Logical Volume ก่อน</p>
<pre>[root@localhost ~]# e2fsck -f /dev/mainvolume/home</pre>
<p>4. เพิ่มขนาดของ File system</p>
<pre>[root@localhost ~]# resize2fs /dev/mainvolume/home 200M</pre>
<p>Note: ในการเพิ่มขนาดของ Filesystem ถ้าไม่กำหนดขนาดไว้ ระบบก็จะเพิ่มให้เท่ากับ LV พอดี</p>
<p>5. mount เพื่อใช้งาน</p>
<pre>[root@localhost ~]# mount /dev/mainvolume/home /data/virtualhome</pre>
<p><strong>ขั้นที่ 5</strong> ทดลองเพิ่ม Device เข้ามาใน RAID Array เพื่อขยายขนาดของ Logical Volume เนื่องจากพื้นที่ใกล้เต็มแล้ว<br />
0. แอบสร้าง Partition เพิ่มขึ้นมา 1 Partition ขนาด 1000MB (/dev/sdb6)<br />
1. เพิ่ม Device /dev/sdb6 เข้าไปใน RAID Array /dev/md0</p>
<pre>[root@localhost ~]# mdadm --add /dev/md0 /dev/sdb6</pre>
<p>2. สั่ง Grow เพื่อขยายขนาดของ RAID Array</p>
<pre>[root@localhost ~]# mdadm -G /dev/md0 -n4</pre>
<p>เพิ่ม Disk ขนาด 1GB ยังทำน้านนาน ถ้าเพิ่ม 1TB นี่สงสัยจะได้รอเป็นสัปดาห์ &#8211; -&#8221;</p>
<p>3. Resize Physical Volume</p>
<pre>[root@localhost ~]# pvresize -v -d /dev/md0
    Using physical volume(s) on command line
    Archiving volume group "mainvolume" metadata (seqno 10).
    Resizing physical volume /dev/md0 from 723 to 964 extents.
    Resizing volume "/dev/md0" to 7902336 sectors.
    Updating physical volume "/dev/md0"
    Creating volume group backup "/etc/lvm/backup/mainvolume" (seqno 11).
  Physical volume "/dev/md0" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized</pre>
<p>4. Volume Group จะถูกขยายโดยอัตโนมัติ</p>
<p>5. ขยาย Logical Volume ตามวิธีในขั้นที่ 4 ได้เลย</p>
<p>ขอขอบคุณแหล่งความรู้ใน Internet ดังนี้ครับ<br />
<a title="http://vuthi.blogspot.com/2005/12/mdadm-lvm-honey.html" href="http://vuthi.blogspot.com/2005/12/mdadm-lvm-honey.html">http://vuthi.blogspot.com/2005/12/mdadm-lvm-honey.html</a><br />
<a title="http://www.opentle.org/th/node/8155" href="http://www.opentle.org/th/node/8155">http://www.opentle.org/th/node/8155</a><br />
<a title="http://ubuntuforums.org/archive/index.php/t-348176.html" href="http://ubuntuforums.org/archive/index.php/t-348176.html">http://ubuntuforums.org/archive/index.php/t-348176.html</a><br />
<a title="http://archives.devshed.com/forums/linux-97/pvresize-after-extending-raid-array-2336874.html" href="http://archives.devshed.com/forums/linux-97/pvresize-after-extending-raid-array-2336874.html">http://archives.devshed.com/forums/linux-97/pvresize-after-extending-rai&#8230;</a><br />
<a title="http://itknow.exteen.com/20080621/reduce-a-non-root-lvm" href="http://itknow.exteen.com/20080621/reduce-a-non-root-lvm">http://itknow.exteen.com/20080621/reduce-a-non-root-lvm</a><br />
<a title="http://www.tldp.org/HOWTO/LVM-HOWTO/" href="http://www.tldp.org/HOWTO/LVM-HOWTO/">http://www.tldp.org/HOWTO/LVM-HOWTO/</a><br />
<a title="http://man-wiki.net/index.php/8:mdadm" href="http://man-wiki.net/index.php/8:mdadm">http://man-wiki.net/index.php/8:mdadm</a><br />
<a title="http://man-wiki.net/index.php/5:mdadm.conf" href="http://man-wiki.net/index.php/5:mdadm.conf">http://man-wiki.net/index.php/5:mdadm.conf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bongbank.net/linux/lv-on-raid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess &amp; htpasswd for Lock Directory</title>
		<link>http://www.bongbank.net/linux/lock-directory</link>
		<comments>http://www.bongbank.net/linux/lock-directory#comments</comments>
		<pubDate>Wed, 25 Aug 2010 07:24:30 +0000</pubDate>
		<dc:creator>Bongbank</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.bongbank.net/?p=266</guid>
		<description><![CDATA[เนื่องจากเกิดแนวคิดจะทำอะไรเล่นๆ นิดหน่อย จึงลองหาพวก File Manager ที่เอาไว้ Lock Dir หรือตั้ง Password ได้ ประเด็นคือแค่จะเอาไว้โยนไฟล์เข้า iPad แบบง่ายๆ สรุปก็ไปเจอวิธีการง่ายๆ อย่างการใช้ htaccess กับ htpasswd ให้เป็นประโยชน์มากที่สุด ซึ่งพอได้ลองทำแล้ว พบกว่าวิธีมันง่ายกว่าที่คิดมากๆ แถมมานึกๆ ดูแล้ว เว็บโหลดอนิเมะใหญ่ๆ อย่าง Tirkx มันก็ใช้วิธีแบบนี้นี่นา (แม่ง เพิ่งมารู้ช้าไปตั้ง 6-7 ปี) มาจดเอาไว้กันลืมล่ะกันวิธีการเซ็ต Authen DIR สร้างไฟล์ htpasswd เพื่อเอาไว้เก็บไฟล์รหัสผ่าน ก็ไปเก็บเอาไว้ที่ไหนซักเครื่องบนเครื่อง ทำโดยการพิมพ์ htpasswd -b -d -c .htpasswd &#60;username&#62; &#60;password&#62; จะได้ไฟล์ .htpasswd ขึ้นมา และถ้ามี user ใหม่ สามารถใช้คำสั่ง htpasswd [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-268" href="http://www.bongbank.net/linux/lock-directory/attachment/ss_-2010-08-25-13-59"><br />
</a>เนื่องจากเกิดแนวคิดจะทำอะไรเล่นๆ นิดหน่อย จึงลองหาพวก File Manager ที่เอาไว้ Lock Dir หรือตั้ง Password ได้ ประเด็นคือแค่จะเอาไว้โยนไฟล์เข้า iPad แบบง่ายๆ สรุปก็ไปเจอวิธีการง่ายๆ อย่างการใช้ htaccess กับ htpasswd ให้เป็นประโยชน์มากที่สุด ซึ่งพอได้ลองทำแล้ว พบกว่าวิธีมันง่ายกว่าที่คิดมากๆ แถมมานึกๆ ดูแล้ว เว็บโหลดอนิเมะใหญ่ๆ อย่าง Tirkx มันก็ใช้วิธีแบบนี้นี่นา (แม่ง เพิ่งมารู้ช้าไปตั้ง 6-7 ปี) มาจดเอาไว้กันลืมล่ะกัน<span id="more-266"></span>วิธีการเซ็ต Authen DIR</p>
<ol>
<li>สร้างไฟล์ htpasswd เพื่อเอาไว้เก็บไฟล์รหัสผ่าน ก็ไปเก็บเอาไว้ที่ไหนซักเครื่องบนเครื่อง ทำโดยการพิมพ์ <strong>htpasswd -b -d -c .htpasswd &lt;username&gt; &lt;password&gt;</strong></li>
<li>จะได้ไฟล์ .htpasswd ขึ้นมา และถ้ามี user ใหม่ สามารถใช้คำสั่ง <strong>htpasswd -nb &lt;username&gt; &lt;password&gt;</strong> และนำบรรทัดที่ได้ใส่เพิ่มใน .htpasswd เพื่อเพิ่มผู้ใช้งาน</li>
<li>สร้างไฟล์ .htaccess ขึ้นมาใส่ไว้ใน DIR ที่ต้องการจะ Lock ในไฟล์ก็ให้ใส่AuthUserFile /home/bongbank/.htpasswd<br />
AuthName &#8220;Secret directory is protected by User and Password : &#8221;<br />
AuthType Basic<br />
require valid-user<br />
Options +Indexes</li>
<li>บรรทัดแรก แก้ใส่ path ที่เอาไว้เก็บไฟล์ .htpasswd เอาไว้</li>
<li>บรรทัดสุดท้าย ใส่ไว้ถ้าต้องการให้ List ไฟล์ใน Folder นั้น</li>
</ol>
<p>ปล.มีในกรณีต้องการให้ Authen โดยเรียกดู user จาก database ให้ลง<strong> libapache2-mod-auth-mysql </strong>เอาล่ะกัน แล้วไปเซ็ตเพิ่มเอาเอง</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bongbank.net/linux/lock-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mytop</title>
		<link>http://www.bongbank.net/linux/mytop</link>
		<comments>http://www.bongbank.net/linux/mytop#comments</comments>
		<pubDate>Wed, 11 Aug 2010 04:24:40 +0000</pubDate>
		<dc:creator>Bongbank</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.bongbank.net/?p=260</guid>
		<description><![CDATA[mytop เป็นเครื่องมือสำหรับเอาไว้วิเคราะห์ performance MySQL ช่วยให้เราสามารถดู Query ของ Database ที่มีปัญหาได้ http://jeremy.zawodny.com/mysql/mytop/ ก่อนติดตั้ง mytop ต้องลง perl modules ตามนี้ก่อน 1. Installing TermReadKey Download ไฟล์มา compile ตามนี้ครับ # wget http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz # tar -zxf TermReadKey-2.30.tar.gz # cd TermRead* # perl Makefile.PL # make test หากเกิด error ในขั้นตอนนี้ให้ดู error ที่แสดงขึ้นมา อาจเกิดจากสาเหตุบาง module ที่ระบบต้องการเราอาจจะไม่ได้ลงไว้ อย่างของผมไม่ได้ลง gcc ไว้จึงต้องทำการลงก่อน เมื่อลงครบหมดแล้ว ก็ให้ทดลอง run คำสั่งเดิมอีกรอบ # make [...]]]></description>
			<content:encoded><![CDATA[<p>mytop เป็นเครื่องมือสำหรับเอาไว้วิเคราะห์ performance MySQL ช่วยให้เราสามารถดู Query ของ Database ที่มีปัญหาได้</p>
<p><a href="http://jeremy.zawodny.com/mysql/mytop/" target="_blank">http://jeremy.zawodny.com/mysql/mytop/<span id="more-260"></span></a></p>
<p>ก่อนติดตั้ง mytop ต้องลง perl modules ตามนี้ก่อน</p>
<p>1. Installing TermReadKey<br />
Download ไฟล์มา compile ตามนี้ครับ<br />
# wget <a href="http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz" target="_blank">http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz<br />
</a># tar -zxf TermReadKey-2.30.tar.gz<br />
# cd TermRead*<br />
# perl Makefile.PL<br />
# make test</p>
<p>หากเกิด error ในขั้นตอนนี้ให้ดู error ที่แสดงขึ้นมา  อาจเกิดจากสาเหตุบาง module ที่ระบบต้องการเราอาจจะไม่ได้ลงไว้  อย่างของผมไม่ได้ลง gcc ไว้จึงต้องทำการลงก่อน เมื่อลงครบหมดแล้ว  ก็ให้ทดลอง run คำสั่งเดิมอีกรอบ<br />
# make<br />
# make install</p>
<p>2. Installing DBI</p>
<p># wget <a href="http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.48.tar.gz" target="_blank">http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.48.tar.gz</a><br />
# tar -zxf DBI-1.48.tar.gz<br />
# cd DBI*<br />
# perl Makefile.PL<br />
# make test<br />
# make<br />
# make install</p>
<p>3. Installing mytop:</p>
<p># wget <a href="http://jeremy.zawodny.com/mysql/mytop/mytop-1.4.tar.gz" target="_blank">http://jeremy.zawodny.com/mysql/mytop/mytop-1.4.tar.gz</a><br />
# tar -zxf mytop-1.4.tar.gz<br />
# cd mytop*<br />
# perl Makefile.PL<br />
# make test<br />
# make<br />
# make install</p>
<p>4.ทำการ create mysql user</p>
<p># mysql  -u root -p<br />
# grant super, reload, process on *.* to mytop@localhost;</p>
<p># flush privileges;</p>
<p>5.ทำการสร้างไฟล์ config ของ mytop</p>
<p># cd<br />
# vim .mytop</p>
<p>**********************************</p>
<p>prompt=1<br />
user=root<br />
db=mysql<br />
host=localhost<br />
delay=3<br />
batchmode=0<br />
header=1<br />
color=1<br />
idle=1<br />
sort=1</p>
<p>**********************************</p>
<p>มี Argument ต่างๆ ที่เอาไว้ใช้ดังต่อไปนี้</p>
<dl>
<dt><strong><a name="item_-u_or_-user_username"><strong>-u</strong> </a><em><a name="item_-u_or_-user_username">or -user username</a></em></strong> </dt>
<dd> Username to use when logging in to the MySQL server. Default: &#8220;root&#8221;. </dd>
<dt><strong><a name="item_-p_or_-pass_or_-password_password"><strong>-p</strong> <em>or <strong>-pass</strong> or <strong>-password</strong> password</em></a></strong> </dt>
<dd> Password to use when logging in to the MySQL server. Default: none. </dd>
<dt><strong><a name="item_-h_or_-host_hostname[:port]"><strong>-h</strong> <em>or <strong>-host</strong> hostname[:port]</em></a></strong> </dt>
<dd> Hostname of the MySQL server. The hostname may be followed by an option port number. Note that the port is specified separate from the host when using a config file. Default: &#8220;localhost&#8221;. </dd>
<dt><strong><a name="item_-port_or_-P_port"><strong>-port</strong> or <strong>-P</strong> port</a></strong> </dt>
<dd> If you&#8217;re running MySQL on a non-standard port, use this to specify the port number. Default: 3306. </dd>
<dt><strong><a name="item_-s_or_-delay_seconds"><strong>-s</strong> <em>or <strong>-delay</strong> seconds</em></a></strong> </dt>
<dd> How long between display refreshes. Default: 5 (หรือจะไปกำหนดเอาไว้ .mytop ก็ได้) </dd>
<dt><strong><a name="item_-d_or_-db_or_-database_database"><strong>-d</strong> or <strong>-db</strong> or <strong>-database</strong> database</a></strong> </dt>
<dd> Use if you&#8217;d like <strong>mytop</strong> to connect to a specific database by default. Default: &#8220;test&#8221;. </dd>
<dt><strong><a name="item_-b_or_-batch_or_-batchmode"><strong>-b</strong> or <strong>-batch</strong> or <strong>-batchmode</strong></a></strong> </dt>
<dd>In batch mode, mytop runs only once, does not clear the screen, and places no limit on the number of lines it will print. This is suitable for running periodically (perhaps from cron) to capture the information into a file for later viewing. You might use batch mode in a CGI script to occasionally display your MySQL server status on the web.Default: unset.</p>
</dd>
<dt><strong><a name="item_-S_or_-socket_/path/to/socket"><strong>-S</strong> or <strong>-socket</strong> /path/to/socket</a></strong> </dt>
<dd>If you&#8217;re running <strong>mytop</strong> on the same host as MySQL, you may wish to have it use the MySQL socket directly rather than a standard TCP/IP connection. If you do,just specify one.Note that specifying a socket will make <strong>mytop</strong> ignore any host and/or port that you might have specified. If the socket does not exist (or the file specified is not a socket), this option will be ignored and <strong>mytop</strong> will use the hostname and port number instead.</p>
<p>Default: none.</p>
</dd>
<dt><strong><a name="item_-header_or_-noheader"><strong>-header</strong> or <strong>-noheader</strong></a></strong> </dt>
<dd>Sepcify if you want the header to display or not. You can toggle this with the <strong>h</strong> key while <strong>mytop</strong> is running.Default: header.</p>
</dd>
<dt><strong><a name="item_-color_or_-nocolor"><strong>-color</strong> or <strong>-nocolor</strong></a></strong> </dt>
<dd>Specify if you want a color display. This has no effect if you don&#8217;t have color support available.Default: If you have color support, <strong>mytop</strong> will try color unless you tell it not to.</p>
</dd>
<dt><strong><a name="item_-i_or_-idle_or_-noidle"><strong>-i</strong> or <strong>-idle</strong> or <strong>-noidle</strong></a></strong> </dt>
<dd>Specify if you want idle (sleeping) threads to appear in the list. If sleeping threads are omitted, the default sorting order is reversed so that the longest running queries appear at the top of the list.Default: idle.</p>
</dd>
</dl>
<p>นอกนั้นก็จะมี Shortcut Key ต่างๆ เอาไว้เรียกใช้งาน</p>
<dl>
<dt><strong><a name="item_?"><strong>?</strong></a></strong> Display help</dt>
<dt> </dt>
<dt><strong><a name="item_c"><strong>c </strong></a></strong>Show &#8220;command counters&#8221; based on the Com_* values in SHOW STATUS. This is a new feature.  Feedback welcome. </dt>
<dt> </dt>
<dt><strong><a name="item_d"><strong>d</strong></a></strong> Show only threads connected to a particular database. </dt>
<dt> </dt>
<dt><strong><a name="item_f"><strong>f</strong></a></strong> Given a thread id, display the entire query that thread was (and still may be) running. </dt>
<dt> </dt>
<dt><strong><a name="item_F"><strong>F</strong></a></strong> Disable all filtering (host, user, and db). </dt>
<dt> </dt>
<dt><strong><a name="item_h"><strong>h</strong></a></strong> Only show queries from a particular host. </dt>
<dt> </dt>
<dt><strong><a name="item_H"><strong>H</strong></a></strong> Toggle the header display. You can also specify either <code>header=0</code> or <code>header=1</code> in your config file to set the default behavior. </dt>
<dt> </dt>
<dt><strong><a name="item_i"><strong>i</strong></a></strong> Toggle the display of idle (sleeping) threads. If sleeping threads are filtered, the default sorting order is reversed so that the longest running queries appear at the top of the list. </dt>
<dt> </dt>
<dt><strong><a name="item_k"><strong>k</strong></a></strong> Kill a thread</dt>
<dt> </dt>
<dt><strong><a name="item_m"><strong>m</strong></a></strong> Toggle modes. Currently this switches from `top&#8217; mode to `qps&#8217; (Queries Per Second Mode). In this mode, mytop will write out one integer per second. The number written reflects the number of queries executed by the server in the previous one second interval. </dt>
<dd>More modes may be added in the future.</p>
</dd>
<dt><strong><a name="item_o"><strong>o</strong></a></strong> Reverse the default sort order. </dt>
<dt><strong><a name="item_p"><strong>p</strong></a></strong> Pause display. </dt>
<dt><strong><a name="item_q"><strong>q</strong></a></strong> Quit <strong>mytop</strong></dt>
<dd> </dd>
<dt><strong><a name="item_r"><strong>r</strong></a></strong> Reset the server&#8217;s status counters via a <em>FLUSH STATUS</em> command. </dt>
<dt><strong><a name="item_s"><strong>s</strong></a></strong> Change the sleep time (number of seconds between display refreshes). </dt>
<dt><strong><a name="item_u"><strong>u</strong></a></strong> Show only threads owned by a giver user. </dt>
</dl>
<p>The <strong>s</strong> key has a command-line counterpart: <strong>-s</strong>.</p>
<p>The <strong>h</strong> key has two command-line counterparts: <strong>-header</strong> and <strong>-noheader</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bongbank.net/linux/mytop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set commandline color for ssh</title>
		<link>http://www.bongbank.net/linux/set-commandline-color-for-ssh</link>
		<comments>http://www.bongbank.net/linux/set-commandline-color-for-ssh#comments</comments>
		<pubDate>Thu, 05 Aug 2010 08:18:27 +0000</pubDate>
		<dc:creator>Bongbank</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.bongbank.net/?p=258</guid>
		<description><![CDATA[เนื่องจากว่า debian หรือ os หลายๆ ตัว ค่า default ของสีเวลา ssh เข้าไป มันจะเป็นสีทื้อๆ ขาวล้วนๆ (พื้นดำ) ถ้าต้องการสีสันให้ชีวิตเวลา ssh เข้าไป ต้องมีการแก้ไขนิดหน่อย โดยไปที่ /home/&#60;users&#62; หรือว่า /root ถ้า login เป็น root จากนั้น สั่ง vim .bashrc ซึ่งเป็นไฟล์ที่ซ้อนอยู่ แล้วเอา Comment ที่ใส่เอาไว้ออก จากนั้น exit ssh แล้ว login ใหม่ ก็จะพบกับสีสันสวยงาม]]></description>
			<content:encoded><![CDATA[<p>เนื่องจากว่า debian หรือ os หลายๆ ตัว ค่า default ของสีเวลา ssh เข้าไป มันจะเป็นสีทื้อๆ ขาวล้วนๆ (พื้นดำ) ถ้าต้องการสีสันให้ชีวิตเวลา ssh เข้าไป ต้องมีการแก้ไขนิดหน่อย โดยไปที่ /home/&lt;users&gt; หรือว่า /root ถ้า login เป็น root จากนั้น สั่ง <strong>vim .bashrc</strong> ซึ่งเป็นไฟล์ที่ซ้อนอยู่ แล้วเอา Comment ที่ใส่เอาไว้ออก จากนั้น exit ssh แล้ว login ใหม่ ก็จะพบกับสีสันสวยงาม</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bongbank.net/linux/set-commandline-color-for-ssh/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mount NTFS on Centos</title>
		<link>http://www.bongbank.net/linux/mount-ntfs-on-centos</link>
		<comments>http://www.bongbank.net/linux/mount-ntfs-on-centos#comments</comments>
		<pubDate>Sun, 11 Jul 2010 15:21:15 +0000</pubDate>
		<dc:creator>Bongbank</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.bongbank.net/?p=254</guid>
		<description><![CDATA[วิธี Mount Drive NTFS บน Linux Centos wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum install dkms-fuse fuse-ntfs-3g วิธี mount mount -t ntfs-3g /dev/sda1 /mnt/folder]]></description>
			<content:encoded><![CDATA[<p>วิธี Mount Drive NTFS บน Linux Centos<span id="more-254"></span></p>
<p><span>wget   http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm<br />
</span></p>
<p><span>rpm  -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm<br />
</span></p>
<p><span>yum install dkms-fuse  fuse-ntfs-3g</span></p>
<p>วิธี mount<br />
mount -t ntfs-3g /dev/sda1  /mnt/folder</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bongbank.net/linux/mount-ntfs-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

