Daily Command : วิธีดู DHCP Information บน Ubuntu Desktop

ค้างคาใจอยู่นานแล้วครับสำหรับวิธีดูข้อมูล DHCP กรณีที่เราเป็น dhcp client ปกติ ifconfig ก็ดูได้เฉพาะว่าเราได้ ip อะไรแต่ดู gateway ไม่ได้

root@mrgill-laptop:~# ifconfig eth1 eth1 Link encap:Ethernet HWaddr 00:13:ce:34:94:ff inet addr:10.2.80.140 Bcast:10.2.80.255 Mask:255.255.255.0 inet6 addr: fe80::213:ceff:fe34:94ff/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:607200 errors:80 dropped:80 overruns:0 frame:0 TX packets:588053 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:365549369 (365.5 MB) TX bytes:203281968 (203.2 MB) Interrupt:17 Base address:0xa000 Memory:b0101000-b0101fff

ครั้งจะไปดูใน /var/lib/dhcp3 ก็มีข้อมูลเยอะเสียจนไม่รู้ว่าอันไหนเป็นอันไหน

root@mrgill-laptop:/var/lib/dhcp3# ls -al total 84 drwxr-xr-x 2 root root 4096 2010-02-01 09:47 . drwxr-xr-x 73 root root 4096 2010-01-22 01:37 .. -rw-r--r-- 1 root root 1488 2010-01-23 12:49 dhclient-03fb849f-aed0-4560-8cb5-dd5336518d93-eth1.lease -rw-r--r-- 1 root root 497 2010-01-05 21:23 dhclient-03fb849f-aed0-4560-8cb5-dd5336518d93-wlan2.lease -rw-r--r-- 1 root root 10165 2010-02-01 17:46 dhclient-09f271e2-8327-47aa-a2b3-7d9e596d9953-eth0.lease -rw-r--r-- 1 root root 1100 2010-02-02 17:11 dhclient-1fe06dc5-f1ae-49c0-a8a7-4a8b41f72551-eth1.lease -rw-r--r-- 1 root root 1508 2010-01-19 17:31 dhclient-30ebb2f0-bfa4-45a2-ac06-23ec48487e7e-eth1.lease -rw-r--r-- 1 root root 992 2009-11-01 12:53 dhclient-36406c67-cbfa-471f-8ebf-6e41d6921e98-eth0.lease -rw-r--r-- 1 root root 767 2010-02-01 21:30 dhclient-55dee4d2-623f-445a-9b86-6bfd388aef8c-eth1.lease -rw-r--r-- 1 root root 769 2010-01-20 09:59 dhclient-55dee4d2-623f-445a-9b86-6bfd388aef8c-wlan2.lease -rw-r--r-- 1 root root 550 2009-12-17 22:08 dhclient-6ac2d0b1-a5d9-4ec9-825c-ccaaee54ff0e-eth1.lease -rw-r--r-- 1 root root 994 2009-10-23 20:32 dhclient-6ac2d0b1-a5d9-4ec9-825c-ccaaee54ff0e-wlan1.lease -rw-r--r-- 1 root root 497 2009-10-23 21:39 dhclient-6ac2d0b1-a5d9-4ec9-825c-ccaaee54ff0e-wlan2.lease -rw-r--r-- 1 root root 2475 2009-11-06 18:09 dhclient-7abf6b67-2f25-47c0-b9fb-fdc29501b75e-eth1.lease -rw-r--r-- 1 root root 448 2010-02-01 09:55 dhclient-845ea4c4-871f-4a1d-91e1-19b7c0cc5fe3-eth1.lease -rw-r--r-- 1 root root 550 2010-01-21 23:09 dhclient-98188c5a-e7d5-4515-8379-e00bd5274d85-eth1.lease -rw-r--r-- 1 root root 409 2010-01-28 10:42 dhclient-bcf946a9-63ac-411a-903f-7e0b3cfbbd6a-eth1.lease -rw-r--r-- 1 root root 0 2010-01-19 14:36 dhclient-cf8c29be-461b-4a22-abd6-b079d28eb017-eth1.lease -rw-r--r-- 1 root root 1030 2010-02-01 17:50 dhclient-d7e573a1-b0f6-408c-9ddc-8150ed91f473-eth1.lease -rw-r--r-- 1 root root 1100 2010-02-02 20:45 dhclient.leases

