<?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>Just My Life</title>
	<atom:link href="http://imrgill.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://imrgill.com</link>
	<description>I&#039;m mrGilL, I&#039;m Newbie Admin</description>
	<lastBuildDate>Fri, 18 May 2012 06:47:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Zentyal RADIUS EAP/TLS Authentication Fail</title>
		<link>http://imrgill.com/2012/05/18/zentyal-radius-eaptls-authentication-fail.html</link>
		<comments>http://imrgill.com/2012/05/18/zentyal-radius-eaptls-authentication-fail.html#comments</comments>
		<pubDate>Fri, 18 May 2012 06:44:10 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[802.1x]]></category>
		<category><![CDATA[EAP/TLS]]></category>
		<category><![CDATA[File Sharing]]></category>
		<category><![CDATA[MSCHAPv2]]></category>
		<category><![CDATA[PEAP]]></category>
		<category><![CDATA[zentyal-radius]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=697</guid>
		<description><![CDATA[คาใจอยู่หลายวันครับกับ zentyal radius กับการ config ieee 802.1x แล้วเจอปัญหาดังด้านล่าง Fri May 18 12:53:37 2012 : Auth: Login incorrect: [mrgill] (from client 172.11.5.64/26 port 0 via TLS tunnel) Fri May 18 12:53:37 2012 : Auth: Login incorrect: [mrgill] (from client 172.11.5.64/26 port 16814082 cli 8c73-6eb7-b57d) การติดตั้ง ผมติดตั้งตัว zentyal-users, zentyal-userconrner และ zentyal-radius ทำยังไงตอน authen 802.1x ก็ไม่ผ่านโดยฟ้อง error ใน [...]]]></description>
			<content:encoded><![CDATA[<p>คาใจอยู่หลายวันครับกับ zentyal radius กับการ config ieee 802.1x แล้วเจอปัญหาดังด้านล่าง</p>
<div class="codesnip-container" >
<pre>
Fri May 18 12:53:37 2012 : Auth: Login incorrect: [mrgill] (from client 172.11.5.64/26 port 0 via TLS tunnel)
Fri May 18 12:53:37 2012 : Auth: Login incorrect: [mrgill] (from client 172.11.5.64/26 port 16814082 cli 8c73-6eb7-b57d)
</pre>
</div>
<p>การติดตั้ง<br />
ผมติดตั้งตัว zentyal-users, zentyal-userconrner และ zentyal-radius ทำยังไงตอน authen 802.1x ก็ไม่ผ่านโดยฟ้อง error ใน /var/log/freeradius/radius.log ตามด้านบน</p>
<p>สุดท้ายไป Search เจอใน <a href="http://trac.zentyal.org/ticket/3579" target="_blank">http://trac.zentyal.org/ticket/3579</a> บอกว่าถ้าต้องการจะให้ zentyal-radius รองรับ PEAP หรือ MSCHAPv2 <strong>ต้องติดตั้ง</strong>ตัว File Sharing เข้าไปด้วยหรือก็คือตัว zentyal-samba นั้นเอง<br />
หลังจากสั่ง apt-get install zentyal-samba ผมปรากฏว่า Authen ผ่านทันที</p>
<div class="codesnip-container" >
<pre>
Fri May 18 13:27:57 2012 : Auth: Login OK: [mrgill] (from client 172.11.5.64/26 port 0 via TLS tunnel)
Fri May 18 13:27:57 2012 : Auth: Login OK: [mrgill] (from client 172.11.5.64/26 port 16814082 cli 8c73-6eb7-b57d)
</pre>
</div>
<p>ปัญหาต่อมาตอนนี้คือ Authen ที่ Radius ผ่านแล้วแต่ตัว Port ไม่ยอม Enable จงสู้ต่อไป Takashi</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/05/18/zentyal-radius-eaptls-authentication-fail.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การ Config SAN Multipath I/O บน Ubuntu Server</title>
		<link>http://imrgill.com/2012/05/15/how-to-config-multipath-io-san-storage-on-ubuntu-server.html</link>
		<comments>http://imrgill.com/2012/05/15/how-to-config-multipath-io-san-storage-on-ubuntu-server.html#comments</comments>
		<pubDate>Tue, 15 May 2012 08:36:13 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[msa p2000]]></category>
		<category><![CDATA[multipath]]></category>
		<category><![CDATA[multipath i/o]]></category>
		<category><![CDATA[multipath-tools]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=695</guid>
		<description><![CDATA[สวัสดีครับ วันนี้จะมาแนะนำวิธีการคอนฟิก Multipath I/O สำหรับ SAN Storage บน Ubuntu Server กันครับ อะไรคือ Multipath ตามความเข้าใจของผมคือ สมมติว่าเราสร้าง Volume หรือ LUN ไว้บน Storage ไว้ 1 Volume/LUN แต่เรา Present Volume หรือ LUN นั้นออกมาจาก Port FC 2 Port เพื่อป้องกันการ Fail ของอุปกรณ์ จะทำให้เครื่อง Server เห็น Volume/LUN นั้นเป็น Disk 2 ลูก ทั้งที่จริงแล้วมันคือ Volume/LUN เดียวกัน ดังนั้นเราจำเป็นต้องทำการ Map ให้เครื่อง Server ของเราเห็น Disk เพียงลูกเดียวด้วยการทำ Multipath [...]]]></description>
			<content:encoded><![CDATA[<p>        สวัสดีครับ วันนี้จะมาแนะนำวิธีการคอนฟิก Multipath I/O สำหรับ SAN Storage บน Ubuntu Server กันครับ<br />
อะไรคือ Multipath ตามความเข้าใจของผมคือ สมมติว่าเราสร้าง Volume หรือ LUN ไว้บน Storage ไว้ 1 Volume/LUN แต่เรา Present Volume หรือ LUN นั้นออกมาจาก Port FC 2 Port เพื่อป้องกันการ Fail ของอุปกรณ์ จะทำให้เครื่อง Server เห็น Volume/LUN นั้นเป็น Disk 2 ลูก ทั้งที่จริงแล้วมันคือ Volume/LUN เดียวกัน ดังนั้นเราจำเป็นต้องทำการ Map ให้เครื่อง Server ของเราเห็น Disk เพียงลูกเดียวด้วยการทำ Multipath</p>
<p>ในตัวอย่างนี้ผมใช้ Ubuntu 10.04.3 LTS Server กับ SAN Storage HP MSA P2000 นะครับ</p>
<p>สำหรับ Ubuntu นั้นมี Package ตัวนึงที่ชื่อ multipath-tools ซึ่งเราสามารถติดตั้งด้วยใช้คำสั่ง</p>
<div class="codesnip-container" >
<pre>
root@server1:~# apt-get install multipath-tools
</pre>
</div>
<p>ติดตั้งเสร็จแล้วก็ทำการสร้างไฟล์ /etc/multipath.conf โดยจะคำสั่ง vi สร้างไฟล์ขึ้นมาใหม่หรือจะใช้ cat ตามตัวอย่างด้านล่างก็ได้</p>
<div class="codesnip-container" >
<pre>
root@server1:~# cat &#60;&#60;EOF > /etc/multipath.conf
defaults {
       user_friendly_names     yes
       path_grouping_policy    group_by_serial
       path_checker            tur
}

blacklist {
       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
       devnode "^sda"
       # blacklist any other locally attached block devices here
}
EOF
</pre>
</div>
<p>จากนั้นสั่ง restart service multipath-tools สักรอบ</p>
<div class="codesnip-container" >
<pre>
root@agoldap:~# /etc/init.d/multipath-tools restart
</pre>
</div>
<p>ดูผลด้วยคำสั่ง multipath -lv</p>
<div class="codesnip-container" >
<pre>
root@server1:~# multipath -lv
mpath0 (3600c0ff000134ec320b7334f02000000) dm-0 ,
[size=149G][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
 \_ #:#:#:#  -   #:#   [active][undef]
\_ round-robin 0 [prio=0][enabled]
 \_ 0:0:1:14 sdb 8:16  [active][undef]
\_ round-robin 0 [prio=0][enabled]
 \_ 1:0:0:14 sdc 8:32  [active][undef]
\_ round-robin 0 [prio=0][enabled]
 \_ 1:0:1:14 sdd 8:48  [active][undef]
</pre>
</div>
<p>ผมก็จะได้ประมาณนี้ โดยเวลาเราจะอ้างถึง raw disk ก็อ้างชื่อเป็น mpath0 ซึ่งอยู่ใน /dev/mapper/mpath0<br />
ลองทดสอง fdisk กันเลย</p>
<div class="codesnip-container" >
<pre>
root@server1:~# fdisk /dev/mapper/mpath0

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/mapper/mpath0: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8ca1da99

              Device Boot      Start         End      Blocks   Id  System
/dev/mapper/mpath0p1   *           1       19452   156248158+  83  Linux

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/mapper/mpath0: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8ca1da99

              Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19452, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-19452, default 19452):
Using default value 19452

Command (m for help): p

Disk /dev/mapper/mpath0: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8ca1da99

              Device Boot      Start         End      Blocks   Id  System
/dev/mapper/mpath0p1               1       19452   156248158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
</pre>
</div>
<p>ดู Partition ที่เราสร้างโดยการเข้าไปเช็คที่ /dev/mapper</p>
<div class="codesnip-container" >
<pre>
root@server1:~# cd /dev/mapper/
root@server1:/dev/mapper# ls -l
total 0
crw-rw---- 1 root root  10, 59 2012-05-15 14:14 control
brw-rw---- 1 root disk 251,  0 2012-05-15 15:25 mpath0
brw-rw---- 1 root disk 251,  1 2012-05-15 15:25 mpath0-part1
root@server1:/dev/mapper#
</pre>
</div>
<p>Partition ที่เราเพิ่งสร้างคือ mpath0-part1<br />
ทีนี้ลองมา format มันเป็น ext4 กัน</p>
<div class="codesnip-container" >
<pre>
root@server1:~# mkfs.ext4 /dev/mapper/mpath0-part1
mke2fs 1.41.11 (14-Mar-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
9773056 inodes, 39062039 blocks
1953101 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1193 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
	4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
</pre>
</div>
<p>เสร็จแล้วก็ลอง mount ไปใช้ดู</p>
<div class="codesnip-container" >
<pre>
root@server1:~# mount /dev/mapper/mpath0-part1 /backup
root@server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p1     130G  2.1G  121G   2% /
none                  3.9G  236K  3.9G   1% /dev
none                  4.0G     0  4.0G   0% /dev/shm
none                  4.0G  104K  3.9G   1% /var/run
none                  4.0G     0  4.0G   0% /var/lock
none                  4.0G     0  4.0G   0% /lib/init/rw
none                  130G  2.1G  121G   2% /var/lib/ureadahead/debugfs
/dev/mapper/mpath0-part1
                      147G  188M  140G   1% /backup
</pre>
</div>
<p>หากต้องการจะให้มัน mount เองทุกครั้งตอนเปิดเครื่องก็เข้าไปแก้ไขไฟล์ /etc/fstab เองนะครับ<br />
เป็นอันเสร็จครับ</p>
<p>แหล่งข้อมูล : <a href="https://www.sit.auckland.ac.nz/Configuring_SAN_access_with_Linux_multipath" target="_blank">https://www.sit.auckland.ac.nz/Configuring_SAN_access_with_Linux_multipath</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/05/15/how-to-config-multipath-io-san-storage-on-ubuntu-server.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วิธีดู WWN ของ FC HBA Card บน Solaris 10</title>
		<link>http://imrgill.com/2012/03/22/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%94%e0%b8%b9-wwn-%e0%b8%82%e0%b8%ad%e0%b8%87-fc-hba-card-%e0%b8%9a%e0%b8%99-solaris-10.html</link>
		<comments>http://imrgill.com/2012/03/22/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%94%e0%b8%b9-wwn-%e0%b8%82%e0%b8%ad%e0%b8%87-fc-hba-card-%e0%b8%9a%e0%b8%99-solaris-10.html#comments</comments>
		<pubDate>Thu, 22 Mar 2012 04:51:58 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily command]]></category>
		<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[fc]]></category>
		<category><![CDATA[fcinfo]]></category>
		<category><![CDATA[hba]]></category>
		<category><![CDATA[hba-port]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=694</guid>
		<description><![CDATA[บน Solaris 10 มีคำสั่ง fcinfo ที่สามารถใช้ตรวจสอบ FC HBA Card ได้ว่ามีค่า WWN อะไร โดยการใช้คำสั่ง root@maindb01 # fcinfo hba-port HBA Port WWN: 21000024ff38c336 OS Device Name: /dev/cfg/c1 Manufacturer: QLogic Corp. Model: 371-4325-02 Firmware Version: 05.04.03 FCode/BIOS Version: BIOS: 2.02; fcode: 2.03; EFI: 2.01; Serial Number: 0402L00-1134992774 Driver Name: qlc Driver Version: 20110321-3.05 Type: N-port State: online Supported [...]]]></description>
			<content:encoded><![CDATA[<p>บน Solaris 10 มีคำสั่ง fcinfo ที่สามารถใช้ตรวจสอบ FC HBA Card ได้ว่ามีค่า WWN อะไร<br />
โดยการใช้คำสั่ง</p>
<pre>
<div class="codesnip-container" >root@maindb01 # fcinfo hba-port
HBA Port WWN: 21000024ff38c336
        OS Device Name: /dev/cfg/c1
        Manufacturer: QLogic Corp.
        Model: 371-4325-02
        Firmware Version: 05.04.03
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.03; EFI: 2.01;
        Serial Number: 0402L00-1134992774
        Driver Name: qlc
        Driver Version: 20110321-3.05
        Type: N-port
        State: online
        Supported Speeds: 2Gb 4Gb 8Gb
        Current Speed: 8Gb
        Node WWN: 20000024ff38c336
HBA Port WWN: 21000024ff38c337
        OS Device Name: /dev/cfg/c2
        Manufacturer: QLogic Corp.
        Model: 371-4325-02
        Firmware Version: 05.04.03
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.03; EFI: 2.01;
        Serial Number: 0402L00-1134992774
        Driver Name: qlc
        Driver Version: 20110321-3.05
        Type: N-port
        State: online
        Supported Speeds: 2Gb 4Gb 8Gb
        Current Speed: 8Gb
        Node WWN: 20000024ff38c337</div>
</pre>
<p>แค่นี้เราก็ทราบว่า Port 1 WWN : 21000024ff38c336 และ Port 2 WWN : 21000024ff38c337<br />
จบ</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/03/22/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%94%e0%b8%b9-wwn-%e0%b8%82%e0%b8%ad%e0%b8%87-fc-hba-card-%e0%b8%9a%e0%b8%99-solaris-10.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การเคลียร์ history log ของ bash shell บน linux</title>
		<link>http://imrgill.com/2012/03/22/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%84%e0%b8%a5%e0%b8%b5%e0%b8%a2%e0%b8%a3%e0%b9%8c-history-log-%e0%b8%82%e0%b8%ad%e0%b8%87-bash-shell-%e0%b8%9a%e0%b8%99-linux.html</link>
		<comments>http://imrgill.com/2012/03/22/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%84%e0%b8%a5%e0%b8%b5%e0%b8%a2%e0%b8%a3%e0%b9%8c-history-log-%e0%b8%82%e0%b8%ad%e0%b8%87-bash-shell-%e0%b8%9a%e0%b8%99-linux.html#comments</comments>
		<pubDate>Thu, 22 Mar 2012 03:48:58 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily command]]></category>
		<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[log]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=693</guid>
		<description><![CDATA[มาเร็วไปเร็วอีกแล้วครับ ปกติเวลาเราสั่ง history มันก็จะแสดง list คำสั่งที่เราเคยสั่งไปก่อนหน้ามา root@mrgill-laptop:~# history ... 1785 transcode 1786 transcode -h 1787 apt-get update 1788 apt-get upgrade 1789 cd Desktop/ 1790 dpkg -i virtualbox-4.1_4.1.10-76795~Ubuntu~oneiric_amd64.deb 1791 apt-get update 1792 apt-get upgrade 1793 apt-get update 1794 ssh sysadmin@172.11.99.67 1795 apt-get update 1796 apt-get upgrade 1797 apt-get dist-upgrade 1798 apt-get update 1799 apt-get upgrade 1800 [...]]]></description>
			<content:encoded><![CDATA[<p>มาเร็วไปเร็วอีกแล้วครับ<br />
ปกติเวลาเราสั่ง history มันก็จะแสดง list คำสั่งที่เราเคยสั่งไปก่อนหน้ามา</p>
<pre>
<div class="codesnip-container" >root@mrgill-laptop:~# history
...
 1785  transcode
 1786  transcode -h
 1787  apt-get update
 1788  apt-get upgrade
 1789  cd Desktop/
 1790  dpkg -i virtualbox-4.1_4.1.10-76795~Ubuntu~oneiric_amd64.deb
 1791  apt-get update
 1792  apt-get upgrade
 1793  apt-get update
 1794  ssh sysadmin@172.11.99.67
 1795  apt-get update
 1796  apt-get upgrade
 1797  apt-get dist-upgrade
 1798  apt-get update
 1799  apt-get upgrade
 1800  clear
 1801  history
root@mrgill-laptop:~#</div>
</pre>
<p>หากต้องการเคลียร์ทั้งหมดใช้</p>
<pre>
<div class="codesnip-container" >root@mrgill-laptop:~# history -c</div>
</pre>
<p>หากต้องการเคลียร์เฉพาะ current session ใช้ -r</p>
<pre>
<div class="codesnip-container" >root@mrgill-laptop:~# history -r</div>
</pre>
<p>จบ</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/03/22/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%84%e0%b8%a5%e0%b8%b5%e0%b8%a2%e0%b8%a3%e0%b9%8c-history-log-%e0%b8%82%e0%b8%ad%e0%b8%87-bash-shell-%e0%b8%9a%e0%b8%99-linux.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วิธีแปลง Unix Time (POSIX Time) เป็นเวลาที่คนธรรมดาอ่านรู้เรื่องบน Linux</title>
		<link>http://imrgill.com/2012/03/19/how-to-convert-unix-time-to-normal-time-format-on-linux.html</link>
		<comments>http://imrgill.com/2012/03/19/how-to-convert-unix-time-to-normal-time-format-on-linux.html#comments</comments>
		<pubDate>Mon, 19 Mar 2012 08:22:00 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily command]]></category>
		<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[posix time]]></category>
		<category><![CDATA[unix time]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=691</guid>
		<description><![CDATA[วันนี้เป็น Tip สั้นๆ ครับมาไวไปไว สำหรับใครที่ไปเจอ Unix time แล้วอ่านไม่รุ้เรื่องว่ามันคืออะไรลองเอาคำสั่งนี้ไปใช้ดูครับ ใช้คำสั่ง date -d @xxxxxxxxxx root@agoldap:~# date -d @xxxxxxxxxx โดยที่ xxxxxxxxxx เป็น unix time ที่เราต้องการจะ convert ตัวอย่าง root@agoldap:~# date +%s 1332144867 root@agoldap:~# root@agoldap:~# root@agoldap:~# root@agoldap:~# root@agoldap:~# date -d @1332144666 Mon Mar 19 15:11:06 ICT 2012 root@agoldap:~# จบ ข้อมูลเกี่ยวกับ Unix time : http://en.wikipedia.org/wiki/Unix_time]]></description>
			<content:encoded><![CDATA[<p>วันนี้เป็น Tip สั้นๆ ครับมาไวไปไว สำหรับใครที่ไปเจอ Unix time แล้วอ่านไม่รุ้เรื่องว่ามันคืออะไรลองเอาคำสั่งนี้ไปใช้ดูครับ<br />
ใช้คำสั่ง date -d @xxxxxxxxxx </p>
<pre>
<div class="codesnip-container" >root@agoldap:~# date -d @xxxxxxxxxx</div>
</pre>
<p>โดยที่ xxxxxxxxxx เป็น unix time ที่เราต้องการจะ convert</p>
<p>ตัวอย่าง</p>
<pre>
<div class="codesnip-container" >root@agoldap:~# date +%s
1332144867
root@agoldap:~#
root@agoldap:~#
root@agoldap:~#
root@agoldap:~#
root@agoldap:~# date -d @1332144666
Mon Mar 19 15:11:06 ICT 2012
root@agoldap:~#</div>
</pre>
<p>จบ</p>
<p>ข้อมูลเกี่ยวกับ Unix time : <a href="http://en.wikipedia.org/wiki/Unix_time">http://en.wikipedia.org/wiki/Unix_time</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/03/19/how-to-convert-unix-time-to-normal-time-format-on-linux.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>คำสั่งสำหรับใช้ตรวจสอบ Serial Number ของเครื่อง Server บน Linux</title>
		<link>http://imrgill.com/2012/02/20/how-to-find-the-model-and-serial-number-of-a-linux-server.html</link>
		<comments>http://imrgill.com/2012/02/20/how-to-find-the-model-and-serial-number-of-a-linux-server.html#comments</comments>
		<pubDate>Mon, 20 Feb 2012 08:47:09 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=687</guid>
		<description><![CDATA[วันนี้มาสั้นๆ หลังจากไม่ได้เขียนมาหลายเดือน สำหรับใครที่อยากทราบว่าเครื่องที่ใช้อยุ่ serial อะไรก็ใช้คำสั่งด้านล่างได้เลยครับ # dmidecode -t system SMBIOS 2.3 present. Handle 0x0100, DMI type 1, 25 bytes. System Information Manufacturer: HP Product Name: ProLiant DL380 G4 Version: Not Specified Serial Number: XXXXXXXXXXX UUID: XXXXXXX-XXXXX-XXXXXXX-XXXXXXXX-XXXXXXXX Wake-up Type: Power Switch Handle 0x2000, DMI type 32, 11 bytes. System Boot Information Status: No errors detected]]></description>
			<content:encoded><![CDATA[<p>วันนี้มาสั้นๆ หลังจากไม่ได้เขียนมาหลายเดือน สำหรับใครที่อยากทราบว่าเครื่องที่ใช้อยุ่ serial อะไรก็ใช้คำสั่งด้านล่างได้เลยครับ</p>
<pre>
<div class="codesnip-container" ># dmidecode -t system

SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 25 bytes.
System Information
        Manufacturer: HP
        Product Name: ProLiant DL380 G4
        Version: Not Specified
        Serial Number: XXXXXXXXXXX
        UUID: XXXXXXX-XXXXX-XXXXXXX-XXXXXXXX-XXXXXXXX
        Wake-up Type: Power Switch

Handle 0x2000, DMI type 32, 11 bytes.
System Boot Information
        Status: No errors detected</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2012/02/20/how-to-find-the-model-and-serial-number-of-a-linux-server.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>อยากรู้ว่าเครื่อง Ubuntu แสนรักของเราใส่แรมได้สูงสุดเท่าไหร่ทำไงหนอ</title>
		<link>http://imrgill.com/2011/12/19/how-to-find-maximum-of-ram-memory-on-ubuntu.html</link>
		<comments>http://imrgill.com/2011/12/19/how-to-find-maximum-of-ram-memory-on-ubuntu.html#comments</comments>
		<pubDate>Mon, 19 Dec 2011 11:23:49 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily command]]></category>
		<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=684</guid>
		<description><![CDATA[วันนี้เป็น How To สั้นๆ ครับ สำหรับใครที่อยากรู้ว่าเครื่องคอมพิวเตอร์ที่ติดตั้ง Ubuntu ของตัวเองใส่ Ram ได้สูงสุดกี่ GB คำสั่งมีดังนี้ ง่ายแค่สั่ง sudo dmidecode --type memory ผลที่ได้ mrgill@mrgill-laptop:~$ sudo dmidecode --type memory [sudo] password for mrgill: # dmidecode 2.9 SMBIOS 2.6 present. Handle 0x0016, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้เป็น How To สั้นๆ ครับ สำหรับใครที่อยากรู้ว่าเครื่องคอมพิวเตอร์ที่ติดตั้ง Ubuntu ของตัวเองใส่ Ram ได้สูงสุดกี่ GB คำสั่งมีดังนี้<br />
ง่ายแค่สั่ง</p>
<pre>
<div class="codesnip-container" >sudo dmidecode --type memory</div>
</pre>
<p>ผลที่ได้</p>
<pre>
<div class="codesnip-container" >mrgill@mrgill-laptop:~$ sudo dmidecode --type memory
[sudo] password for mrgill:
# dmidecode 2.9
SMBIOS 2.6 present.

Handle 0x0016, DMI type 16, 15 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	<u>Maximum Capacity: 8 GB</u>
	Error Information Handle: Not Provided
	Number Of Devices: 2

Handle 0x0017, DMI type 17, 28 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: SODIMM
	Set: 1
	Locator: DIMM_A
	Bank Locator: Not Specified
	Type: <OUT OF SPEC>
	Type Detail: Synchronous
	Speed: 1333 MHz (0.8 ns)
	Manufacturer: 0198
	Serial Number: 8C1CE17A
	Asset Tag: 1137
	Part Number: 99U5428-040.A01G  

Handle 0x0018, DMI type 17, 28 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: SODIMM
	Set: 1
	Locator: DIMM_B
	Bank Locator: Not Specified
	Type: <OUT OF SPEC>
	Type Detail: Synchronous
	Speed: 1333 MHz (0.8 ns)
	Manufacturer: 80CE
	Serial Number: 673855AF
	Asset Tag: 1120
	Part Number: M471B5273DH0-CH9</div>
</pre>
<p>จากตัวอย่างเครื่อง Notebook Dell Inspiron N4010 ของผมสามารถใส่ Ram ได้สูงสุดแค่ 8GB และยังบอกอีกว่าใช้ DIMM ไหนไปบ้าง</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/12/19/how-to-find-maximum-of-ram-memory-on-ubuntu.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วิธีติดตั้ง Visual CertExam Suite บน Ubuntu 11.10</title>
		<link>http://imrgill.com/2011/12/11/how-to-visual-certexam-suite-on-ubuntu-11-10.html</link>
		<comments>http://imrgill.com/2011/12/11/how-to-visual-certexam-suite-on-ubuntu-11-10.html#comments</comments>
		<pubDate>Sun, 11 Dec 2011 11:38:31 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[.vce]]></category>
		<category><![CDATA[visual certexam]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=681</guid>
		<description><![CDATA[วันนี้ขอแนะนำ Dark Side Technical เกี่ยวกับการติดตั้งโปรแกรม Visual CertExam Suite สำหรับท่านที่ต้องการลองทำข้อสอบจำลอง Certify ต่างบน Ubuntu กันครับ ในที่นี้ผมขอใช้ version 1.9.987 นะครับ อันนี้ Search หาใน Google กันได้เลยมี Key ให้เรียบร้อยผมแนะนำแค่นี้พอละกัน ส่วนใหญ่จะเป็น zip ไฟล์มีทั้งตัวติดตั้งและ Registry Key สำหรับ Activate ขั้นตอนการติดตั้ง 1. หาที่ download ไฟล์กันมาก่อน อันนี้หาเองครับลอง search ใน google ดู key ประมาณ Visual CertExam Suite with reg key ก็จะเจอ 2. ได้ไฟล์ .zip มาก็แตกมันออกครับ 3. [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ขอแนะนำ Dark Side Technical เกี่ยวกับการติดตั้งโปรแกรม Visual CertExam Suite สำหรับท่านที่ต้องการลองทำข้อสอบจำลอง Certify ต่างบน Ubuntu กันครับ ในที่นี้ผมขอใช้ version 1.9.987 นะครับ<br />
อันนี้ Search หาใน Google กันได้เลยมี Key ให้เรียบร้อยผมแนะนำแค่นี้พอละกัน ส่วนใหญ่จะเป็น zip ไฟล์มีทั้งตัวติดตั้งและ Registry Key สำหรับ Activate</p>
<p>ขั้นตอนการติดตั้ง<br />
1. หาที่ download ไฟล์กันมาก่อน อันนี้หาเองครับลอง search ใน google ดู key ประมาณ Visual CertExam Suite with reg key ก็จะเจอ<br />
2. ได้ไฟล์ .zip มาก็แตกมันออกครับ<br />
3. ติดตั้ง package wine หากใครมีอยู่แล้วก็ไม่ต้องติดตั้ง<br />
4. เปิด Terminal แล้ว cd เข้าไปยัง Directory ที่เก็บไฟล์ที่แตกออกมาเมื่อกี้<br />
5. ใช้คำสั่ง</p>
<pre>
<div class="codesnip-container" >$ wine visual_certexam_suite_setup.exe</div>
</pre>
<p>หรือจะคลิกขวาที่ไฟล์ visual_certexam_suite_setup.exe แล้วเลือก Open With Wine Windows Program Loader<br />
จากนั้นทำตามขั้นตอน step next ไปเรื่อยๆ จนเสร็จ<br />
6. เมื่อติดตั้งเสร็จแล้วจะเข้า Registry Key เข้าไปยังไงนี่แหละปัญหา มัน Double Click ติดตั้งไม่ได้เหมือนใน Windows เรามีวิธีแก้ไม่ยากครับ ให้เปิด Terminal ขึ้นมา จากนั้นใช้คำสั่ง</p>
<pre>
<div class="codesnip-container" >mrgill@mrgill-laptop:~$ regedit</div>
</pre>
<p>7. จะมีหน้าต่างโปรแกรม Registry Editor ขึ้นมาเหมือนใน Windows คลิกที่เมนู Registry -> เลือกเมนู Import Registry File&#8230;<br />
8. ลองเรียกโปรแกรม Visual CertExam กันเลย ลอง Add ไฟล์ .vce กันได้เลย</p>
<p>เท่านี้ก็พร้อมใช้งานแล้วครับผม</p>
<p>โชคดีในการสอบ</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/12/11/how-to-visual-certexam-suite-on-ubuntu-11-10.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>สูตรคำนวณพื้นที่ Disk สำหรับติดตั้ง Zimbra</title>
		<link>http://imrgill.com/2011/12/07/example-formula-for-calculate-disk-storage-for-install-zimbra.html</link>
		<comments>http://imrgill.com/2011/12/07/example-formula-for-calculate-disk-storage-for-install-zimbra.html#comments</comments>
		<pubDate>Wed, 07 Dec 2011 07:11:26 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[mail server]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[zimbra]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=678</guid>
		<description><![CDATA[STORAGE CALCULATION EXAMPLE (Based on ‘Mailbox Usage of 200 MB’ and 500 users) + User Data: 500 users with 200 MB = 100 GB user data + MySQL data: 5% of 100 GB (User Data): 5 GB + Zimbra binaries: 10 GB + Zimbra logs: 20 GB + Zimbra indexes: 25% of 100GB (User Data) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>STORAGE CALCULATION EXAMPLE</strong><span style="font-size: x-small;"><br />
(Based on ‘Mailbox Usage of 200 MB’ and 500 users)<br />
</span><br />
+ User Data: 500 users with 200 MB = 100 GB user data<br />
+ MySQL data: 5% of 100 GB (User Data): 5 GB<br />
+ Zimbra binaries: 10 GB<br />
+ Zimbra logs: 20 GB<br />
+ Zimbra indexes: 25% of 100GB (User Data) = 25 GB<br />
<strong><br />
SUBTOTAL:</strong> 100 + 5 + 10 + 20 + 25 = 160 GB<br />
<strong>Backups:</strong> 160 % of Subtotal: 160 * 160% = 256 GB for backups<br />
<strong>TOTAL:</strong> 160 + 256 = 416 GB</p>
<p>อ้างอิง : <a href="http://blog.zimbra.com/blog/archives/2009/05/6-tips-for-a-smooth-zimbra-server-install.html">http://blog.zimbra.com/blog/archives/2009/05/6-tips-for-a-smooth-zimbra-server-install.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/12/07/example-formula-for-calculate-disk-storage-for-install-zimbra.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>คลอดละครับ script auto login truewifi 3.0 หมดปัญหา pc/7eleven</title>
		<link>http://imrgill.com/2011/11/27/script-truewifi-auto-login-v3-0.html</link>
		<comments>http://imrgill.com/2011/11/27/script-truewifi-auto-login-v3-0.html#comments</comments>
		<pubDate>Sun, 27 Nov 2011 02:36:23 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[truewifi]]></category>
		<category><![CDATA[user script]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=676</guid>
		<description><![CDATA[การติดตั้งเหมือนเดิมครับ อ่านได้ที่ Script ต่อ True Wi-Fi อัตโนมัติ(Truewifi Auto Login V2.04) เวอร์ชันนี้ออกมาเพื่อแก้ปัญหา URL สำหรับบางพื้นที่ที่เปลี่ยนหน้า Login เป็น pc/7eleven โดยเฉพาะ change log : 1. ตัวแปร username ที่สามารถใส่ username@domain ได้โดยเลยที่ไม่ต้องระบุเป็นตัวเลข (ขอบคุณท่าน Warun Kietduriyakul แห่ง jomyut.net สำหรับ script ตรงส่วนนี้) 2. ผู้ใช้ต้องกำหนดค่า VLAN และ MAC เอง วิธีง่ายๆ ก็เอาค่านี้มาจาก URL Redirect นั้นแหละครับตรง "VLAN=851&#038;MAC=00:21:65:aa:f0:aa" มาใส่เป็นตัวแปร จากตัวอย่าง ให้ใส่เป็น var vlan = "851"; และ var [...]]]></description>
			<content:encoded><![CDATA[<p>การติดตั้งเหมือนเดิมครับ อ่านได้ที่ <a href="http://imrgill.com/2009/12/18/script-truewifi-auto-login-v2-04.html" target="_blank">Script ต่อ True Wi-Fi อัตโนมัติ(Truewifi Auto Login V2.04)</a></p>
<p>เวอร์ชันนี้ออกมาเพื่อแก้ปัญหา URL สำหรับบางพื้นที่ที่เปลี่ยนหน้า Login เป็น pc/7eleven โดยเฉพาะ</p>
<p>change log :</p>
<pre>
<div class="codesnip-container" >1. ตัวแปร username ที่สามารถใส่ username@domain ได้โดยเลยที่ไม่ต้องระบุเป็นตัวเลข (ขอบคุณท่าน Warun Kietduriyakul แห่ง jomyut.net สำหรับ script ตรงส่วนนี้)
2. ผู้ใช้ต้องกำหนดค่า VLAN และ MAC เอง วิธีง่ายๆ ก็เอาค่านี้มาจาก URL Redirect นั้นแหละครับตรง "VLAN=851&#038;MAC=00:21:65:aa:f0:aa" มาใส่เป็นตัวแปร จากตัวอย่าง ให้ใส่เป็น
   var vlan = "851"; และ
   var mac = "00:21:65:aa:f0:aa";
3. เนื่องด้วยมีผู้ใช้ script นี้รายงานมาว่า Truewifi ได้มีการเปลี่ยน URL สำหรับ Login ในบางพื้นที่เป็น "portal.trueinternet.co.th/wifiauthen/pc/7eleven/wi-fi_login.php" ผมจึงแก้ script ตรงส่วนนี้ให้แล้วโดยเพิ่ม if ให้ตรวจสอบ URL ว่าเป็นแบบเก่าหรือแบบใหม่นี้</div>
</pre>
<p>เอาไปลองใช้กันดูครับ</p>
<p><strong>ดาวน์โหลด : <a href="http://www.ziddu.com/download/17765869/auto_truewifi_3.1.user.zip.html" target="_blank">auto_truewifi_3.1.user.js.zip</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/11/27/script-truewifi-auto-login-v3-0.html/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
	</channel>
</rss>

