<?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>SpaLinux.com &#187; Performance</title>
	<atom:link href="http://spalinux.com/category/performance/feed" rel="self" type="application/rss+xml" />
	<link>http://spalinux.com</link>
	<description>Resources for Relaxing Linux System Administrators</description>
	<lastBuildDate>Sat, 21 Jan 2012 16:07:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>คุณสมบัติใหม่ของ Fedora 16</title>
		<link>http://spalinux.com/2012/01/new-features-of-fedora-16</link>
		<comments>http://spalinux.com/2012/01/new-features-of-fedora-16#comments</comments>
		<pubDate>Sat, 21 Jan 2012 16:07:59 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Linux Installation]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fedora 16]]></category>
		<category><![CDATA[systemd]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1606</guid>
		<description><![CDATA[ด้วยความตั้งใจของ RedHat ตั้งแต่แรก คือใส่คุณสมบัติใหม่ๆ เข้าไปใน Fedora อยู่ตลอด เพื่อเป็นการทดสอบการใช้งาน และถ้าได้ผลดี ค่อยนำไปใส่ไว้ใน RedHat Enterprise อีกที ดังนั้นจะเห็นแต่ละเวอร์ชั่นของ Fedora จะมีโปรแกรม มีวิธีการคอนฟิกแบบใหม่ๆ บางครั้งก็ทำให้ผู้ดาวน์โหลดมาติดตั้ง งงไปเลยเหมือนกัน ยิ่งเวอร์ชั่นหลังๆ การเปลี่ยนแปลงค่อนข้างมาก ล่าสุดมีการนำวิธีการบู๊ต โดยใช้ systemd ช่วยทำให้บู๊ตได้เร็วขึ้นมาก ในที่นี้จะแสดงเฉพาะคุณสมบัติใหม่ๆ ของ Fedora 16 ตั้งแต่การติดตั้ง และการทดสอบบู๊ตเบื้องต้น เมนูการบู๊ตติดตั้งเปลี่ยนไป เหลือแค่สองเมนูเท่านั้น น่าจะเป็นประโยชน์สำหรับผู้ใช้ โดยเฉพาะมือใหม่จะได้ไม่งงกับเวอร์ชั่นก่อนๆ ที่มีให้เลือกหลายเมนู &#160; การติดตั้ง Fedora 16 ต้องสร้าง partition พิเศษขึ้นมา ประเภท &#8220;BIOS Boot&#8221; ขนาด 1 MB สำหรับบู๊ต &#160; Linux Kernel เวอร์ชั่น 3 [...]]]></description>
			<content:encoded><![CDATA[<p>ด้วยความตั้งใจของ RedHat ตั้งแต่แรก คือใส่คุณสมบัติใหม่ๆ เข้าไปใน Fedora อยู่ตลอด เพื่อเป็นการทดสอบการใช้งาน และถ้าได้ผลดี<br />
ค่อยนำไปใส่ไว้ใน RedHat Enterprise อีกที</p>
<p>ดังนั้นจะเห็นแต่ละเวอร์ชั่นของ Fedora จะมีโปรแกรม มีวิธีการคอนฟิกแบบใหม่ๆ บางครั้งก็ทำให้ผู้ดาวน์โหลดมาติดตั้ง งงไปเลยเหมือนกัน<br />
ยิ่งเวอร์ชั่นหลังๆ การเปลี่ยนแปลงค่อนข้างมาก ล่าสุดมีการนำวิธีการบู๊ต โดยใช้ systemd ช่วยทำให้บู๊ตได้เร็วขึ้นมาก</p>
<p>ในที่นี้จะแสดงเฉพาะคุณสมบัติใหม่ๆ ของ Fedora 16 ตั้งแต่การติดตั้ง และการทดสอบบู๊ตเบื้องต้น</p>
<p><span id="more-1606"></span></p>
<p>เมนูการบู๊ตติดตั้งเปลี่ยนไป เหลือแค่สองเมนูเท่านั้น น่าจะเป็นประโยชน์สำหรับผู้ใช้ โดยเฉพาะมือใหม่จะได้ไม่งงกับเวอร์ชั่นก่อนๆ<br />
ที่มีให้เลือกหลายเมนู</p>
<p><a href="http://spalinux.com/wp-content/uploads/2012/01/f01.png"><img class="alignnone size-full wp-image-1607" title="f01" src="http://spalinux.com/wp-content/uploads/2012/01/f01.png" alt="" width="640" height="480" /></a></p>
<p>&nbsp;</p>
<p>การติดตั้ง Fedora 16 ต้องสร้าง partition พิเศษขึ้นมา ประเภท &#8220;BIOS Boot&#8221; ขนาด 1 MB สำหรับบู๊ต</p>
<p><a href="http://spalinux.com/wp-content/uploads/2012/01/f11.png"><img class="alignnone size-full wp-image-1608" title="f11" src="http://spalinux.com/wp-content/uploads/2012/01/f11.png" alt="" width="1024" height="768" /></a></p>
<p>&nbsp;</p>
<p>Linux Kernel เวอร์ชั่น 3 ออกมาได้ซักพัก ทีมงาน Fedora ก็ไม่รอช้า ใส่เวอร์ชั่น 3.1 มาให้เลย</p>
<p>&nbsp;</p>
<p><a href="http://spalinux.com/wp-content/uploads/2012/01/f18.png"><img class="alignnone size-full wp-image-1609" title="f18" src="http://spalinux.com/wp-content/uploads/2012/01/f18.png" alt="" width="720" height="400" /></a></p>
<p>&nbsp;</p>
<p>ด้วยคุณสมบัติของ systemd ลองจับเวลาดู การบู๊ตจะเร็วกว่าเมื่อเทียบกับเวอร์ชั่นก่อนๆ</p>
<p><a href="http://spalinux.com/wp-content/uploads/2012/01/f19.png"><img class="alignnone size-full wp-image-1610" title="f19" src="http://spalinux.com/wp-content/uploads/2012/01/f19.png" alt="" width="720" height="400" /></a></p>
<p>&nbsp;</p>
<p>หน้าจอการล็อกอิน และแสดงข้อมูลเบื้องต้นหลังจากการบู๊ต</p>
<p><a href="http://spalinux.com/wp-content/uploads/2012/01/f20.png"><img class="alignnone size-full wp-image-1611" title="f20" src="http://spalinux.com/wp-content/uploads/2012/01/f20.png" alt="" width="720" height="400" /></a></p>
<p>&nbsp;</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/index.html" target="_blank">Release Notes for Fedora 16</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2012/01/new-features-of-fedora-16/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upgrade kernel บน CentOS 5.6</title>
		<link>http://spalinux.com/2011/08/upgrade_kernel_on_centos_5-6</link>
		<comments>http://spalinux.com/2011/08/upgrade_kernel_on_centos_5-6#comments</comments>
		<pubDate>Sun, 14 Aug 2011 16:13:18 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Linux Installation]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[upgrade kernel]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1450</guid>
		<description><![CDATA[ด้วยเหตุผลทางด้านประสิทธิภาพ ต้องการลงโปรแกรม library หรือ driver ของอุปกรณ์บางตัว ที่ต้องใช้ kernel เวอร์ชั่นใหม่ ในบทความนี้ ขอแนะนำวิธีการ upgrade kernel บน CentOS 5.6  โดยการดาวน์โหลดไฟล์ rpm แล้วนำมาติดตั้งเองด้วยคำสั่ง rpm คำเตือน  - การ upgrade kernel อาจมีผลกระทบกับระบบ เช่น driver ที่ติดตั้งเอง ลองบนเครื่องทดสอบให้แน่ใจก่อนปรับปรุงจริง  - หลัง upgrade kernel ต้องรีบู๊ตเครื่อง เพื่อให้ kernel ใหม่มีผล แนะนำให้อยู่หน้าเครื่องตอนรีบู๊ต เผื่อมีปัญหาจะได้แก้ไขได้ ใช้คำสั่ง uname -a เพื่อตรวจสอบเวอร์ชั่น kernel ที่รันอยู่ [root@cent56 ~]# uname -a Linux cent56.example.com 2.6.18-238.el5 #1 SMP Thu Jan [...]]]></description>
			<content:encoded><![CDATA[<p>ด้วยเหตุผลทางด้านประสิทธิภาพ ต้องการลงโปรแกรม library หรือ driver ของอุปกรณ์บางตัว ที่ต้องใช้ kernel เวอร์ชั่นใหม่</p>
<p>ในบทความนี้ ขอแนะนำวิธีการ upgrade kernel บน CentOS 5.6  โดยการดาวน์โหลดไฟล์ rpm แล้วนำมาติดตั้งเองด้วยคำสั่ง rpm</p>
<p><span id="more-1450"></span></p>
<p><span style="color: #ff0000;">คำเตือน<br />
 - การ upgrade kernel อาจมีผลกระทบกับระบบ เช่น driver ที่ติดตั้งเอง ลองบนเครื่องทดสอบให้แน่ใจก่อนปรับปรุงจริง<br />
 - หลัง upgrade kernel ต้องรีบู๊ตเครื่อง เพื่อให้ kernel ใหม่มีผล แนะนำให้อยู่หน้าเครื่องตอนรีบู๊ต เผื่อมีปัญหาจะได้แก้ไขได้</span></p>
<p>ใช้คำสั่ง uname -a เพื่อตรวจสอบเวอร์ชั่น kernel ที่รันอยู่</p>
<pre>[root@cent56 ~]# <strong>uname -a
</strong>Linux cent56.example.com <span style="color: #0000ff;">2.6.18-238.el5</span> #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux</pre>
<p>ใช้คำสั่ง rpm เพื่อดูไฟล์ rpm ของ kernel</p>
<pre>[root@cent56 ~]# <strong>rpm -qa | grep kernel
</strong>kernel-headers-2.6.18-238.el5.x86_64
kernel-2.6.18-238.el5.x86_64
kernel-devel-2.6.18-238.el5.x86_64</pre>
<p>สำหรับ CentOS สามารถดาวน์โหลดไฟล์ rpm มาจากเว็บ updates</p>
<p>เช่นเว็บ updates ของ CentOS 5.6 ในเมืองไทย สามารถดาวน์โหลดได้ที่</p>
<p>http://mirror1.ku.ac.th/centos/5.6/updates/x86_64/RPMS/</p>
<p>ตัวอย่างไฟล์ kernel ที่ต้องดาวน์โหลด เวอร์ชั่นล่าสุด ณ ตอนที่เขียนคือ 2.6.18-238.19.1</p>
<ul>
<li>kernel-2.6.18-238.19.1.el5.x86_64.rpm</li>
<li>kernel-headers-2.6.18-238.19.1.el5.x86_64.rpm</li>
<li>kernel-devel-2.6.18-238.19.1.el5.x86_64.rpm</li>
</ul>
<p>ใช้คำสั่ง rpm ด้วยออปชั่น &#8216;-U&#8217; เพื่อปรับปรุง (upgrade) ไฟล์ rpm เป็นเวอร์ชั่นใหม่</p>
<pre>[root@cent56 ~]# <strong>rpm -U kernel-2.6.18-238.19.1.el5.x86_64.rpm</strong></pre>
<pre>[root@cent56 ~]# <strong>rpm -U kernel-headers-2.6.18-238.19.1.el5.x86_64.rpm</strong></pre>
<pre>[root@cent56 ~]# <strong>rpm -U kernel-devel-2.6.18-238.19.1.el5.x86_64.rpm</strong></pre>
<p>ตรวจสอบหลังจากปรับปรุง</p>
<pre>[root@cent56 ~]# <strong>rpm -qa | grep kernel
</strong>kernel-2.6.18-238.19.1.el5.x86_64
kernel-headers-2.6.18-238.19.1.el5.x86_64
kernel-devel-2.6.18-238.19.1.el5.x86_64</pre>
<p>หากใช้วิธีนี้ในการ upgrade แบบ rpm นี้ จะมีการแก้ไขไฟล์ grub.conf โดยอัตโนมัติ</p>
<pre>[root@cent56 ~]# <strong>cat /etc/grub.conf
</strong># grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-238.19.1.el5)
        root (hd0,0)
        kernel /vmlinuz-<span style="color: #0000ff;">2.6.18-238.19.1</span>.el5 ro root=LABEL=/
        initrd /initrd-<span style="color: #0000ff;">2.6.18-238.19.1</span>.el5.img</pre>
<p>ตรวจสอบความถูกต้องของไฟล์ grub.conf  แล้วรีบู๊ตเครื่องหลังจากการ upgrade<br />
เมื่อบู๊ตเสร็จเรียบร้อย ใช้คำสั่ง uname เพื่อตรวจสอบเวอร์ชั่น kernel</p>
<pre>[root@cent56 ~]# uname -a
Linux cent56.example.com <span style="color: #0000ff;">2.6.18-238.19.1</span>.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux</pre>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/08/upgrade_kernel_on_centos_5-6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>เลือกออปชัน grep ให้เหมาะ ลดเวลาค้นหาได้มาก</title>
		<link>http://spalinux.com/2011/06/choose-grep-option-to-minimize-run-time</link>
		<comments>http://spalinux.com/2011/06/choose-grep-option-to-minimize-run-time#comments</comments>
		<pubDate>Fri, 24 Jun 2011 16:23:37 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[egrep]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[regexp]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1387</guid>
		<description><![CDATA[ช่วงนี้รับงาน เพื่อเขียนโปรแกรมดึงข้อมูลจาก text file ทำเป็นรายงานสรุป โดยข้อมูลที่ได้มา มีจำนวนบรรทัดมากมายมหาศาล รวมๆ แล้วเป็น หมื่นล้านบรรทัด ต้องหากระบวนการที่มีประสิทธิภาพมากที่สุดในการเขียนโปรแกรม และเมื่อได้วิธีการที่ผู้เขียนคิดว่าดีที่สุดแล้ว เลยนำมาเปรียบเทียบแชร์เล่าสู่กันฟัง ข้อมูลที่อยู่ในไฟล์ แยกเป็นบรรทัด เหมือนกับ CSV ไฟล์ งานแรกที่ต้องทำคือ เขียนโปรแกรมเพื่อดึงข้อมูลเฉพาะบรรทัดที่มีคำที่ต้องการเท่านั้น หมายเหตุ เพื่อไม่ให้เวลาเพี้ยนไปเนื่องจากการทำ cached file บน Linux  ทุกครั้งก่อนรันคำสั่ง จะรัน cat เพื่อพยายามให้ไฟล์อยู่ใน cached เหมือนกันทุกครั้ง เนื่องจากข้อมูลมีปริมาณมาก การแสดงผลออกหน้าจอจะทำให้เวลาที่ได้เพี้ยนไป ดังนั้น ในการรันทุกคำสั่ง output ที่ได้ จะถูกส่งไปยัง /dev/null ใช้คำสั่ง time เพื่อจับเวลาในการรันคำสั่ง ตัวอย่างการรันคำสั่ง cat ทุกครั้ง เพื่อพยายามโหลดไฟล์ข้อมูลเข้า cached [user1@devel tmp]$ time cat test-data.txt &#62; /dev/null [...]]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้รับงาน เพื่อเขียนโปรแกรมดึงข้อมูลจาก text file ทำเป็นรายงานสรุป โดยข้อมูลที่ได้มา มีจำนวนบรรทัดมากมายมหาศาล รวมๆ แล้วเป็น หมื่นล้านบรรทัด</p>
<p>ต้องหากระบวนการที่มีประสิทธิภาพมากที่สุดในการเขียนโปรแกรม และเมื่อได้วิธีการที่ผู้เขียนคิดว่าดีที่สุดแล้ว เลยนำมาเปรียบเทียบแชร์เล่าสู่กันฟัง</p>
<p>ข้อมูลที่อยู่ในไฟล์ แยกเป็นบรรทัด เหมือนกับ CSV ไฟล์ งานแรกที่ต้องทำคือ เขียนโปรแกรมเพื่อดึงข้อมูลเฉพาะบรรทัดที่มีคำที่ต้องการเท่านั้น</p>
<p><span id="more-1387"></span></p>
<p>หมายเหตุ</p>
<ul>
<li>เพื่อไม่ให้เวลาเพี้ยนไปเนื่องจากการทำ cached file บน Linux  ทุกครั้งก่อนรันคำสั่ง จะรัน cat เพื่อพยายามให้ไฟล์อยู่ใน cached เหมือนกันทุกครั้ง</li>
<li>เนื่องจากข้อมูลมีปริมาณมาก การแสดงผลออกหน้าจอจะทำให้เวลาที่ได้เพี้ยนไป ดังนั้น ในการรันทุกคำสั่ง output ที่ได้ จะถูกส่งไปยัง /dev/null</li>
<li>ใช้คำสั่ง time เพื่อจับเวลาในการรันคำสั่ง</li>
</ul>
<p>ตัวอย่างการรันคำสั่ง cat ทุกครั้ง เพื่อพยายามโหลดไฟล์ข้อมูลเข้า cached</p>
<pre>[user1@devel tmp]$ <strong>time cat test-data.txt &gt; /dev/null</strong></pre>
<pre>real    0m0.519s
user    0m0.247s
sys     0m0.272s</pre>
<p>ใช้คำสั่ง wc -l เพื่อนับจำนวนบรรทัดของไฟล์ ไฟล์ข้อมูลที่ใช้ทดสอบ มีจำนวนบรรทัด 5,825,368 บรรทัด</p>
<pre>[user1@devel tmp]$ <strong>wc -l cat test-data.txt
</strong>5813492</pre>
<p>ต้องการดึงข้อมูลจากบรรทัดที่มีคำว่า &#8220;jan&#8221; หรือมีคำว่า &#8220;feb&#8221;</p>
<h4>grep -E หรือ egrep (extended-regexp)</h4>
<p>เราสามารถใช้คำสั่ง grep ตามด้วยออปชั่น -E หรือคำสั่ง egrep เพื่อเลือกเฉพาะบรรทัดที่มีคำที่ต้องการแบบมีเงื่อนไข extended regular expression</p>
<pre>[user1@devel tmp]$ <strong>time grep -E "(jan|feb)" test-data.txt  &gt; /dev/null</strong></pre>
<pre><span style="color: #ff0000;">real    0m22.070s</span>
user    0m19.298s
sys     0m3.038s</pre>
<p>หรือใช้คำสั่ง egrep ก็ให้ผลเหมือนกัน</p>
<pre>[user1@devel tmp]$ <strong>time egrep "(jan|feb)" test-data.txt &gt; /dev/null</strong></pre>
<pre><span style="color: #ff0000;">real    0m21.530s</span>
user    0m19.133s
sys     0m2.831s</pre>
<p>ใช้เวลาไปประมาณ 20 กว่าวินาที ก็ได้ผลลัพธ์ที่ต้องการ</p>
<p>แต่เมื่อคิดคำนวนคร่าวๆ   5 ล้านกว่าบรรทัด ใช้เวลา 20 วินาที แล้ว 10,000 ล้านบรรทัดล่ะ นี่ยังไม่รวมกระบวนการอื่นๆ ที่ต้องทำต่อไปอีกนะ &#8211;&#8221;</p>
<h4>grep แยกทีละคำ</h4>
<p>เมื่อคิดเรื่องเวลาแล้ว เลยหาวิธีใหม่ คือทดลอง grep แยกทีละคำ</p>
<p>หาเฉพาะที่มีคำว่า &#8220;jan&#8221; เวลาที่ใช้แค่ 1 วินาทีกว่าๆ</p>
<pre>[user1@devel tmp]$ <strong>time grep "jan" test-data.txt &gt; /dev/null</strong></pre>
<pre><span style="color: #ff0000;">real    0m1.472s</span>
user    0m1.522s
sys     0m0.375s</pre>
<p>หาเฉพาะที่มีคำว่า &#8220;feb&#8221; เวลาที่ใช้ไม่ถึงวินาที</p>
<pre>[user1@devel tmp]$ <strong>time grep "feb" test-data.txt &gt; /dev/null</strong></pre>
<pre><span style="color: #ff0000;">real    0m0.464s</span>
user    0m0.381s
sys     0m0.108s</pre>
<p>รวมๆ แล้ว เร็วกว่ามาก grep แยกทีละคำก็น่าจะดี แต่คงยุ่งยากในการเขียนโปรแกรมพอสมควร ยิ่งถ้ามีคำที่ต้องการค้นหาเพิ่มมาอีก</p>
<h4>*** grep -P (perl-regexp) ***</h4>
<p>อ่าน man page ของ grep พบอีกออปชั่น  -P เป็นการค้นหาคำแบบใช้เงื่อนไขของ Perl regular expression</p>
<pre>[user1@devel tmp]$ <strong>time grep -P "(jan|feb)" test-data.txt &gt; /dev/null</strong></pre>
<pre><span style="color: #0000ff;">real    0m2.063s
</span>user    0m2.143s
sys     0m0.358s</pre>
<p>ลดลงเวลาลงเกือบ 10 เท่า เมื่อเปรียบเทียบกับ grep -E แถมไม่ต้องยุ่งยากกับการเขียนโปรแกรมมากนัก</p>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/06/choose-grep-option-to-minimize-run-time/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ดักจับ Traffic ใน Network ด้วย tcpdump</title>
		<link>http://spalinux.com/2011/06/using_tcpdump_to_capture_traffic_on_network</link>
		<comments>http://spalinux.com/2011/06/using_tcpdump_to_capture_traffic_on_network#comments</comments>
		<pubDate>Fri, 03 Jun 2011 14:44:19 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Console]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sniffer]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tcpdump]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1351</guid>
		<description><![CDATA[tcpdump เป็นโปรแกรมประเภทเดียวกับ Sniffer, Wireshark คือใช้ในการดักจับ (capture) Traffic หรือ Packet ที่ รับ/ส่ง เข้า/ออก ระหว่างพอร์ตแลน (LAN) ของเซิรฟ์เวอร์เครื่องที่รันคำสั่ง และอุปกรณ์เครือข่าย (Router, Switch, HUB) มีประโยชน์อย่างมาก เพื่อใช้ในการวิเคราะห์ ตรวจสอบ หรือแก้ปัญหาเกี่ยวกับ Network ได้ tcpdump ต้องรันด้วย root หรือเทียบเท่า และรันแบบ command line ติดตั้งมาเป็นดีฟอลต์บนลีนุกซ์เกือบทุกตระกูล เวอร์ชั่น จึงใช้งานได้สะดวก ไม่ต้องติดตั้งเพิ่มเติมเหมือนโปรแกรมอื่นๆ ในที่นี้ขอแนะนำวิธีการใช้งานเบื้องต้นของ tcpdump รันคำสั่ง tcpdump ล็อกอินเป็น root แล้วพิมพ์คำสั่ง tcpdump หมายเหตุ พอร์ตที่ใช้ในดักจับ packet ไม่จำเป็นต้องใส่ IP Address หรือเป็น IP ในกลุ่มเดียวกับ IP อื่นๆ [...]]]></description>
			<content:encoded><![CDATA[<p>tcpdump เป็นโปรแกรมประเภทเดียวกับ Sniffer, Wireshark คือใช้ในการดักจับ (capture) Traffic หรือ Packet ที่ รับ/ส่ง เข้า/ออก ระหว่างพอร์ตแลน (LAN) ของเซิรฟ์เวอร์เครื่องที่รันคำสั่ง และอุปกรณ์เครือข่าย (Router, Switch, HUB)</p>
<p>มีประโยชน์อย่างมาก เพื่อใช้ในการวิเคราะห์ ตรวจสอบ หรือแก้ปัญหาเกี่ยวกับ Network ได้</p>
<p>tcpdump ต้องรันด้วย root หรือเทียบเท่า และรันแบบ command line ติดตั้งมาเป็นดีฟอลต์บนลีนุกซ์เกือบทุกตระกูล เวอร์ชั่น จึงใช้งานได้สะดวก ไม่ต้องติดตั้งเพิ่มเติมเหมือนโปรแกรมอื่นๆ</p>
<p>ในที่นี้ขอแนะนำวิธีการใช้งานเบื้องต้นของ tcpdump</p>
<h4><span id="more-1351"></span><br />
รันคำสั่ง tcpdump</h4>
<p>ล็อกอินเป็น root แล้วพิมพ์คำสั่ง tcpdump</p>
<p><strong>หมายเหตุ</strong> พอร์ตที่ใช้ในดักจับ packet ไม่จำเป็นต้องใส่ IP Address หรือเป็น IP ในกลุ่มเดียวกับ IP อื่นๆ ใน Network ที่ต้องการดักจับ ขอให้สถานะ Up พอ</p>
<p>หากไม่ระบุออปชั่นใดๆ เลย tcpdump จะเลือกดักจับ packet ที่เข้าออก พอร์ตแลนแรก โดยทั่วไปคือ eth0</p>
<p>ตัวอย่างการรันคำสั่งแบบไม่ระบุออปชั่น</p>
<pre>[root@server ~]# <strong>tcpdump
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:15:53.948422 IP 192.168.1.102.jwalkserver &gt; server.example.com.ssh: Flags [.], ack 1108, win 64623, length 0
09:15:53.955117 IP server.example.com.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 1108:1384, ack 1, win 8576, length 276
09:15:53.963948 IP server.example.com.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 1384:1548, ack 1, win 8576, length 164
09:15:53.964191 IP 192.168.1.102.jwalkserver &gt; server.example.com.ssh: Flags [.], ack 1548, win 64183, length 0
09:15:53.972707 IP server.example.com.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 1548:1824, ack 1, win 8576, length 276
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<pre>102 packets captured
102 packets received by filter
0 packets dropped by kernel</pre>
<p>กด [Ctrl-C] เพื่อออกจากคำสั่ง tcpdump ด้านล่างจะมีรายงานสรุปว่า ดักจับได้กี่ packet</p>
<p>ผลลัพธ์ที่แสดงจากคำสั่ง tcpdump จะแตกต่างกันไปขึ้นกับ Network Protocol ที่รับ/ส่ง เช่นถ้าเป็น IP Protocol (TCP, UDP) รูปแบบจะเป็น</p>
<ul>
<li>เวลา</li>
<li>IP</li>
<li>[Source IP Address].[Source Port]</li>
<li>[Destination Address].[Destination Port]</li>
<li>IP, TCP, UDP Headers</li>
</ul>
<p> </p>
<h4>เลือกพอร์ตที่ดักจับ</h4>
<p>ระบุออปชั่น &#8220;-i&#8221; แล้วตามด้วยชื่อพอร์ต เช่น ต้องการจับ packet ที่เข้าออก eth1</p>
<pre>[root@server ~]# <strong>tcpdump -i eth1
</strong>tcpdump: WARNING: eth1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<p>ในที่นี้ พอร์ต eth1 ไม่มีการใส่ IP Address จึงขึ้นฟ้อง &#8220;WARNING: eth1: no IPv4 address assigned&#8221; แต่ก็ยังสามารถดักจับ Traffic ได้</p>
<h4>ไม่ต้องแปลง IP เป็นชื่อ hostname</h4>
<p>ผลลัพธ์ที่แสดงออกมา โปรแกรม tcpdump จะพยายามแปลง IP Address ทั้งต้นทาง ปลายทาง ของ packet ที่ดักจับได้ ให้เป็นชื่อ hostname โดยใช้ไฟล์ /etc/hosts หรือ บริการ DNS</p>
<p>ถ้าหาก traffic มีปริมาณมาก แนะนำให้ปิดคุณสมบัติการพยายามแปลง IP เป็น ชื่อ hostname ออกซะ ด้วยการระบุออปชั่น &#8220;-n&#8221; เพื่อลดโหลด DNS</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -l -n
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:31:10.322145 IP 192.168.1.1.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 1901277915:1901278111, ack 2244887520, win 8576, length 196
09:31:10.322752 IP 192.168.1.102.jwalkserver &gt; 192.168.1.1.ssh: Flags [.], ack 196, win 65535, length 0
09:31:10.330843 IP 192.168.1.1.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 196:472, ack 1, win 8576, length 276
09:31:10.332785 IP 192.168.1.1.ssh &gt; 192.168.1.102.jwalkserver: Flags [P.], seq 472:636, ack 1, win 8576, length 164
09:31:10.333209 IP 192.168.1.102.jwalkserver &gt; 192.168.1.1.ssh: Flags [.], ack 636, win 65095, length 0
<span style="color: #ff0000;">^C</span></pre>
<p> </p>
<h4>ไม่ต้องแปลง Port Number เป็นชื่อ Port Name</h4>
<p>หากต้องการแสดงชื่อพอร์ต (TCP, UDP ports) เป็นตัวเลข (ไฟล์ /etc/services)  ให้ระบุออปชั่น &#8220;-n&#8221; เพิ่มอีกหนึ่ง หรือระบุเป็น &#8220;-nn&#8221; เลย</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -l -nn
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:39:38.800430 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: Flags [.], ack 196, win 65535, length 0
09:39:38.802793 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: Flags [P.], seq 196:456, ack 1, win 8576, length 260
09:39:38.805709 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: Flags [P.], seq 456:604, ack 1, win 8576, length 148
09:39:38.805963 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: Flags [.], ack 604, win 65127, length 0
09:39:38.808655 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: Flags [P.], seq 604:848, ack 1, win 8576, length 244
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<h4>ผลลัพธ์แบบสั้นๆ </h4>
<p>หากไม่สนใจ ข้อมูลใน IP, TCP, UDP Headers ต้องการรู้แค่ว่า IP อะไรคุยกัน ใช้พอร์ตอะไร แค่นั้นพอ ให้ระบุออปชั่น &#8220;-q&#8221;</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -l -nn -q
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:40:48.472427 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 196
09:40:48.473006 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 0
09:40:48.479252 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 164
09:40:48.487003 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 100
09:40:48.487311 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 0
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<p> </p>
<h4>แสดงข้อมูล Layer 2 (MAC Address)</h4>
<p>ระบุออปชั่น &#8220;-e&#8221;  หากต้องการแสดงข้อมูล Layer 2 หรือแสดง Source, Destination MAC Address ด้วย</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -l -nn -e -q
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:44:05.644395 00:11:22:33:44:55 &gt; 00:55:66:77:88:99, IPv4, length 250: 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 196
09:44:05.644959 00:55:66:77:88:99 &gt; 00:11:22:33:44:55, IPv4, length 60: 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 0
09:44:05.652121 00:11:22:33:44:55 &gt; 00:55:66:77:88:99, IPv4, length 314: 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 260
09:44:05.660897 00:11:22:33:44:55 &gt; 00:55:66:77:88:99, IPv4, length 218: 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 164
09:44:05.661173 00:55:66:77:88:99 &gt; 00:11:22:33:44:55, IPv4, length 60: 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 0
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<h4> <br />
save ผลลัพธ์เก็บในไฟล์</h4>
<p>หากต้องการบันทึก (save) ผลลัพธ์ที่ดักจับได้ ให้เหมือนกับหน้าจอที่แสดงขึ้นมา ก็ใช้การ redirection</p>
<p>ตัวอย่าง การเก็บผลลัพธ์ลงไฟล์ ให้เหมือนกับที่แสดงขึ้นมา</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -l -nn -q &gt; catpure-display.log
</strong>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
<span style="color: #ff0000;"><strong>^C</strong></span>
7 packets captured
7 packets received by filter
0 packets dropped by kernel</pre>
<pre>หากต้องการหยุด ก็กดปุ่ม [Ctrl-C] เหมือนกัน</pre>
<p>ใช้คำสั่ง cat เพื่อดูเนื้อหาไฟล์ที่บันทึก</p>
<pre>[root@server ~]# <strong>cat capture-display.log
</strong>09:57:08.118314 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 196
09:57:08.118515 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 0
09:57:09.138258 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 36
09:57:09.355761 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: tcp 36
09:57:09.356025 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: tcp 0
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<p> แต่ถ้าต้องการบันทึกแบบเต็มรูปแบบ ให้ใช้ออปชั่น &#8220;-w&#8221; แล้วตามด้วยชื่อไฟล์ โดยทั่วไปนิยมบันทึกเป็นไฟล์นามสกุล &#8220;.cap&#8221;</p>
<pre>[root@server ~]# <strong>tcpdump -i eth0 -w capture-raw.cap
</strong>tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
<strong><span style="color: #ff0000;">^C</span></strong>
24 packets captured
24 packets received by filter
0 packets dropped by kernel</pre>
<p>ไฟล์ที่บันทึกด้วยออปชั่น &#8220;-w&#8221; สามารถนำมาเปิดย้อนหลังด้วยคำสั่ง tcpdump ตามด้วยออปชั่น &#8220;-r&#8221;  นอกจากนี้ ยังสามารถนำไปเปิดกับโปรแกรม Wireshark ได้อีกด้วย</p>
<pre>[root@server ~]# <strong>tcpdump -r capture-raw.cap -l -nn
</strong>reading from file capture-raw.cap, link-type EN10MB (Ethernet)
10:00:14.959339 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: Flags [P.], seq 105:157, ack 236, win 65431, length 52
10:00:14.972070 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: Flags [P.], seq 236:288, ack 157, win 8576, length 52
10:00:15.137079 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: Flags [.], ack 288, win 65379, length 0
10:00:15.221339 IP 192.168.1.102.1289 &gt; 192.168.1.1.22: Flags [P.], seq 157:209, ack 288, win 65379, length 52
10:00:15.227905 IP 192.168.1.1.22 &gt; 192.168.1.102.1289: Flags [P.], seq 288:340, ack 209, win 8576, length 52
<span style="color: #ff0000;"><strong>^C</strong></span></pre>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://spalinux.com/2008/09/verify_lan_network_interface_status_on_linux">ตรวจสอบสถานะของการ์ดเน็ตเวิร์กบนลีนุกซ์</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/06/using_tcpdump_to_capture_traffic_on_network/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>กระจายงาน Interrupts ที่ได้รับ ให้ Multi-CPU, Cores</title>
		<link>http://spalinux.com/2011/05/distribute_interrupts_over_processors_cores</link>
		<comments>http://spalinux.com/2011/05/distribute_interrupts_over_processors_cores#comments</comments>
		<pubDate>Sun, 29 May 2011 17:01:39 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[Interrupts]]></category>
		<category><![CDATA[irqbalance]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1343</guid>
		<description><![CDATA[หากคุณประสบปัญหา ssh login เข้าเครื่อง Linux Server แล้วต้องรอหลายวินาที กว่า prompt login จะขึ้น แต่หลังจาก login เข้าไปในระบบได้ ก็สามารถรันคำสั่งต่างๆ ทำงานได้ ไม่ได้ช้ามากแต่ประการใด บทความนี้อาจช่วยคุณแก้ไขปัญหาได้ คำสั่งที่ใช้ดูรายงานการทำงานของ CPU คือ mpstat อยู่ในชุดโปรแกรม sysstat รันคำสั่ง mpstat ตามด้วยออปชั่น &#8220;-P ALL&#8221; เพื่อดูผลลัพธ์แยกตาม CPU หมายเหตุ นอกจากคำสั่ง mpstat แล้ว อาจใช้คำสั่ง top ดูโหลดของ CPU ก็ได้ [root@devel ~]# mpstat -P ALL Linux 2.6.18-194.el5 (devel.example.com)   05/22/2011 04:00:49 PM  CPU   %user   %nice    %sys %iowait    [...]]]></description>
			<content:encoded><![CDATA[<p>หากคุณประสบปัญหา ssh login เข้าเครื่อง Linux Server แล้วต้องรอหลายวินาที กว่า prompt login จะขึ้น</p>
<p>แต่หลังจาก login เข้าไปในระบบได้ ก็สามารถรันคำสั่งต่างๆ ทำงานได้ ไม่ได้ช้ามากแต่ประการใด</p>
<p>บทความนี้อาจช่วยคุณแก้ไขปัญหาได้</p>
<p><span id="more-1343"></span></p>
<p>คำสั่งที่ใช้ดูรายงานการทำงานของ CPU คือ mpstat อยู่ในชุดโปรแกรม sysstat</p>
<p>รันคำสั่ง mpstat ตามด้วยออปชั่น &#8220;-P ALL&#8221; เพื่อดูผลลัพธ์แยกตาม CPU</p>
<p>หมายเหตุ นอกจากคำสั่ง mpstat แล้ว อาจใช้คำสั่ง top ดูโหลดของ CPU ก็ได้</p>
<pre>[root@devel ~]# <strong>mpstat -P ALL
</strong>Linux 2.6.18-194.el5 (devel.example.com)   05/22/2011</pre>
<pre>04:00:49 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
04:00:49 PM  all   25.13    0.00    0.09    0.14    0.01    0.08    0.00   74.55   2267.62
04:00:49 PM    <span style="color: #ff0000;"><strong>0</strong></span>    9.39    0.00    0.16    1.04    0.09    0.92    0.00   88.40   <span style="color: #ff0000;"><strong>2267.62
</strong></span>04:00:49 PM    1   21.11    0.00    0.11    0.17    0.00    0.00    0.00   78.62      0.00
04:00:49 PM    2   27.66    0.00    0.09    0.09    0.00    0.00    0.00   72.15      0.00
04:00:49 PM    3   28.54    0.00    0.09    0.07    0.00    0.00    0.00   71.30      0.00
04:00:49 PM    4   31.10    0.00    0.10    0.07    0.00    0.00    0.00   68.73      0.00
04:00:49 PM    5   29.38    0.00    0.10    0.05    0.00    0.00    0.00   70.47      0.00
04:00:49 PM    6   16.91    0.00    0.08    0.04    0.00    0.00    0.00   82.97      0.00
04:00:49 PM    7   20.46    0.00    0.08    0.04    0.00    0.00    0.00   79.42      0.00</pre>
<p>จากคำสั่ง mpstat นี้จะเห็นว่า เฉพาะ CPU0 เท่านั้นที่มีตัวเลข &#8220;intr/s&#8221;  ไม่เท่ากับ 0</p>
<p>&#8220;intr/s&#8221; คือจำนวน interrupts (IRQ) ที่ CPU ได้รับ เฉลี่ยต่อ วินาที</p>
<p>การ ssh login เข้าเครื่อง ถือเป็นการ interrupts อย่างหนึ่ง ที่ต้องมี CPU มาทำหน้าที่รับ ก่อนส่งไปประมวลผลต่อไป</p>
<h4>การแก้ไข</h4>
<p>โปรแกรมที่สามารถช่วยกระจายการรับ interrupts ให้ CPU หลายตัวได้ คือ irqbalance</p>
<p>โดยดีฟอลต์ของการติดตั้ง Linux ส่วนใหญ่แล้ว จะรัน irqbalance ด้วย แต่ถ้าปิดไป แนะนำให้รันขึ้นมาใหม่ และรันทิ้งไว้ตลอดเวลา สำหรับเครื่องที่มี CPU หลายตัว หรือหลาย Core</p>
<p>ตรวจสอบการรัน irqbalance ด้วยคำสั่ง service หรือคำสั่ง ps</p>
<pre>[root@devel ~]# <strong>service irqbalance status
</strong>irqbalance is stopped
[root@devel ~]#</pre>
<pre>[root@devel ~]# <strong>ps -ef | grep irqbalance
</strong>[root@devel ~]#</pre>
<p>รันเซอร์วิส irqbalance</p>
<pre>[root@devel ~]# <strong>service irqbalance start
</strong>Starting irqbalance:                                       [  OK  ]</pre>
<p>ตรวจสอบดูโปรเซสอีกครั้ง</p>
<pre>[root@devel ~]# <strong>ps -ef | grep irqbalance
</strong>root     19003     1  0 16:03 ?        00:00:00 irqbalance</pre>
<p>หลังจากรันเซอร์วิส irqbalance ไปซักพักแล้ว ลองรันคำสั่ง mpstat อยู่เรื่อยๆ จะเห็นตัวเลข &#8220;intr/s&#8221; ของ CPU อื่นๆ เริ่มขึ้นมา แสดงว่า เริ่มมีการกระจาย IRQ ให้ CPU หลายๆ ตัวแล้ว</p>
<pre>[root@devel ~]# <strong>mpstat -P ALL
</strong>Linux 2.6.18-194.el5 (devel.example.com)   05/22/2011</pre>
<pre>04:05:10 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
04:05:10 PM  all   25.13    0.00    0.09    0.14    0.01    0.08    0.00   74.55   2268.53
04:05:10 PM    0    9.39    0.00    0.16    1.04    0.09    0.92    0.00   88.40   2267.99
04:05:10 PM    1   21.11    0.00    0.11    0.17    0.00    0.00    0.00   78.62      0.00
04:05:10 PM    2   27.66    0.00    0.09    0.09    0.00    0.00    0.00   72.15      0.00
04:05:10 PM    3   28.54    0.00    0.09    0.07    0.00    0.00    0.00   71.30      <span style="color: #ff0000;">0.01
</span>04:05:10 PM    4   31.10    0.00    0.10    0.07    0.00    0.00    0.00   68.73      <span style="color: #ff0000;"><strong>0.01
</strong></span>04:05:10 PM    5   29.37    0.00    0.10    0.05    0.00    0.00    0.00   70.47      <strong><span style="color: #ff0000;">0.01
</span></strong>04:05:10 PM    6   16.91    0.00    0.08    0.04    0.00    0.00    0.00   82.97      <span style="color: #ff0000;"><strong>0.08
</strong></span>04:05:10 PM    7   20.46    0.00    0.08    0.04    0.00    0.00    0.00   79.42      <strong><span style="color: #ff0000;">0.09</span></strong></pre>
<p>ลอง ssh login อีกครั้ง น่าจะดีขึ้น</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://spalinux.com/2008/06/fedora_9_minimal_service_description">รายละเอียดของแต่ละ service ใน Fedora 9</a></li>
<li><a href="http://spalinux.com/2011/05/using_sysstat_to_monitor_system">ตรวจสอบการทำงานเครื่องด้วย sysstat</a></li>
<li><a href="http://www.irqbalance.org/" target="_blank">What is irqbalance?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/05/distribute_interrupts_over_processors_cores/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ตรวจสอบการทำงานเครื่องด้วย sysstat</title>
		<link>http://spalinux.com/2011/05/using_sysstat_to_monitor_system</link>
		<comments>http://spalinux.com/2011/05/using_sysstat_to_monitor_system#comments</comments>
		<pubDate>Sun, 22 May 2011 11:28:58 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[sysstat]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1338</guid>
		<description><![CDATA[ก่อนที่จะปรับแต่งค่าคอนฟิกเพื่อเพิ่มพลังให้เครื่องได้นั้น  เราต้องเก็บรายละเอียดสถิติการทำงานของเครื่องก่อน เพื่อวิเคราะห์ดูว่า ส่วนไหนมีการใช้งานมากน้อยอย่างไร และนำผลที่ได้มาเพื่อเปรียบเทียบ วัดผลการทดสอบ ก่อนและหลังการแก้ไขคอนฟิก จึงจำเป็นต้องติดตั้งโปรแกรมเพิ่มเติม โปรแกรมที่นิยมใช้กัน คือ iostat, sar, mpstat ซึ่งถูกรวมไว้เป็นชุดโปรแกรมชื่อ sysstat ไฟล์ rpm สำหรับติดตั้ง ถ้าเป็น RedHat, CentOS จะมีอยู่ในแผ่นดีวีดีติดตั้งอยู่แล้ว แต่ถ้าเป็น Fedora ต้องดาวน์โหลดเพิ่มเติมจาก Fedora Everything ตัวอย่างการติดตั้ง sysstat บน CentOS 5.5 [root@devel ~]# mount /dev/cdrom   /media [root@devel ~]# cd /media/CentOS/ [root@devel CentOS]# ls -l sysstat-7.0.2-3.el5.x86_64.rpm -rw-rw-r-- 4 root root 177451 Mar 17  2009 sysstat-7.0.2-3.el5.x86_64.rpm [...]]]></description>
			<content:encoded><![CDATA[<p>ก่อนที่จะปรับแต่งค่าคอนฟิกเพื่อเพิ่มพลังให้เครื่องได้นั้น  เราต้องเก็บรายละเอียดสถิติการทำงานของเครื่องก่อน เพื่อวิเคราะห์ดูว่า ส่วนไหนมีการใช้งานมากน้อยอย่างไร และนำผลที่ได้มาเพื่อเปรียบเทียบ วัดผลการทดสอบ ก่อนและหลังการแก้ไขคอนฟิก</p>
<p>จึงจำเป็นต้องติดตั้งโปรแกรมเพิ่มเติม โปรแกรมที่นิยมใช้กัน คือ iostat, sar, mpstat ซึ่งถูกรวมไว้เป็นชุดโปรแกรมชื่อ sysstat</p>
<p><span id="more-1338"></span></p>
<p>ไฟล์ rpm สำหรับติดตั้ง ถ้าเป็น RedHat, CentOS จะมีอยู่ในแผ่นดีวีดีติดตั้งอยู่แล้ว แต่ถ้าเป็น Fedora ต้องดาวน์โหลดเพิ่มเติมจาก Fedora Everything</p>
<p>ตัวอย่างการติดตั้ง sysstat บน CentOS 5.5</p>
<pre>[root@devel ~]# <strong>mount /dev/cdrom   /media</strong></pre>
<pre>[root@devel ~]# <strong>cd /media/CentOS/
</strong>[root@devel CentOS]# <strong>ls -l sysstat-7.0.2-3.el5.x86_64.rpm</strong>
-rw-rw-r-- 4 root root 177451 Mar 17  2009 sysstat-7.0.2-3.el5.x86_64.rpm</pre>
<pre>[root@devel CentOS]# <strong>rpm -ivh sysstat-7.0.2-3.el5.x86_64.rpm
</strong>Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]</pre>
<pre>[root@devel CentOS]# <strong>cd ~
</strong>[root@devel ~]# <strong>umount /media
</strong>[root@devel ~]#</pre>
<h4>iostat วัดการใช้งาน Disk</h4>
<p>ตัวอย่างผลลัพธ์จากคำสั่ง iostat แสดงปริมาณ การ read/write โดยแยกตาม Disk/Partition</p>
<pre>[root@devel ~]# <strong>iostat
</strong>Linux 2.6.18-194.el5 (devel.example.com)   05/22/2011</pre>
<pre>avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          25.10    0.00    0.18    0.14    0.00   74.58</pre>
<pre>Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               3.24        18.36       213.87   69399070  808554725
sda1              0.00         0.00         0.00       1602          4
sda2              2.82        11.13       139.51   42073602  527428384
sda3              0.20         7.04        29.05   26602763  109816920
sda4              0.22         0.19        45.31     720679  171309417</pre>
<h4>sar วัดการใช้งาน CPU</h4>
<p>ตัวอย่างผลลัพธ์จากคำสั่ง sar เพื่อตรวจสอบ % การใช้งาน CPU โดยวัดค่าทุกๆ 10 วินาที จำนวน 3 ครั้ง</p>
<pre>[root@devel ~]# <strong>sar 10 3
</strong>Linux 2.6.18-194.el5 (devel.example.com)   05/22/2011</pre>
<pre>06:16:45 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle
06:16:55 PM       all      0.00      0.00      0.01      0.03      0.00     99.97
06:17:05 PM       all      0.17      0.00      0.06      0.08      0.00     99.70
06:17:15 PM       all      0.01      0.00      0.00      0.06      0.00     99.93
Average:          all      0.06      0.00      0.02      0.05      0.00     99.87</pre>
<pre> </pre>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/05/using_sysstat_to_monitor_system/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การปรับแต่งประสิทธิภาพของ Linux</title>
		<link>http://spalinux.com/2011/05/linux_performance_tuning</link>
		<comments>http://spalinux.com/2011/05/linux_performance_tuning#comments</comments>
		<pubDate>Sat, 21 May 2011 17:15:29 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1332</guid>
		<description><![CDATA[นานแล้ว ไม่ได้ดูเรื่อง performance อย่างจริงจัง เพราะเครื่องส่วนใหญ่ที่ติดตั้ง แค่ปรับแต่งค่าคอนฟิกนิดหน่อยก็สามารถใช้งานได้อย่างดีแล้ว เนื่องด้วยทั้ง CPU, Memory, Disk รุ่นใหม่ๆ ค่อนข้างเร็ว แต่ช่วงนี้ เครื่องเซิร์ฟเวอร์ที่ติดตั้งไปหลายๆ เครื่อง โดนกระหน่ำใช้งานอย่างหนักทั้ง read และ write จึงต้องหาวิธีปรับแต่ง รีดพลังความสามารถจากทุกส่วนประกอบของเครื่องเลย เคยเขียนบนเว็บไซต์ไปบ้างแล้ว ถึงการปรับแต่งพื้นฐาน แต่คราวนี้ขอลงรายละเอียดมากหน่อย เพื่ออาจเป็นประโยชน์กับผู้ดูแลระบบที่กำลังประสบปัญหา โดนผู้ใช้ (users) บ่นเป็นประจำ คำแนะนำ/คำเตือน ในการปรับแต่งค่าคอนฟิก  - ทดสอบบนเครื่องทดลอง (test/development) ให้เข้าใจและแน่ใจถึงผลกระทบจากการแก้ไขคอนฟิก ก่อนแก้ไขบนเครื่อง production  - ใช้หลักสถิติในการทดสอบ คือทดสอบหลายๆ ครั้ง แล้วนำผลที่ได้มาเปรียบเทียบกัน  - สำรองข้อมูล หรือคอนฟิกก่อนการแก้ไข เผื่อแก้ไขแล้วมีปัญหา จะได้แก้กลับได้  - แก้ไขคอนฟิกในช่วงเวลาไม่มีการใช้งาน หรือใช้งานน้อยที่สุด เพราะการแก้ไขบางอย่าง อาจจำเป็นต้องรีสตาร์ต service เอกสารหนึ่งที่ผู้เขียนแนะนำ คือ &#8220;IBM Redbooks [...]]]></description>
			<content:encoded><![CDATA[<p>นานแล้ว ไม่ได้ดูเรื่อง performance อย่างจริงจัง เพราะเครื่องส่วนใหญ่ที่ติดตั้ง แค่ปรับแต่งค่าคอนฟิกนิดหน่อยก็สามารถใช้งานได้อย่างดีแล้ว เนื่องด้วยทั้ง CPU, Memory, Disk รุ่นใหม่ๆ ค่อนข้างเร็ว</p>
<p>แต่ช่วงนี้ เครื่องเซิร์ฟเวอร์ที่ติดตั้งไปหลายๆ เครื่อง โดนกระหน่ำใช้งานอย่างหนักทั้ง read และ write จึงต้องหาวิธีปรับแต่ง รีดพลังความสามารถจากทุกส่วนประกอบของเครื่องเลย</p>
<p>เคยเขียนบนเว็บไซต์ไปบ้างแล้ว ถึงการปรับแต่งพื้นฐาน แต่คราวนี้ขอลงรายละเอียดมากหน่อย เพื่ออาจเป็นประโยชน์กับผู้ดูแลระบบที่กำลังประสบปัญหา โดนผู้ใช้ (users) บ่นเป็นประจำ <img src='http://spalinux.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><span id="more-1332"></span></p>
<p><span style="color: #ff0000;">คำแนะนำ/คำเตือน ในการปรับแต่งค่าคอนฟิก</span></p>
<p> - ทดสอบบนเครื่องทดลอง (test/development) ให้เข้าใจและแน่ใจถึงผลกระทบจากการแก้ไขคอนฟิก ก่อนแก้ไขบนเครื่อง production<br />
 - ใช้หลักสถิติในการทดสอบ คือทดสอบหลายๆ ครั้ง แล้วนำผลที่ได้มาเปรียบเทียบกัน<br />
 - สำรองข้อมูล หรือคอนฟิกก่อนการแก้ไข เผื่อแก้ไขแล้วมีปัญหา จะได้แก้กลับได้<br />
 - แก้ไขคอนฟิกในช่วงเวลาไม่มีการใช้งาน หรือใช้งานน้อยที่สุด เพราะการแก้ไขบางอย่าง อาจจำเป็นต้องรีสตาร์ต service</p>
<p>เอกสารหนึ่งที่ผู้เขียนแนะนำ คือ &#8220;IBM Redbooks : Linux Performance and Tuning Guidelines&#8221; ซึ่งสามารถดาวน์โหลดได้ฟรีจากเว็บไซต์ IBM</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://www.redbooks.ibm.com/abstracts/redp4285.html" target="_blank">Linux Performance and Tuning Guidelines &#8211; An IBM Redpaper publication</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/05/linux_performance_tuning/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การใช้งานเบื้องต้น Sun Grid Engine</title>
		<link>http://spalinux.com/2011/01/how_to_use_sun_grid_engine</link>
		<comments>http://spalinux.com/2011/01/how_to_use_sun_grid_engine#comments</comments>
		<pubDate>Sat, 29 Jan 2011 09:22:25 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Cluster]]></category>
		<category><![CDATA[Grid]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Oracle Grid Engine]]></category>
		<category><![CDATA[Submit Job]]></category>
		<category><![CDATA[Sun Grid Engine]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1245</guid>
		<description><![CDATA[หลังจากติดตั้ง Sun Grid ทั้งเครื่อง qmaster และ execd host เรียบร้อยแล้ว บทความนี้จะแนะนำวิธีการใช้งานเบื้องต้นของ Sun Grid Engine เพื่อดูสถานะของเครื่อง งานที่รัน และวิธีการส่งงานอย่างง่ายๆ ตั้งค่าตัวแปร setting.sh ต้องรัน source ไฟล์ /gridware/sge/MyCell/common/settings.sh เพื่อตั้งค่าตัวแปรของ sge ก่อนที่จะรันคำสั่ง วิธีการรัน ใช้คำสั่ง source หรือ . เว้นวรรคแล้วตามด้วยชื่อไฟล์ /gridware/sge/MyCell/common/settings.sh [root@cent55-sge ~]# . /gridware/sge/MyCell/common/settings.sh ลองรันคำสั่ง set เพื่อดูค่าตัวแปรที่ถูกตั้งค่า เกี่ยวกับ sge [root@cent55-sge ~]# set &#124; grep -i sge MANPATH=/gridware/sge/man:/usr/share/man/en:/usr/share/man:/usr/local/share/man PATH=/gridware/sge/bin/lx24-amd64:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin SGE_CELL=MyCell SGE_CLUSTER_NAME=MyCluster SGE_ROOT=/gridware/sge คำสั่ง qconf [...]]]></description>
			<content:encoded><![CDATA[<p>หลังจากติดตั้ง Sun Grid ทั้งเครื่อง qmaster และ execd host เรียบร้อยแล้ว บทความนี้จะแนะนำวิธีการใช้งานเบื้องต้นของ Sun Grid Engine เพื่อดูสถานะของเครื่อง งานที่รัน และวิธีการส่งงานอย่างง่ายๆ</p>
<p><span id="more-1245"></span></p>
<h4>ตั้งค่าตัวแปร setting.sh</h4>
<p>ต้องรัน source ไฟล์ /gridware/sge/MyCell/common/settings.sh เพื่อตั้งค่าตัวแปรของ sge ก่อนที่จะรันคำสั่ง</p>
<p>วิธีการรัน ใช้คำสั่ง source หรือ . เว้นวรรคแล้วตามด้วยชื่อไฟล์ /gridware/sge/MyCell/common/settings.sh</p>
<pre>[root@cent55-sge ~]# <strong>. /gridware/sge/MyCell/common/settings.sh</strong></pre>
<p>ลองรันคำสั่ง set เพื่อดูค่าตัวแปรที่ถูกตั้งค่า เกี่ยวกับ sge</p>
<pre>[root@cent55-sge ~]# <strong>set | grep -i sge
</strong>MANPATH=<span style="color: #0000ff;">/gridware/sge/man</span>:/usr/share/man/en:/usr/share/man:/usr/local/share/man
PATH=<span style="color: #0000ff;">/gridware/sge/bin/lx24-amd64</span>:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
<span style="color: #0000ff;">SGE_CELL=MyCell</span>
<span style="color: #0000ff;">SGE_CLUSTER_NAME=MyCluster</span>
<span style="color: #0000ff;">SGE_ROOT=/gridware/sge</span></pre>
<h4>คำสั่ง qconf ดูคอนฟิก</h4>
<p>ใช้คำสั่ง qconf ตามด้วยออปชั่น เพื่อดูค่าคอนฟิกต่างๆ ของ sge</p>
<p>รันคำสั่ง qconf -ss เพื่อดูชื่อเครื่องที่มีสิทธิส่งงานหรือใช้คำสั่ง qsub ได้ (show a list of all submit hosts)</p>
<pre>[root@cent55-sge ~]# <strong>qconf -ss
</strong>cent55-node1.spalinux.com
cent55-node2.spalinux.com
cent55-sge.spalinux.com</pre>
<p>รันคำสั่ง qconf -sel เพื่อดูชื่อเครื่องที่ทำหน้าที่รันงาน (show a list of all exec servers)</p>
<pre>[root@cent55-sge ~]# <strong>qconf -sel
</strong>cent55-node1.spalinux.com
cent55-node2.spalinux.com</pre>
<h4>คำสั่ง qstat ดูสถานะ</h4>
<p>ใช้คำสั่ง qstat ตามด้วยออปชั่น เพื่อดูสถานะของงาน (job) และ queue ในการรันงาน</p>
<p>รันคำสั่ง qstat -f เพื่อดูสถานะของเครื่อง execd host และงานที่รัน</p>
<pre>[root@cent55-sge ~]# <strong>qstat -f
</strong>queuename                      qtype resv/used/tot. load_avg arch          states
---------------------------------------------------------------------------------
all.q@cent55-node1.spalinux.co BIP   0/0/1          0.00     lx24-amd64
---------------------------------------------------------------------------------
all.q@cent55-node2.spalinux.co BIP   0/0/1          0.34     lx24-amd64</pre>
<h4>ทดสอบการส่ง job</h4>
<p>เริ่มต้นจะทดลองส่ง job แบบง่ายๆ รันไฟล์ simple.sh ที่มาจากการติดตั้งโปรแกรม Sun Grid Engine</p>
<p>ไฟล์ simple เป็น shell script ที่รันคำสั่ง date รอ (sleep) 20 วินาที แล้วรันคำสั่ง date อีกครั้ง</p>
<pre>[root@cent55-sge ~]# <strong>cat /gridware/sge/examples/jobs/simple.sh
</strong>#!/bin/sh
#
#
# (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.</pre>
<pre># This is a simple example of a SGE batch script</pre>
<pre># request Bourne shell as shell for job
#$ -S /bin/sh</pre>
<pre>#
# print date and time
date
# Sleep for 20 seconds
sleep 20
# print date and time again
date</pre>
<p>ใช้คำสั่ง qsub ตามด้วยชื่อไฟล์ที่ต้องการรัน</p>
<pre>[root@cent55-sge ~]# <strong>qsub /gridware/sge/examples/jobs/simple.sh
</strong>Your job <span style="color: #0000ff;">206</span> ("simple.sh") has been submitted</pre>
<p>ใช้คำสั่ง qstat -f เพื่อดูสถานะของ job</p>
<pre>[root@cent55-sge ~]# <strong>qstat -f
</strong>queuename                      qtype resv/used/tot. load_avg arch          states
---------------------------------------------------------------------------------
all.q@cent55-node1.spalinux.co BIP   0/0/1          0.00     lx24-amd64
---------------------------------------------------------------------------------
all.q@cent55-node2.spalinux.co BIP   0/0/1          0.09     lx24-amd64</pre>
<pre>############################################################################
 - PENDING JOBS - PENDING JOBS - PENDING JOBS - PENDING JOBS - PENDING JOBS
############################################################################
<span style="color: #0000ff;">    206 0.00000 simple.sh  root         qw    01/29/2011 15:43:06     1</span></pre>
<p>ทดลองพิมพ์คำสั่ง qstat -f ไปเรื่อยๆ ช่วงแรก job 206 จะอยู่ในสถานะ PENDING JOBS คือรอการรัน</p>
<p>ผ่านไปไม่นาน สถานะของ job 206 จะเริ่มรันบนเครื่อง execd host ในตัวอย่างนี้รันบนเครื่อง node1</p>
<pre>[root@cent55-sge ~]# <strong>qstat -f
</strong>queuename                      qtype resv/used/tot. load_avg arch          states
---------------------------------------------------------------------------------
all.q@cent55-node1.spalinux.co BIP   0/1/1          0.00     lx24-amd64
<span style="color: #0000ff;">    206 0.55500 simple.sh  root         r     01/29/2011 15:43:15     1
</span>---------------------------------------------------------------------------------
all.q@cent55-node2.spalinux.co BIP   0/0/1          0.09     lx24-amd64</pre>
<p>หากล็อกอินเครื่อง node1 แล้วใช้คำสั่ง ps  จะเห็นโปรเซสของ job 206</p>
<pre style="text-align: justify;">[root@cent55-node1 ~]# <strong>ps -ef
</strong>...
sgeadmin  2192  2129  0 15:43 ?        00:00:00 sge_shepherd-206 -bg
root      2193  2192  0 15:43 ?        00:00:00 <span style="color: #0000ff;">-sh /gridware/sge/MyCell/spool/cent55-node1/job_scripts/206
</span>root      2218  2193  0 15:43 ?        00:00:00 sleep 20
root      2221  1754  0 15:43 pts/0    00:00:00 ps -ef</pre>
<p>ดูไฟล์โปรเซสที่รันบนเครื่อง node1 ซึ่งก็คือไฟล์ simple.sh นั่นเอง</p>
<pre>[root@cent55-node1 ~]# cat /gridware/sge/MyCell/spool/cent55-node1/job_scripts/206
#!/bin/sh
#
#
# (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.</pre>
<pre># This is a simple example of a SGE batch script</pre>
<pre># request Bourne shell as shell for job
#$ -S /bin/sh</pre>
<pre>#
# print date and time
date
# Sleep for 20 seconds
sleep 20
# print date and time again
date</pre>
<p>หลังจากรันงานเสร็จสิ้น สถานะ job 206 ก็จะหายไปจากคำสั่ง qstat</p>
<pre>[root@cent55-sge ~]# <strong>qstat -f
</strong>queuename                      qtype resv/used/tot. load_avg arch          states
---------------------------------------------------------------------------------
all.q@cent55-node1.spalinux.co BIP   0/0/1          0.00     lx24-amd64
---------------------------------------------------------------------------------
all.q@cent55-node2.spalinux.co BIP   0/0/1          0.09     lx24-amd64</pre>
<p>ผลลัพธ์ที่ได้จากการรันไฟล์ simple.sh จะถูกเก็บไว้บนเครื่อง execd host ที่ทำหน้าที่รัน เช่นในที่นี้คือบน node1</p>
<p>ไฟล์ simple.sh.o206 เก็บผลลัพธ์ standard output จากการรัน job 206</p>
<pre>[root@cent55-node1 ~]# <strong>cat simple.sh.o206
</strong>Sat Jan 29 15:43:14 ICT 2011
Sat Jan 29 15:43:34 ICT 2011</pre>
<p>ไฟล์ simple.sh.e206 เก็บผลลัพธ์ standard error จากการรัน job</p>
<pre>[root@cent55-node1 ~]# <strong>cat simple.sh.e206</strong></pre>
<p>ในที่นี้ไม่มี error จากการรัน ไฟล์จึงว่างเปล่า</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://spalinux.com/2011/01/install_sun_grid_engine_on_centos_5-5">ติดตั้ง Sun Grid Engine บน CentOS 5.5</a></li>
<li><a href="http://spalinux.com/2011/01/configure_sun_grid_engine_qmaster_host">คอนฟิก Sun Grid Engine qmaster host</a></li>
<li><a href="http://spalinux.com/2011/01/configure_sun_grid_engine_execd_host">คอนฟิก Sun Grid Engine execution (execd) host</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/01/how_to_use_sun_grid_engine/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>คอนฟิก Sun Grid Engine execution (execd) host</title>
		<link>http://spalinux.com/2011/01/configure_sun_grid_engine_execd_host</link>
		<comments>http://spalinux.com/2011/01/configure_sun_grid_engine_execd_host#comments</comments>
		<pubDate>Sat, 29 Jan 2011 07:45:11 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Cluster]]></category>
		<category><![CDATA[Grid]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Oracle Grid Engine]]></category>
		<category><![CDATA[Sun Grid Engine]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1237</guid>
		<description><![CDATA[เช่นเดียวกับเครื่องที่ทำหน้าที่เป็น qmaster  การเริ่มคอนฟิกเครื่อง execd host ก็ต้อง ติดตั้ง Sun Grid Engine บน CentOS 5.5 ก่อนแล้วค่อยคอนฟิกให้ทำหน้าที่เป็น execd host หมายเหตุ ตัวอย่างในบทความนี้คอนฟิกบน node1 เครื่องเดียว ส่วนเครื่องอื่นๆ ที่จะทำหน้าที่เป็น execd host ด้วย ก็คอนฟิกแบบเดียวกัน หลังจากติดตั้ง Sun Grid Engine แล้ว cd ไปยังไดเรคทอรีที่ติดตั้ง sge [root@cent55-node1 sge6_2u5]# cd /gridware/sge/ [root@cent55-node1 sge]# ls -l total 136 drwxr-xr-x  2 root root  4096 Jan  8 22:25 3rd_party drwxr-xr-x  3 root root  [...]]]></description>
			<content:encoded><![CDATA[<p>เช่นเดียวกับเครื่องที่ทำหน้าที่เป็น qmaster  การเริ่มคอนฟิกเครื่อง execd host ก็ต้อง <a href="http://spalinux.com/2011/01/install_sun_grid_engine_on_centos_5-5">ติดตั้ง Sun Grid Engine บน CentOS 5.5</a> ก่อนแล้วค่อยคอนฟิกให้ทำหน้าที่เป็น execd host</p>
<p>หมายเหตุ ตัวอย่างในบทความนี้คอนฟิกบน node1 เครื่องเดียว ส่วนเครื่องอื่นๆ ที่จะทำหน้าที่เป็น execd host ด้วย ก็คอนฟิกแบบเดียวกัน</p>
<p><span id="more-1237"></span></p>
<p>หลังจากติดตั้ง Sun Grid Engine แล้ว cd ไปยังไดเรคทอรีที่ติดตั้ง sge</p>
<pre>[root@cent55-node1 sge6_2u5]# <strong>cd /gridware/sge/</strong></pre>
<pre>[root@cent55-node1 sge]# <strong>ls -l
</strong>total 136
drwxr-xr-x  2 root root  4096 Jan  8 22:25 3rd_party
drwxr-xr-x  3 root root  4096 Jan  8 22:25 bin
drwxr-xr-x  3 root root  4096 Jan  8 22:25 catman
drwxr-xr-x  2 root root  4096 Jan  8 22:25 ckpt
drwxr-xr-x  5 root root  4096 Jan  8 22:25 doc
drwxr-xr-x  2 root root  4096 Jan  8 22:25 dtrace
drwxr-xr-x  5 root root  4096 Jan  8 22:25 examples
drwxr-xr-x  2 root root  4096 Jan  8 22:25 hadoop
drwxr-xr-x  2 root root  4096 Jan  8 22:25 include
-rwxr-xr-x  1 root root   125 Dec 11  2009 install_execd
-rwxr-xr-x  1 root root   125 Dec 11  2009 install_qmaster
-rwxr-xr-x  1 root root 59960 Dec 11  2009 inst_sge
drwxr-xr-x  3 root root  4096 Jan  8 22:25 lib
drwxr-xr-x  6 root root  4096 Jan  8 22:25 man
drwxr-xr-x  4 root root  4096 Jan  8 22:25 mpi
drwxr-xr-x  3 root root  4096 Jan  8 22:25 pvm
drwxr-xr-x  3 root root  4096 Jan  8 22:25 qmon
-rwxr-xr-x  1 root root  1289 Dec 11  2009 start_gui_installer
drwxr-xr-x 10 root root  4096 Jan  8 22:25 util
drwxr-xr-x  3 root root  4096 Jan  8 22:25 utilbin</pre>
<p>ต้อง copy ไดเรคทอรี ของ cell ที่คอนฟิกไว้บนเครื่อง qmaster host</p>
<p>ล็อกอินเข้าเครื่อง sge แล้วรันคำสั่ง tar ใน /gridware/sge/ เพื่อรวมไฟล์ทั้งหมดที่อยู่ในไดเรคทอรีของ cell ในที่นี้เราตั้งชื่อเป็น MyCell</p>
<pre>[root@cent55-sge ~]# <strong>cd /gridware/sge/</strong></pre>
<pre>[root@cent55-sge sge]# <strong>tar jcvpf MyCell.tar.bz2 MyCell/
</strong>MyCell/
MyCell/spool/
MyCell/spool/qmaster/
MyCell/spool/qmaster/heartbeat
MyCell/spool/qmaster/arseqnum
MyCell/spool/qmaster/qmaster.pid
MyCell/spool/qmaster/messages
MyCell/spool/qmaster/job_scripts/
MyCell/spool/qmaster/jobseqnum
MyCell/spool/qmaster/lock
MyCell/spool/spooldb/
MyCell/spool/spooldb/__db.005
MyCell/spool/spooldb/__db.001
MyCell/spool/spooldb/sge_job
MyCell/spool/spooldb/__db.003
MyCell/spool/spooldb/log.0000000001
MyCell/spool/spooldb/__db.004
MyCell/spool/spooldb/__db.002
MyCell/spool/spooldb/sge
MyCell/spool/spooldb/__db.006
MyCell/common/
MyCell/common/settings.csh
MyCell/common/sgeexecd
MyCell/common/act_qmaster
MyCell/common/bootstrap
MyCell/common/sgemaster
MyCell/common/sge_aliases
MyCell/common/sge_request
MyCell/common/cluster_name
MyCell/common/qtask
MyCell/common/settings.sh</pre>
<p>copy ไฟล์ ไปยังเครื่อง node1 โดยอาจใช้คำสั่ง scp หรืออื่นๆ ก็ได้</p>
<pre>[root@cent55-sge sge]# <strong>scp MyCell.tar.bz2 cent55-node1:</strong></pre>
<p>กลับมายังเครื่อง node1 รันคำสั่ง tar เพื่อแตกไฟล์ ไว้ใน /gridware/sge/</p>
<pre>[root@cent55-node1 sge]# <strong>tar jxvf /root/MyCell.tar.bz2
</strong>MyCell/
MyCell/spool/
MyCell/spool/qmaster/
MyCell/spool/qmaster/heartbeat
MyCell/spool/qmaster/arseqnum
MyCell/spool/qmaster/qmaster.pid
MyCell/spool/qmaster/messages
MyCell/spool/qmaster/job_scripts/
MyCell/spool/qmaster/jobseqnum
MyCell/spool/qmaster/lock
MyCell/spool/spooldb/
MyCell/spool/spooldb/__db.005
MyCell/spool/spooldb/__db.001
MyCell/spool/spooldb/sge_job
MyCell/spool/spooldb/__db.003
MyCell/spool/spooldb/log.0000000001
MyCell/spool/spooldb/__db.004
MyCell/spool/spooldb/__db.002
MyCell/spool/spooldb/sge
MyCell/spool/spooldb/__db.006
MyCell/common/
MyCell/common/settings.csh
MyCell/common/sgeexecd
MyCell/common/act_qmaster
MyCell/common/bootstrap
MyCell/common/sgemaster
MyCell/common/sge_aliases
MyCell/common/sge_request
MyCell/common/cluster_name
MyCell/common/qtask
MyCell/common/settings.sh</pre>
<p>รันคำสั่ง ./install_execd หรือ ./inst_sge -x เพื่อติดตั้ง sge บนเครื่องนี้ให้ทำหน้าที่เป็น qmaster host</p>
<p>หน้าจอแสดงเริ่มต้นการติดตั้งเป็น sge execution host</p>
<pre>[root@cent55-node1 sge]# <strong>./inst_sge -x</strong></pre>
<pre>Welcome to the Grid Engine execution host installation
------------------------------------------------------</pre>
<pre>If you haven't installed the Grid Engine qmaster host yet, you must execute
this step (with &gt;install_qmaster&lt;) prior the execution host installation.</pre>
<pre>For a sucessfull installation you need a running Grid Engine qmaster. It is
also neccesary that this host is an administrative host.</pre>
<pre>You can verify your current list of administrative hosts with
the command:</pre>
<pre>   # qconf -sh</pre>
<pre>You can add an administrative host with the command:</pre>
<pre>   # qconf -ah &lt;hostname&gt;</pre>
<pre>The execution host installation will take approximately 5 minutes.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ตรวจสอบไดเรคทอรีหลัก</p>
<pre>Checking $SGE_ROOT directory
----------------------------</pre>
<pre>The Grid Engine root directory is:</pre>
<pre>   $SGE_ROOT = /gridware/sge</pre>
<pre>If this directory is not correct (e.g. it may contain an automounter
prefix) enter the correct path to this directory or hit &lt;RETURN&gt;
to use default [/gridware/sge] &gt;&gt;</pre>
<pre>Your $SGE_ROOT directory: /gridware/sge</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ระบุชื่อ cell ที่คอนฟิกไว้บน qmaster ในที่นี้คือ MyCell</p>
<pre>Grid Engine cells
-----------------</pre>
<pre>Please enter cell name which you used for the qmaster
installation or press &lt;RETURN&gt; to use [default] &gt;&gt; MyCell</pre>
<pre>Using cell: &gt;<span style="color: #0000ff;">MyCell</span>&lt;</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>พอร์ตสำหรับรัน sge_execd</p>
<pre>Grid Engine TCP/IP communication service
----------------------------------------</pre>
<pre>The port for sge_execd is currently set as service.</pre>
<pre>   sge_execd service set to port 10501</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>หาก node นี้อยู่ใน administrative host บน sge qmaster แล้ว</p>
<pre>Checking hostname resolving
---------------------------</pre>
<pre>This hostname is known at qmaster as an administrative host.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>คอนฟิกไดเรคทอรี spool</p>
<pre>Execd spool directory configuration
-----------------------------------</pre>
<pre>You defined a global spool directory when you installed the master host.
You can use that directory for spooling jobs from this execution host
or you can define a different spool directory for this execution host.</pre>
<pre>ATTENTION: For most operating systems, the spool directory does not have to
be located on a local disk. The spool directory can be located on a
network-accessible drive. However, using a local spool directory provides
better performance.</pre>
<pre>FOR WINDOWS USERS: On Windows systems, the spool directory MUST be located
on a local disk. If you install an execution daemon on a Windows system
without a local spool directory, the execution host is unusable.</pre>
<pre>The spool directory is currently set to:
&lt;&lt;<span style="color: #0000ff;">/gridware/sge/MyCell/spool/cent55-node1</span>&gt;&gt;</pre>
<pre>Do you want to configure a different spool directory
for this host (y/n) [n] &gt;&gt;</pre>
<pre>Creating local configuration
----------------------------
sgeadmin@cent55-node1.spalinux.com added "cent55-node1.spalinux.com" to configuration list
Local configuration for host &gt;cent55-node1.spalinux.com&lt; created.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt; </pre>
<p>สร้างไฟล์สำหรับรัน sge execd ตอนบู๊ตเครื่อง</p>
<pre>execd startup script
--------------------</pre>
<pre>We can install the startup script that will
start execd at machine boot (y/n) [y] &gt;&gt;</pre>
<pre>cp /gridware/sge/MyCell/common/sgeexecd /etc/init.d/sgeexecd.MyCluster
/usr/lib/lsb/install_initd /etc/init.d/sgeexecd.MyCluster</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<pre>Grid Engine execution daemon startup
------------------------------------</pre>
<pre>Starting execution daemon. Please wait ...
   starting sge_execd</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>เพิ่ม queue</p>
<pre> Adding a queue for this host
----------------------------</pre>
<pre>We can now add a queue instance for this host:</pre>
<pre>   - it is added to the &gt;allhosts&lt; hostgroup
   - the queue provides 1 slot(s) for jobs in all queues
     referencing the &gt;allhosts&lt; hostgroup</pre>
<pre>You do not need to add this host now, but before running jobs on this host
it must be added to at least one queue.</pre>
<pre>Do you want to add a default queue instance for this host (y/n) [y] &gt;&gt;</pre>
<pre>root@cent55-node1.spalinux.com modified "@allhosts" in host group list
root@cent55-node1.spalinux.com modified "all.q" in cluster queue list</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>หน้าจอแสดงวิธีการใช้ sge</p>
<pre>Using Grid Engine
-----------------</pre>
<pre>You should now enter the command:</pre>
<pre>   source /gridware/sge/MyCell/common/settings.csh</pre>
<pre>if you are a csh/tcsh user or</pre>
<pre>   # . /gridware/sge/MyCell/common/settings.sh</pre>
<pre>if you are a sh/ksh user.</pre>
<pre>This will set or expand the following environment variables:</pre>
<pre>   - $SGE_ROOT         (always necessary)
   - $SGE_CELL         (if you are using a cell other than &gt;default&lt;)
   - $SGE_CLUSTER_NAME (always necessary)
   - $SGE_QMASTER_PORT (if you haven't added the service &gt;sge_qmaster&lt;)
   - $SGE_EXECD_PORT   (if you haven't added the service &gt;sge_execd&lt;)
   - $PATH/$path       (to find the Grid Engine binaries)
   - $MANPATH          (to access the manual pages)</pre>
<pre>Hit &lt;RETURN&gt; to see where Grid Engine logs messages &gt;&gt;</pre>
<pre>Grid Engine messages
--------------------</pre>
<pre>Grid Engine messages can be found at:</pre>
<pre>   /tmp/qmaster_messages (during qmaster startup)
   /tmp/execd_messages   (during execution daemon startup)</pre>
<pre>After startup the daemons log their messages in their spool directories.</pre>
<pre>   Qmaster:     /gridware/sge/MyCell/spool/qmaster/messages
   Exec daemon: &lt;execd_spool_dir&gt;/&lt;hostname&gt;/messages</pre>
<pre>Grid Engine startup scripts
---------------------------</pre>
<pre>Grid Engine startup scripts can be found at:</pre>
<pre>   /gridware/sge/MyCell/common/sgemaster (qmaster)
   /gridware/sge/MyCell/common/sgeexecd (execd)</pre>
<pre>Do you want to see previous screen about using Grid Engine again (y/n) [n] &gt;&gt;</pre>
<pre>Your execution daemon installation is now completed.</pre>
<p>ใช้คำสั่ง ps ตรวจสอบโปรเซส sge_execd</p>
<pre>[root@cent55-node1 sge]# <strong>ps -ef | grep sge
</strong>sgeadmin  2346     1  0 22:37 ?        00:00:00 /gridware/sge/bin/lx24-amd64/sge_execd
root      2414  1668  0 22:39 pts/0    00:00:00 grep sge</pre>
<h4> <br />
การเปิด/ปิด เซอร์วิส sge_execd</h4>
<p>การปิดเซอร์วิส sgeexecd</p>
<pre>[root@cent55-node1 sge]# <strong>/etc/init.d/sgeexecd.MyCluster stop
</strong>   Shutting down Grid Engine execution daemon</pre>
<p>การเปิดหรือรันเซอร์วิส sgeexecd</p>
<pre>[root@cent55-node1 sge]# <strong>/etc/init.d/sgeexecd.MyCluster start
</strong>   starting sge_execd</pre>
<h4> <br />
ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://spalinux.com/2011/01/install_sun_grid_engine_on_centos_5-5">ติดตั้ง Sun Grid Engine บน CentOS 5.5</a></li>
<li><a href="http://spalinux.com/2011/01/configure_sun_grid_engine_qmaster_host">คอนฟิก Sun Grid Engine qmaster host</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/01/configure_sun_grid_engine_execd_host/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>คอนฟิก Sun Grid Engine qmaster host</title>
		<link>http://spalinux.com/2011/01/configure_sun_grid_engine_qmaster_host</link>
		<comments>http://spalinux.com/2011/01/configure_sun_grid_engine_qmaster_host#comments</comments>
		<pubDate>Sat, 15 Jan 2011 16:48:59 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Cluster]]></category>
		<category><![CDATA[Grid]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Oracle Grid Engine]]></category>
		<category><![CDATA[Sun Grid Engine]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1231</guid>
		<description><![CDATA[หลังจาก ติดตั้ง Sun Grid Engine บน CentOS 5.5 แล้ว บทความนี้จะกล่าวถึงวิธีการคอนฟิก sge ให้ทำหน้าที่เป็น qmaster host สำหรับจัดการเรื่อง job เริ่มต้น ใช้คำสั่ง cd ไปยังไดเรคทอรีที่ติดตั้ง sge [root@cent55-sge sge6_2u5]# cd /gridware/sge/ [root@cent55-sge sge]# ls -l total 136 drwxr-xr-x  2 root root  4096 Jan  8 12:40 3rd_party drwxr-xr-x  3 root root  4096 Jan  8 12:48 bin drwxr-xr-x  3 root root  4096 Jan  [...]]]></description>
			<content:encoded><![CDATA[<p>หลังจาก <a href="http://spalinux.com/2011/01/install_sun_grid_engine_on_centos_5-5">ติดตั้ง Sun Grid Engine บน CentOS 5.5</a> แล้ว บทความนี้จะกล่าวถึงวิธีการคอนฟิก sge ให้ทำหน้าที่เป็น qmaster host สำหรับจัดการเรื่อง job</p>
<p><span id="more-1231"></span>เริ่มต้น ใช้คำสั่ง cd ไปยังไดเรคทอรีที่ติดตั้ง sge</p>
<pre>[root@cent55-sge sge6_2u5]# <strong>cd /gridware/sge/</strong></pre>
<pre>[root@cent55-sge sge]# <strong>ls -l
</strong>total 136
drwxr-xr-x  2 root root  4096 Jan  8 12:40 3rd_party
drwxr-xr-x  3 root root  4096 Jan  8 12:48 bin
drwxr-xr-x  3 root root  4096 Jan  8 12:40 catman
drwxr-xr-x  2 root root  4096 Jan  8 12:40 ckpt
drwxr-xr-x  5 root root  4096 Jan  8 12:40 doc
drwxr-xr-x  2 root root  4096 Jan  8 12:40 dtrace
drwxr-xr-x  5 root root  4096 Jan  8 12:48 examples
drwxr-xr-x  2 root root  4096 Jan  8 12:40 hadoop
drwxr-xr-x  2 root root  4096 Jan  8 12:40 include
-rwxr-xr-x  1 root root   125 Dec 11  2009 install_execd
-rwxr-xr-x  1 root root   125 Dec 11  2009 install_qmaster
-rwxr-xr-x  1 root root 59960 Dec 11  2009 inst_sge
drwxr-xr-x  3 root root  4096 Jan  8 12:48 lib
drwxr-xr-x  6 root root  4096 Jan  8 12:40 man
drwxr-xr-x  4 root root  4096 Jan  8 12:40 mpi
drwxr-xr-x  3 root root  4096 Jan  8 12:40 pvm
drwxr-xr-x  3 root root  4096 Jan  8 12:40 qmon
-rwxr-xr-x  1 root root  1289 Dec 11  2009 start_gui_installer
drwxr-xr-x 10 root root  4096 Jan  8 12:40 util
drwxr-xr-x  3 root root  4096 Jan  8 12:48 utilbin</pre>
<p>รันคำสั่ง ./install_qmaster หรือ ./inst_sge -m เพื่อเริ่มคอนฟิก sge บนเครื่องนี้ ให้ทำหน้าที่เป็น qmaster host</p>
<pre>[root@cent55-sge sge]# <strong>./inst_sge -m
</strong>Sun Microsystems, Inc. ("Sun") SOFTWARE LICENSE AGREEMENT</pre>
<pre>READ THE TERMS OF THIS AGREEMENT ("AGREEMENT") CAREFULLY BEFORE OPENING
SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE
TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING SOFTWARE ELECTRONICALLY,
INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" (OR
EQUIVALENT) BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL
OF THE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE
FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE
"DECLINE" (OR "EXIT") BUTTON AT THE END OF THIS AGREEMENT. IF YOU HAVE
SEPARATELY AGREED TO LICENSE TERMS ("MASTER TERMS") FOR YOUR LICENSE TO THIS
SOFTWARE, THEN SECTIONS 1-6 OF THIS AGREEMENT ("SUPPLEMENTAL LICENSE TERMS")
SHALL SUPPLEMENT AND SUPERSEDE THE MASTER TERMS IN RELATION TO THIS
SOFTWARE.</pre>
<pre>...
...</pre>
<pre>17. Records and Documentation.? During the term of the SLA and Entitlement,
and for a period of three (3) years thereafter, You agree to keep proper
records and documentation of Your compliance with the SLA and Entitlement.
Upon Sun?s reasonable request, You will provide copies of such records and
documentation to Sun for the purpose of confirming Your compliance with the
terms and conditions of the SLA and Entitlement. This section will survive
any termination of the SLA and Entitlement. You may terminate this SLA and
Entitlement at any time by destroying all copies of the Software in which
case the obligations set forth in Section 7 of the SLA shall apply.</pre>
<pre>หน้าจอแสดง LICENSE AGREEMENT ตอบ "y" เพื่อยอมรับ</pre>
<pre>Do you agree with that license? (y/n) [n] &gt;&gt; <strong>y</strong></pre>
<p>หน้าแสดงการเริ่มต้นติดตั้ง</p>
<pre>Welcome to the Grid Engine installation
---------------------------------------</pre>
<pre>Grid Engine qmaster host installation
-------------------------------------</pre>
<pre>Before you continue with the installation please read these hints:</pre>
<pre>   - Your terminal window should have a size of at least
     80x24 characters</pre>
<pre>   - The INTR character is often bound to the key Ctrl-C.
     The term &gt;Ctrl-C&lt; is used during the installation if you
     have the possibility to abort the installation</pre>
<pre>The qmaster installation procedure will take approximately 5-10 minutes.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>เลือก user ที่ไม่ใช่ root สำหรับรัน sge</p>
<pre>Grid Engine admin user account
------------------------------</pre>
<pre>The current directory</pre>
<pre>   /gridware/sge</pre>
<pre>is owned by user</pre>
<pre>   <span style="color: #0000ff;"><strong>sgeadmin</strong></span></pre>
<pre>If user &gt;root&lt; does not have write permissions in this directory on *all*
of the machines where Grid Engine will be installed (NFS partitions not
exported for user &gt;root&lt; with read/write permissions) it is recommended to
install Grid Engine that all spool files will be created under the user id
of user &gt;sgeadmin&lt;.</pre>
<pre>IMPORTANT NOTE: The daemons still have to be started by user &gt;root&lt;.</pre>
<pre>Do you want to install Grid Engine as admin user &gt;sgeadmin&lt; (y/n) [y] &gt;&gt;</pre>
<pre>Installing Grid Engine as admin user &gt;sgeadmin&lt;
Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ไดเรคทอรีหลักของ sge</p>
<pre>Checking $SGE_ROOT directory
----------------------------</pre>
<pre>The Grid Engine root directory is:</pre>
<pre>   $SGE_ROOT = /gridware/sge</pre>
<pre>If this directory is not correct (e.g. it may contain an automounter
prefix) enter the correct path to this directory or hit &lt;RETURN&gt;
to use default [/gridware/sge] &gt;&gt;</pre>
<pre>Your $SGE_ROOT directory: <strong><span style="color: #0000ff;">/gridware/sge</span></strong></pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>เลือกหมายเลขพอร์ตสำหรับรัน sge_qmaster</p>
<pre>Grid Engine TCP/IP communication service
----------------------------------------</pre>
<pre>The port for sge_qmaster is currently set as service.</pre>
<pre><span style="color: #0000ff;">   sge_qmaster service set to port 10500</span></pre>
<pre>Now you have the possibility to set/change the communication ports by using the
&gt;shell environment&lt; or you may configure it via a network service, configured
in local &gt;/etc/service&lt;, &gt;NIS&lt; or &gt;NIS+&lt;, adding an entry in the form</pre>
<pre>    sge_qmaster &lt;port_number&gt;/tcp</pre>
<pre>to your services database and make sure to use an unused port number.</pre>
<pre>How do you want to configure the Grid Engine communication ports?</pre>
<pre>Using the &gt;shell environment&lt;:                           [1]</pre>
<pre>Using a network service like &gt;/etc/service&lt;, &gt;NIS/NIS+&lt;: [2]</pre>
<pre>(default: 2) &gt;&gt;</pre>
<pre>Grid Engine TCP/IP service &gt;sge_qmaster&lt;
----------------------------------------</pre>
<pre>Using the service</pre>
<pre>   sge_qmaster</pre>
<pre>for communication with Grid Engine.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p> เลือกหมายเลขพอร์ตสำหรับรัน sge_execd</p>
<pre> Grid Engine TCP/IP communication service
----------------------------------------</pre>
<pre>The port for sge_execd is currently set as service.</pre>
<pre><span style="color: #0000ff;">   sge_execd service set to port 10501</span></pre>
<pre>Now you have the possibility to set/change the communication ports by using the
&gt;shell environment&lt; or you may configure it via a network service, configured
in local &gt;/etc/service&lt;, &gt;NIS&lt; or &gt;NIS+&lt;, adding an entry in the form</pre>
<pre>    sge_execd &lt;port_number&gt;/tcp</pre>
<pre>to your services database and make sure to use an unused port number.</pre>
<pre>How do you want to configure the Grid Engine communication ports?</pre>
<pre>Using the &gt;shell environment&lt;:                           [1]</pre>
<pre>Using a network service like &gt;/etc/service&lt;, &gt;NIS/NIS+&lt;: [2]</pre>
<pre>(default: 2) &gt;&gt;</pre>
<pre> </pre>
<pre>Grid Engine TCP/IP communication service
-----------------------------------------</pre>
<pre>Using the service</pre>
<pre>   sge_execd</pre>
<pre>for communication with Grid Engine.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ตั้งชื่อ cell ในที่นี้จะตั้งเป็น MyCell</p>
<p>หมายเหตุ ชื่อ cell ใช้ในการจัดกลุ่มเพื่อส่งงานระหว่าง qmaster host และ execution host</p>
<pre> Grid Engine cells
-----------------</pre>
<pre>Grid Engine supports multiple cells.</pre>
<pre>If you are not planning to run multiple Grid Engine clusters or if you don't
know yet what is a Grid Engine cell it is safe to keep the default cell name</pre>
<pre>   default</pre>
<pre>If you want to install multiple cells you can enter a cell name now.</pre>
<pre>The environment variable</pre>
<pre>   $SGE_CELL=&lt;your_cell_name&gt;</pre>
<pre>will be set for all further Grid Engine commands.</pre>
<pre>Enter cell name [default] &gt;&gt; <strong><span style="color: #000000;">MyCell</span></strong></pre>
<pre>Using cell &gt;MyCell&lt;.
Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ตั้งชื่อ cluster ในที่นี้ตั้งเป็น MyCluster</p>
<pre>Unique cluster name
-------------------</pre>
<pre>The cluster name uniquely identifies a specific Sun Grid Engine cluster.
The cluster name must be unique throughout your organization. The name
is not related to the SGE cell.</pre>
<pre>The cluster name must start with a letter ([A-Za-z]), followed by letters,
digits ([0-9]), dashes (-) or underscores (_).</pre>
<pre>Enter new cluster name or hit &lt;RETURN&gt;
to use default [p10500] &gt;&gt; <strong>MyCluster</strong></pre>
<pre>creating directory: /gridware/sge/MyCell/common</pre>
<pre>Your $SGE_CLUSTER_NAME: MyCluster</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ไดเรคทอรี spool ของ qmaster</p>
<pre> Grid Engine qmaster spool directory
-----------------------------------</pre>
<pre>The qmaster spool directory is the place where the qmaster daemon stores
the configuration and the state of the queuing system.</pre>
<pre>The admin user &gt;sgeadmin&lt; must have read/write access
to the qmaster spool directory.</pre>
<pre>If you will install shadow master hosts or if you want to be able to start
the qmaster daemon on other hosts (see the corresponding section in the
Grid Engine Installation and Administration Manual for details) the account
on the shadow master hosts also needs read/write access to this directory.</pre>
<pre>Enter a qmaster spool directory [<strong><span style="color: #0000ff;">/gridware/sge/MyCell/spool/qmaster</span></strong>] &gt;&gt;</pre>
<pre>Using qmaster spool directory &gt;/gridware/sge/MyCell/spool/qmaster&lt;.
Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>จะรัน sge บนเครื่อง Windows ด้วยหรือไม่</p>
<pre>Windows Execution Host Support
------------------------------</pre>
<pre>Are you going to install Windows Execution Hosts? (y/n) [n] &gt;&gt;</pre>
<p>ตรวจสอบไฟล์ permission</p>
<pre>Verifying and setting file permissions
--------------------------------------</pre>
<pre>Did you install this version with &gt;pkgadd&lt; or did you already verify
and set the file permissions of your distribution (enter: y) (y/n) [y] &gt;&gt;</pre>
<pre>We do not verify file permissions. Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>คารใช้ DNS domain ชื่อเดียวกัน</p>
<pre>Select default Grid Engine hostname resolving method
----------------------------------------------------</pre>
<pre>Are all hosts of your cluster in one DNS domain? If this is
the case the hostnames</pre>
<pre>   &gt;hostA&lt; and &gt;hostA.foo.com&lt;</pre>
<pre>would be treated as equal, because the DNS domain name &gt;foo.com&lt;
is ignored when comparing hostnames.</pre>
<pre>Are all hosts of your cluster in a single DNS domain (y/n) [y] &gt;&gt;</pre>
<pre>Ignoring domain name when comparing hostnames.</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>จะเปิดการใช้ Grid Engine JMX MBean server หรือไม่ ในที่นี้จะตอบ &#8220;n&#8221; คือไม่ใช้</p>
<pre>Grid Engine JMX MBean server
----------------------------</pre>
<pre>In order to use the SGE Inspect or the Service Domain Manager (SDM)
SGE adapter you need to configure a JMX server in qmaster. Qmaster
will then load a Java Virtual Machine through a shared library.
NOTE: Java 1.5 or later is required for the JMX MBean server.</pre>
<pre>Do you want to enable the JMX MBean server (y/n) [y] &gt;&gt; <strong>n</strong></pre>
<p>โปรแกรมจะเริ่มสร้างไฟล์ ไดเรคทอรี ต่างๆ ที่จะใช้</p>
<pre>Making directories
------------------</pre>
<pre>creating directory: /gridware/sge/MyCell/spool/qmaster
creating directory: /gridware/sge/MyCell/spool/qmaster/job_scripts
Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>เลือกวิธีการ spooling</p>
<pre>Setup spooling
--------------
Your SGE binaries are compiled to link the spooling libraries
during runtime (dynamically). So you can choose between Berkeley DB
spooling and Classic spooling method.
Please choose a spooling method (berkeleydb|classic) [berkeleydb] &gt;&gt;</pre>
<pre>The Berkeley DB spooling method provides two configurations!</pre>
<pre>Local spooling:
The Berkeley DB spools into a local directory on this host (qmaster host)
This setup is faster, but you can't setup a shadow master host</pre>
<pre>Berkeley DB Spooling Server:
If you want to setup a shadow master host, you need to use
Berkeley DB Spooling Server!
In this case you have to choose a host with a configured RPC service.
The qmaster host connects via RPC to the Berkeley DB. This setup is more
failsafe, but results in a clear potential security hole. RPC communication
(as used by Berkeley DB) can be easily compromised. Please only use this
alternative if your site is secure or if you are not concerned about
security. Check the installation guide for further advice on how to achieve
failsafety without compromising security.</pre>
<pre>Do you want to use a Berkeley DB Spooling Server? (y/n) [n] &gt;&gt;</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<pre>Berkeley Database spooling parameters
-------------------------------------</pre>
<pre>Please enter the database directory now, even if you want to spool locally,
it is necessary to enter this database directory.</pre>
<pre>Default: [<span style="color: #0000ff;">/gridware/sge/MyCell/spool/spooldb</span>] &gt;&gt;</pre>
<pre>creating directory: /gridware/sge/MyCell/spool/spooldb
Dumping bootstrapping information
Initializing spooling database</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ขอบเขตของ group id เพิ่มเติม ที่ sge ใช้</p>
<pre>Grid Engine group id range
--------------------------</pre>
<pre>When jobs are started under the control of Grid Engine an additional group id
is set on platforms which do not support jobs. This is done to provide maximum
control for Grid Engine jobs.</pre>
<pre>This additional UNIX group id range must be unused group id's in your system.
Each job will be assigned a unique id during the time it is running.
Therefore you need to provide a range of id's which will be assigned
dynamically for jobs.</pre>
<pre>The range must be big enough to provide enough numbers for the maximum number
of Grid Engine jobs running at a single moment on a single host. E.g. a range
like &gt;20000-20100&lt; means, that Grid Engine will use the group ids from
20000-20100 and provides a range for 100 Grid Engine jobs at the same time
on a single host.</pre>
<pre>You can change at any time the group id range in your cluster configuration.</pre>
<pre>Please enter a range [<span style="color: #0000ff;">20000-20100</span>] &gt;&gt;</pre>
<pre>Using &gt;20000-20100&lt; as gid range. Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<pre>Grid Engine cluster configuration
---------------------------------</pre>
<pre>Please give the basic configuration parameters of your Grid Engine
installation:</pre>
<pre>   &lt;execd_spool_dir&gt;</pre>
<pre>The pathname of the spool directory of the execution hosts. User &gt;sgeadmin&lt;
must have the right to create this directory and to write into it.</pre>
<pre>Default: [<span style="color: #0000ff;">/gridware/sge/MyCell/spool</span>] &gt;&gt;</pre>
<p>อีเมล์สำหรับการแจ้งปัญหา</p>
<pre>Grid Engine cluster configuration (continued)
---------------------------------------------</pre>
<pre>&lt;administrator_mail&gt;</pre>
<pre>The email address of the administrator to whom problem reports are sent.</pre>
<pre>It is recommended to configure this parameter. You may use &gt;none&lt;
if you do not wish to receive administrator mail.</pre>
<pre>Please enter an email address in the form &gt;user@foo.com&lt;.</pre>
<pre>Default: [none] &gt;&gt;</pre>
<pre> </pre>
<pre>The following parameters for the cluster configuration were configured:</pre>
<pre>   execd_spool_dir        /gridware/sge/MyCell/spool
   administrator_mail     none</pre>
<pre>Do you want to change the configuration parameters (y/n) [n] &gt;&gt;</pre>
<p>การสร้างไฟล์คอนฟิก</p>
<pre>Creating local configuration
----------------------------
Creating &gt;act_qmaster&lt; file
Adding default complex attributes
Adding default parallel environments (PE)
Adding SGE default usersets
Adding &gt;sge_aliases&lt; path aliases file
Adding &gt;qtask&lt; qtcsh sample default request file
Adding &gt;sge_request&lt; default submit options file
Creating &gt;sgemaster&lt; script
Creating &gt;sgeexecd&lt; script
Creating settings files for &gt;.profile/.cshrc&lt;</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>สร้าง startup script เวลาบู๊ตเครื่อง</p>
<pre>qmaster startup script
----------------------</pre>
<pre>We can install the startup script that will
start qmaster at machine boot (y/n) [y] &gt;&gt;</pre>
<pre>cp /gridware/sge/MyCell/common/sgemaster /etc/init.d/sgemaster.MyCluster
/usr/lib/lsb/install_initd /etc/init.d/sgemaster.MyCluster</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>รันเซอร์วิส sge_qmaster</p>
<pre>Grid Engine qmaster startup
---------------------------</pre>
<pre>Starting qmaster daemon. Please wait ...
   starting sge_qmaster</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ระบุชื่อ host สำหรับรันโปรแกรม sge_execd ในที่นี้จะใส่สองเครื่องคือ &#8220;cent55-node1&#8243; และ &#8220;cent55-node2&#8243;</p>
<pre>Adding Grid Engine hosts
------------------------</pre>
<pre>Please now add the list of hosts, where you will later install your execution
daemons. These hosts will be also added as valid submit hosts.</pre>
<pre>Please enter a blank separated list of your execution hosts. You may
press &lt;RETURN&gt; if the line is getting too long. Once you are finished
simply press &lt;RETURN&gt; without entering a name.</pre>
<pre>You also may prepare a file with the hostnames of the machines where you plan
to install Grid Engine. This may be convenient if you are installing Grid
Engine on many hosts.</pre>
<pre>Do you want to use a file which contains the list of hosts (y/n) [n] &gt;&gt;</pre>
<p>ใส่ชื่อเครื่อง cent55-node1</p>
<pre>Adding admin and submit hosts
-----------------------------</pre>
<pre>Please enter a blank seperated list of hosts.</pre>
<pre>Stop by entering &lt;RETURN&gt;. You may repeat this step until you are
entering an empty list. You will see messages from Grid Engine
when the hosts are added.</pre>
<pre>Host(s): <strong>cent55-node1
</strong>cent55-node1.spalinux.com added to administrative host list
cent55-node1.spalinux.com added to submit host list</pre>
<p>ใส่ชื่อเครื่อง cent55-node2</p>
<pre>Adding admin and submit hosts
-----------------------------</pre>
<pre>Please enter a blank seperated list of hosts.</pre>
<pre>Stop by entering &lt;RETURN&gt;. You may repeat this step until you are
entering an empty list. You will see messages from Grid Engine
when the hosts are added.</pre>
<pre>Host(s): <strong>cent55-node2
</strong>cent55-node2.spalinux.com added to administrative host list
cent55-node2.spalinux.com added to submit host list
Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>เมื่อใส่ชื่อเครื่องหมดแล้ว กด [enter] ผ่าน</p>
<pre>Adding admin and submit hosts
-----------------------------</pre>
<pre>Please enter a blank seperated list of hosts.</pre>
<pre>Stop by entering &lt;RETURN&gt;. You may repeat this step until you are
entering an empty list. You will see messages from Grid Engine
when the hosts are added.</pre>
<pre>Host(s):
Finished adding hosts. Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>ระบุชื่อเครื่องเพิ่มเติมสำหรับ shadow host ในที่นี้ไม่ได้ใช้</p>
<pre>If you want to use a shadow host, it is recommended to add this host
to the list of administrative hosts.</pre>
<pre>If you are not sure, it is also possible to add or remove hosts after the
installation with &lt;qconf -ah hostname&gt; for adding and &lt;qconf -dh hostname&gt;
for removing this host</pre>
<pre>Attention: This is not the shadow host installation
procedure.
You still have to install the shadow host separately</pre>
<pre>Do you want to add your shadow host(s) now? (y/n) [y] &gt;&gt;</pre>
<pre>Adding Grid Engine shadow hosts
-------------------------------</pre>
<pre>Please now add the list of hosts, where you will later install your shadow
daemon.</pre>
<pre>Please enter a blank separated list of your execution hosts. You may
press &lt;RETURN&gt; if the line is getting too long. Once you are finished
simply press &lt;RETURN&gt; without entering a name.</pre>
<pre>You also may prepare a file with the hostnames of the machines where you plan
to install Grid Engine. This may be convenient if you are installing Grid
Engine on many hosts.</pre>
<pre>Do you want to use a file which contains the list of hosts (y/n) [n] &gt;&gt;</pre>
<pre>Adding admin hosts
------------------</pre>
<pre>Please enter a blank seperated list of hosts.</pre>
<pre>Stop by entering &lt;RETURN&gt;. You may repeat this step until you are
entering an empty list. You will see messages from Grid Engine
when the hosts are added.</pre>
<pre>Host(s):
Finished adding hosts. Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<pre>Creating the default &lt;all.q&gt; queue and &lt;allhosts&gt; hostgroup
-----------------------------------------------------------</pre>
<pre>root@cent55-sge.spalinux.com added "@allhosts" to host group list
root@cent55-sge.spalinux.com added "all.q" to cluster queue list</pre>
<pre>Hit &lt;RETURN&gt; to continue &gt;&gt;</pre>
<p>การคอนฟิก Scheduler Tuning</p>
<pre>Scheduler Tuning
----------------</pre>
<pre>The details on the different options are described in the manual.</pre>
<pre>Configurations
--------------
1) Normal
          Fixed interval scheduling, report limited scheduling information,
          actual + assumed load</pre>
<pre>2) High
          Fixed interval scheduling, report limited scheduling information,
          actual load</pre>
<pre>3) Max
          Immediate Scheduling, report no scheduling information,
          actual load</pre>
<pre>Enter the number of your preferred configuration and hit &lt;RETURN&gt;!
Default configuration is [1] &gt;&gt;</pre>
<pre> </pre>
<pre>We're configuring the scheduler with &gt;Normal&lt; settings!
Do you agree? (y/n) [y] &gt;&gt;</pre>
<p>แนะวิธีการใช้ sge</p>
<pre>Using Grid Engine
-----------------</pre>
<pre>You should now enter the command:</pre>
<pre>   source /gridware/sge/MyCell/common/settings.csh</pre>
<pre>if you are a csh/tcsh user or</pre>
<pre>   # . /gridware/sge/MyCell/common/settings.sh</pre>
<pre>if you are a sh/ksh user.</pre>
<pre>This will set or expand the following environment variables:</pre>
<pre>   - $SGE_ROOT         (always necessary)
   - $SGE_CELL         (if you are using a cell other than &gt;default&lt;)
   - $SGE_CLUSTER_NAME (always necessary)
   - $SGE_QMASTER_PORT (if you haven't added the service &gt;sge_qmaster&lt;)
   - $SGE_EXECD_PORT   (if you haven't added the service &gt;sge_execd&lt;)
   - $PATH/$path       (to find the Grid Engine binaries)
   - $MANPATH          (to access the manual pages)</pre>
<pre>Hit &lt;RETURN&gt; to see where Grid Engine logs messages &gt;&gt;</pre>
<pre>Grid Engine messages
--------------------</pre>
<pre>Grid Engine messages can be found at:</pre>
<pre>   /tmp/qmaster_messages (during qmaster startup)
   /tmp/execd_messages   (during execution daemon startup)</pre>
<pre>After startup the daemons log their messages in their spool directories.</pre>
<pre>   Qmaster:     /gridware/sge/MyCell/spool/qmaster/messages
   Exec daemon: &lt;execd_spool_dir&gt;/&lt;hostname&gt;/messages</pre>
<pre>Grid Engine startup scripts
---------------------------</pre>
<pre>Grid Engine startup scripts can be found at:</pre>
<pre>   /gridware/sge/MyCell/common/sgemaster (qmaster)
   /gridware/sge/MyCell/common/sgeexecd (execd)</pre>
<pre>Do you want to see previous screen about using Grid Engine again (y/n) [n] &gt;&gt;</pre>
<pre> </pre>
<pre>Your Grid Engine qmaster installation is now completed
------------------------------------------------------</pre>
<pre>Please now login to all hosts where you want to run an execution daemon
and start the execution host installation procedure.</pre>
<pre>If you want to run an execution daemon on this host, please do not forget
to make the execution host installation in this host as well.</pre>
<pre>All execution hosts must be administrative hosts during the installation.
All hosts which you added to the list of administrative hosts during this
installation procedure can now be installed.</pre>
<pre>You may verify your administrative hosts with the command</pre>
<pre>   # qconf -sh</pre>
<pre>and you may add new administrative hosts with the command</pre>
<pre>   # qconf -ah &lt;hostname&gt;</pre>
<pre>Please hit &lt;RETURN&gt; &gt;&gt;</pre>
<p>ใช้คำสั่ง ps ตรวจสอบโปรเซส sge_qmaster</p>
<pre>[root@cent55-sge sge]# <strong>ps -ef | grep sge
</strong>sgeadmin  4667     1  1 13:55 ?        00:00:00 /gridware/sge/bin/lx24-amd64/sge_qmaster</pre>
<h4>การเปิด/ปิด เซอร์วิส sge_qmaster</h4>
<p>การปิดเซอร์วิส sge_qmaster</p>
<pre>[root@cent55-sge ~]# <strong>/etc/init.d/sgemaster.MyCluster stop
</strong>   shutting down Grid Engine qmaster</pre>
<p>การเปิดหรือรันเซอร์วิส qmaster</p>
<pre>[root@cent55-sge ~]# <strong>/etc/init.d/sgemaster.MyCluster start
</strong>   starting sge_qmaster</pre>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://spalinux.com/2011/01/install_sun_grid_engine_on_centos_5-5">ติดตั้ง Sun Grid Engine บน CentOS 5.5</a></li>
<li><a href="http://spalinux.com/2011/01/configure_sun_grid_engine_execd_host">คอนฟิก Sun Grid Engine execution (execd) host</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2011/01/configure_sun_grid_engine_qmaster_host/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