วันนี้เลยนำคำสั่ง nm-tool มาฝากครับ(ที่จริงคลิกดู information ที่ NetworkManager ก็ได้)

root@mrgill-laptop:~# nm-tool NetworkManager Tool State: connected - Device: eth1 [Auto mrgill_wifi] --------------------------------------------- Type: 802.11 WiFi Driver: ipw2200 State: connected Default: yes HW Address: 00:13:CE:34:94:FF Capabilities: Speed: 54 Mb/s Wireless Properties WEP Encryption: yes WPA Encryption: yes WPA2 Encryption: yes Wireless Access Points (* = current AP) truewifi: Infra, 00:02:CF:94:60:E0, Freq 2412 MHz, Rate 54 Mb/s, Strength 27 *mrgill_wifi: Infra, 02:23:69:3A:F9:AE, Freq 2412 MHz, Rate 54 Mb/s, Strength 98 WPA WPA2 true_homewifi: Infra, 00:13:49:E4:26:9C, Freq 2437 MHz, Rate 54 Mb/s, Strength 65 WEP IPv4 Settings: Address: 10.2.80.140 Prefix: 24 (255.255.255.0) Gateway: 10.2.80.254 DNS: 10.2.80.254 - Device: eth0 ----------------------------------------------------------------- Type: Wired Driver: 8139too State: unavailable Default: no HW Address: 00:C0:9F:EE:19:BA Capabilities: Carrier Detect: yes Speed: 10 Mb/s Wired Properties Carrier: off

จากคำสั่งดังกล่าวเราก็จะเห็น Gateway และ DNS ด้วย

Leave a Comment February 2, 2010

Daily Command : ดูเนื้อที่ HDD ว่าเหลือเท่าไหร่ด้วย df

เนื้อที่บน hdd ของเราถูกใช้ไปทุกวันโดยเฉพาะใครที่ไม่แยกโดยเฉพาะ /var และ /var/log ออกมาหาก /var/log เต็มก็อาจทำให้ service down ได้ ดังนั้นเราจึงต้องหมั่นตรวจสอบการใช้พื้นที่ hdd บ่อยๆ วันนี้จึงนำคำสั่ง df มาฝาก

[mrgill@eng ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda9 1012M 717M 244M 75% / /dev/sda1 251M 59M 179M 25% /boot /dev/sda7 1012M 34M 927M 4% /chroot none 506M 0 506M 0% /dev/shm /dev/sda11 37G 6.7G 28G 20% /home /dev/sda10 494M 11M 458M 3% /tmp /dev/sda5 5.0G 2.3G 2.4G 50% /usr /dev/sda3 9.9G 6.1G 3.3G 65% /var /dev/sda6 3.0G 399M 2.5G 14% /var/lib /dev/sda2 9.9G 6.3G 3.1G 67% /var/spool/mail

รายละเอียดเพิ่มเติม

[mrgill@eng ~]$ man df

Leave a Comment January 31, 2010

Daily Command : ดูรายละเอียดโดเมนด้วย whois

วันนี้เอาคำสั่งสำหรับตรวจสอบรายละเอียดของโดเมนมาฝากครับ นั้นคือคำสั่ง whois ซึ่งการใช้งานก็แสนง่ายครับแค่เพียงใส่ชื่อโดเมนที่ต้องการตรวจตามหลังคำสั่ง whois เท่านั้น ตัวอย่าง

root@mrgill-laptop:~# whois cpe-ru.com Whois Server Version 2.0 Domain names in the .com and .net domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. (more...)

Leave a Comment January 28, 2010

Daily Tips : VPN Connection on iPhone

Since I have got an iPhone — it is so amazing mobile device, although, it is kind of a pricey phone — I think I can use all of iPhone features despite the fact that i like languages, musics, and IT.

Today’s topics is going to be VPN Connection on iPhone.
iPhone can be applied to use with business environment like VPN Connection.

First of all, I need to add VPN configuration by:

Settings –> Network –> VPN –> Add VPN Configuration…

IMG_0173

(more…)

1 Comment January 27, 2010

Daily Command : แอบดูคน logon ด้วย w

คิดไว้นานแล้วครับว่าจะทำหมวดพวก Daily tips และ Daily command ซึ่ง Daily tips เปิดตัวไปก่อนหน้าแล้ววันนี้มาถึงคิวของ Daily command กันบ้าง วันนี้ขอเสนอคำสั่ง w ครับ สั้นๆ ง่ายๆ เอาไว้ตรวจสอบสถานะของเครื่องและการ logon ของ user

[mrgill@Webserver ~]$ w 21:40:35 up 45 days, 15:33, 2 users, load average: 0.05, 0.03, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT mrgill pts/1 ppp-124-120-45-1 21:37 0.00s 0.03s 0.00s w root :0 - 18Dec09 ?xdm? 2:22m 0.20s /usr/bin/gnome-session

รายงานทั้ง

  • วันเวลา : 21:40:35
  • uptime : up 45 days, 15:33
  • จำนวน user ที่ logon : 2 users
  • รวมทั้ง load ของ cpu ด้วย : load average: 0.05, 0.03, 0.00

Leave a Comment January 26, 2010

Fwd mail : ผีสามตัว

เคยอ่านแบบร้อยแก้วหลายทีละ วันนี้ไปในเมลเจอร้อยกรอง นับถือคนแต่งจริงๆ

ผีสามตัว

ผีสามตัว นั่งคุยกัน อยู่ข้างวัด             เงียบสงัด วังเวง น่าเกรงขาม
นั่งปรับทุก ถามสุกดิบ ตอนสามยาม            ตัวแรกถาม ตัวที่สอง บอกข้าที
…ว่าทำไม เจ้าใย ถึงตายเล่า              เรื่องมันเศร้า ข้าโดนยิง ตอนหลบหนี
แล้วถามกลับ เจ้าทำไม สิ้นชีวี                   ตัวข้านี้ โดนแทง ตอนตีกัน
…ผีทั้งสอง หันไปมอง ตัวที่สาม          แล้วก็ถาม ว่าทำไม ถึงตัวสั่น
ทั้งร้องไห้ เหงื่อท่วมหน้า ทำไมกัน              พวกเรานั้น ฉันเข้าใจ ให้บอกมา
…ตัวที่สาม อ้ำอึ้ง อยู่ซักครู่                 ก็ไม่รู้ ว่าจะพูด ดีไหมหนา
ตัดสินใจ สุดกล้ำกลืน ฝืนอุรา                    อันตัวข้า….มานั่งขี้….ยังไม่ตาย…..

Leave a Comment January 24, 2010

Fwd mail : เมื่อฮิตเลอร์เกลียด BB

1 Comment January 22, 2010

How to : ลง KDE4 แล้วไม่ชอบ อยากจะลบออกทำไง

หลังจากลอง kubuntu-kde4-deskop ไปแล้วก็รู้สึกว่าใช้ gnome แหละดีแล้ว จำได้ว่าตอนลงมันใช้เนื้อที่บนฮาร์ดดิสตั้ง 600 mb กว่า เลยอยากเอาออก ตอนแรกก็ไป search ใน google แต่ก็ไม่ค่อยเจอข้อมูลเท่าไหร เลยมั่วเองเลยครับ

ขั้นตอนก็มีประมาณนี้ครับ

1. สั่งลบด้วย apt-get remove kubuntu-desktop kde*

mrgill@mrgill-laptop:~# sudo apt-get remove kubuntu-desktop kde*

2. ยังเหลือพวก Package Dependency ต้องเอาออกด้วย apt-get autoremove

mrgill@mrgill-laptop:~# sudo apt-get autoremove

3. ใน home ของเรายังมีไดเร็กทอรี่ .kde ซ้อนอยู่ก็เอาออกซะเลย

mrgill@mrgill-laptop:~# rm -rf .kde

4. ลบพวก .deb ที่เคย apt-get มา

mrgill@mrgill-laptop:~# sudo apt-get clean all

เท่าที่ผมทดลอง reboot เครื่องดูยังมีพวก icon themes หลงเหลืออยู่บ้างอีกนิดหน่อย แต่ก็ไม่เป็นปัญหาอะไรครับ แกล้งทำเป็นไม่เห็นซะ

Leave a Comment January 22, 2010

How to : วิธีเปลี่ยน Keyboard Layout ให้เป็นภาษาไทยบน Kubuntu Desktop

เมื่อคืนลอง apt-get install kubuntu-kde4-desktop มาครับ เพิ่งได้ลอง Login KDE4 เมื่อกี้เอง ไม่ได้จับ KDE มานานแล้วตั้งแต่สมัย Redhat9 กลับมาลองใช้เมื่อกี้เปิด emesene แล้วจะคุยกับพี่ เอ่แล้วมันเปลี่ยนภาษายังไงวะเนี่ย งมอยู่นานสุดท้ายก็ทำได้เลยเอามาเขียนไว้เผื่อเป็นประโยชน์สำหรับมือใหม่ Kubuntu (ต้องขออภัยที่รูปที่ Capture มาไม่มี Mouse Pointer)

ขั้นตอน

1. คลิกที่ KDE Start Botton มุมขวาล่าง แล้วเลือกเมนู System Settings

kde_thai_keyboard_layout_01

คลิก KDE Start Botton

(more…)

Leave a Comment January 22, 2010

Daily Tips : เรียกเมนู Application ของ Ubuntu โดยไม่ต้องคลิก

Touch Pad เสีย แถมเพื่อนดันขโมยเมาส์ไปใช้ แล้วจะเรียกเมนู Application ยังไง ถ้าเป็น Windows ก็คงกดปุ่ม Windows Key แล้วบน Ubuntu ต้องกดอะไรหว่า คำตอบก็คือ Alt  +  F1 ครับ

ubuntu_alt_F1

กดปุ่ม Alt + F1 เพื่อเรียกเมนู Application

Leave a Comment January 21, 2010


Recent Entries

Random Posts

Social Network

Tag Cloud

Calendar

February 2010
S M T W T F S
« Jan    
 123456
78910111213
14151617181920
21222324252627
28  

RSSTwitter: imrgill

  • ออกไป v-smart ละคร๊าบบ
  • RT อรุณสวัส(ตื่นมากินยากินกล้วยเหมือนเช่นเคย) ดูแลสุขภาพด้วยนะ // เช่นกันนะครับ ขอบคุณที่เป็นห่วงครับ
  • RT เจอที่ชาร์ตแบต samsung ที่หายไปแล้ว // ยินดีด้วย \\ ขอบคุณครับ
  • เจอที่ชาร์ตแบต samsung ที่หายไปแล้ว

RSS LinuxDotSothorn

RSS UbuntuClub

RSS Blognone

Tag

ภาษาไทย 2009 adobe amsn antivirus apt-get bash chat clip dns entertainment Facebook firefox Forward mail google graphic grave accent How to howto html im install Internet karmic keyboard Linux logout monitoring operating system os Programming recovery Server shell script sms Social network Software themes troubleshooting twitter Ubuntu utility virtualization Windows wordpress

Categories

Archives

Blogroll

Meta

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up

Get Adobe Flash playerPlugin by wpburn.com wordpress themes