6 พ.ค. 2553

Disable X Window

Ubuntu uses the Debian model, and the default runlevel is 2, unless otherwise configured - so init 3 won't help, I'm afraid, unless you enjoy reconfiguring runlevels .

If you have the file /etc/X11/default-display-manager you can edit it or
do
echo "false" | sudo tee /etc/X11/default-display/manager

This will disable gdm/kdm/xdm , or whatever you have in that file

You can put it back with a text editor, or do for example
echo "/usr/sbin/gdm" | sudo tee /etc/X11/default-display-manager

Of course, for a temporary disabling of X you can just do
sudo /etc/init.d/gdm stop

then use the "restart" option or the
"start" option of that init.d script to restart it.

29 เม.ย. 2553

วิธีการตั้งค่าสถานะของ NUM LOCK เมื่อเข้าสู่ระบบ Windows XP

หลังจากเปิด Numlock ตอนหน้า Logon screen แล้ว เข้าสู่ระบบ Windows  ปุ่ม Numlock ก็ดันถูกปิดอีก อะไรของมัน Windows สงสัยว่างจัด

วิธีแก้ไข

1. เริ่มต้น Notepad
2. คัดลอกรหัสต่อไปนี้ และวางรหัสในแฟ้มข้อความ:

set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"

3. บันทึกแฟ้มเป็น "numlock.vbs" (รวมเครื่องหมายคำพูดด้วย) วิธีนี้จะเป็นการสร้างแฟ้มที่มีส่วนขยายเป็น .vbs ไอคอนจะเปลี่ยนจากไอคอน Notepad เป็นไอคอนสคริปต์

เมื่อต้องการกำหนดค่าสคริปต์เพื่อให้ทำงานสำหรับผู้ใช้ทุกคน ให้คัดลอกแฟ้ม Numlock.vbs ไปไว้ที่โฟลเดอร์เริ่มต้นระบบในโปรไฟล์ผู้ใช้ทุกคน เส้นทางเริ่มต้นสำหรับโฟลเดอร์นี้ คือ Documents and Settings\All Users\Start Menu\Programs\Startup

จัดไป

เปิด Numlock ทุกครั้ง ที่หน้า logon screen

ต้องเข้าไปแก้ไขที่ Registry คับ

ไปที่ HKEY_USERS\.Default\Control Panel\Keyboard

แล้วค่าเปลี่ยนของ InitialKeyboardIndicators เป็น 2

ทำไมต้องเป็น 2  เพราะคำอธิบายข้าล่างนี้


0
Turns off Num Lock, Caps Lock, and Scroll Lock

1
Turns on Caps Lock

2
Turns on Num Lock

3
Turns on Caps Lock and Num Lock

4
Turns on Scroll Lock

5
Turns on Caps Lock and Scroll Lock

6
Turns on Num Lock and Scroll Lock

7
Turns on Caps Lock, Num Lock, and Scroll Lock

28 เม.ย. 2553

HP 2600n สี Magenta เพี้ยน

อาการ: พิมพ์ Demo page จากหน้าเครื่องพมพ์ รูปตรงที่เป็นสีแดง ก็ไม่แดง สีจะออกกส้มๆุ

สาเหตุ กระจกที่สะท้อนแสง laser เพื่อสร้างภาพสีแดง สกปรก

วิธีแก้ไข http://www.reeves-hall.net/tech-gadgets/fixing-washed-out-colour-on-hp-color-laserjet-2605/

ลองแล้วแก้ได้จริง

ขอบคุณครับ The Reeves-Hall Family


21 มี.ค. 2553

ติดตั้ง SNMP บน Ubuntu 9.04

ติดตั้ง SNMP deamon อันเดียวจบ

1. ติดตั้ง SNMP deamon

sudo apt-get install snmpd

2. แก้ไข /etc/default/snmpd เล็กน้อย

SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

ลบ 127.0.0.1 ถ้าอยากส่งค่าไปที่ Server อื่น หรือระบุ IP ที่ต้องการส่งค่า MIB ไปให้ ส่วนผมลบออก แล้วไปป้องกันที่ iptables

3. แก้ไข /etc/snmp/snmpd.conf ค้นหาบรรทัดนี้

# sec.name source community
com2sec paranoid default public
#com2sec readonly default public
#com2sec readwrite default private

แล้วแก้ไขเป็น

# sec.name source community
#com2sec paranoid default public
com2sec readonly 192.168.0.0/24 public
#com2sec readwrite default private

4.ทดสอบที่เครื่องอื่น หรือที่เครื่อง NMS ด้วยคำสั่ง

snmpwalk -c public -v 1 127.0.0.1 #$ipของเครื่องsnmp system

ถ้าออกมาแบบนี้ ต้องไปดูที่ /etc/snmp/snmpd.conf (ตรงข้อที่ 3 ด้านบน)หรือที่ Firewall
Timeout: No Response from localhost

หรือแบบนี้แปลได้ว่า สำเร็จ!

sysDescr.0 = STRING: Linux Authen 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17
02:48:10 UTC 2009 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (3155401) 8:45:54.01
sysContact.0 =
STRING: Root (configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: Authen
sysLocation.0 = STRING: Unknown (configure
/etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (0) 0:00:00.00
sysORID.1 = OID: snmpFrameworkMIBCompliance
sysORID.2 = OID:
snmpMPDCompliance
sysORID.3 = OID: usmMIBCompliance
sysORID.4 = OID:
snmpMIB
sysORID.5 = OID: tcpMIB
sysORID.6 = OID: ip
sysORID.7 = OID:
udpMIB
sysORID.8 = OID: vacmBasicGroup
sysORDescr.1 = STRING: The SNMP
Management Architecture MIB.
sysORDescr.2 = STRING: The MIB for Message
Processing and Dispatching.
sysORDescr.3 = STRING: The management
information definitions for the SNMP User-based Security Model.
sysORDescr.4
= STRING: The MIB module for SNMPv2 entities
sysORDescr.5 = STRING: The MIB
module for managing TCP implementations
sysORDescr.6 = STRING: The MIB
module for managing IP and ICMP implementations
sysORDescr.7 = STRING: The
MIB module for managing UDP implementations
sysORDescr.8 = STRING:
View-based Access Control Model for SNMP.
sysORUpTime.1 = Timeticks: (0)
0:00:00.00
sysORUpTime.2 = Timeticks: (0) 0:00:00.00
sysORUpTime.3 =
Timeticks: (0) 0:00:00.00
sysORUpTime.4 = Timeticks: (0) 0:00:00.00
sysORUpTime.5 = Timeticks: (0) 0:00:00.00
sysORUpTime.6 = Timeticks: (0)
0:00:00.00
sysORUpTime.7 = Timeticks: (0) 0:00:00.00
sysORUpTime.8 =
Timeticks: (0) 0:00:00.00

อ้างอิง http://www.debuntu.org/how-to-monitor-your-servers-with-snmp-and-cacti

20 มี.ค. 2553

ขั้นตอนการทำงาน SNMP (SNMP protocal operations)

SNMP ย่อมาจาก Simple Network Management Protocol ซึ่งเป็นโปรโตคอลที่อยู่ระดับ Application Layer และเป็นส่วนหนึ่งของชุดโปรโตคอล TCP/IP

ในการบริหารและจัดการเครือข่ายต้องใช้อุปกรณ์ต่าง ๆ มีส่วนของการทำงานร่วมกับระบบจัดการเครือข่าย ซึ่งเราเรียกว่า เอเจนต์ (Agent) เอเจนต์เป็นส่วนของซอฟต์แวร์ที่อยู่ในอุปกรณ์ต่าง ๆ ที่เชื่อมอยู่ในเครือข่ายโดยมีคอมพิวเตอร์หลักในระบบหนึ่งเครื่องเป็นตัวจัดการและบริหารเครือข่ายหรือเรียกว่า NMS-Network Management System

การที่ระบบบริหารและจัดการเครือข่ายจะประสบผลสำเร็จ จึงขึ้นกับระบบซอฟต์แวร์ที่ต้องมีอยู่ในตัวอุปกรณ์เครือข่าย (เอเจนต์) ส่วนของเอเจนต์ยังมีการเก็บข้อมูลไว้ภายใน ข้อมูลที่เก็บไว้นี้เรียกว่า MIB - Management Information Base การทำงานของอุปกรณ์ต่าง ๆ บนเครือข่ายจะมีส่วนข้อมูลของตัวเองเก็บไว้ที่ MIB ดังนั้น NMS จึงส่งคำถามมายังเอเจนต์ การส่งคำถามและเอเจนต์ส่งข้อมูลคำตอบนี้ย่อมเป็นไปตามมาตรฐานโปรโตคอลที่กำหนด เช่น ลักษณะคำถามคำตอบของ SNMP ที่สอบถามกันเป็นระบบ และเป็นมาตรฐานสากล



ขั้นตอนการทำงานของ การส่งข้อมูล SNMP

1. NMS (Network Management System)จะสร้างคำร้องขอ ประกอบด้วย ชื่อ MIB ซึ่งเวลาตอบกลับจะส่งค่า ของ MIB นี้กลับมา
2. NMS ส่งคำร้องขอข้อมูล
3. Agent รับคำร้องขอ และนำชื่อ MIB มาตรวจสอบ ถ้าถูกต้อง จะค้นหาข้อมูลของ MIB นั้น
4. Agent สร้างข้อมลการตอบกลับ ทั้งจะส่งข้อมูลที่ NMS ต้องการ หรือแม้แต่เกิด error ก็จะส่งกลับไป เช่น ไม่มีชื่อ MIB นี้ในฐานข้อมูลของ Agent
5. Agent ส่งการตอบรับ ไปที่ NMS
6. NMS รับข้อมูลไปประมวลผลต่อไป



อ้างอิง
http://www.tcpipguide.com/free/t_SNMPProtocolBasicRequestResponseInformationPollUsi.htm
http://web.ku.ac.th/schoolnet/snet1/network/nms.html

18 มี.ค. 2553

Hotkey สำหรับ Microsoft Windows

Windows system key combinations

  • F1: Help
  • CTRL+ESC: Open Start menu
  • ALT+TAB: Switch between open programs
  • ALT+F4: Quit program
  • SHIFT+DELETE: Delete item permanently
  • Windows Logo+L: Lock the computer (without using CTRL+ALT+DELETE)

Windows program key combinations

  • CTRL+C: Copy
  • CTRL+X: Cut
  • CTRL+V: Paste
  • CTRL+Z: Undo
  • CTRL+B: Bold
  • CTRL+U: Underline
  • CTRL+I: Italic

Mouse click/keyboard modifier combinations for shell objects

  • SHIFT+right click: Displays a shortcut menu containing alternative commands
  • SHIFT+double click: Runs the alternate default command (the second item on the menu)
  • ALT+double click: Displays properties
  • SHIFT+DELETE: Deletes an item immediately without placing it in the Recycle Bin

Microsoft Natural Keyboard keys

  • Windows Logo: Start menu
  • Windows Logo+R: Run dialog box
  • Windows Logo+M:Minimize all
  • SHIFT+Windows Logo+M: Undo minimize all Windows
  • Logo+F1:Help
  • Windows Logo+E: Windows Explorer
  • Windows Logo+F: Find files or folders
  • Windows Logo+D: Minimizes all open windows and displays the desktop
  • CTRL+Windows Logo+F: Find computer
  • CTRL+Windows Logo+TAB: Moves focus from Start, to the Quick Launch toolbar, to the system tray (use RIGHT ARROW or LEFT ARROW to move focus to items on the Quick Launch toolbar and the system tray)
  • Windows Logo+TAB: Cycle through taskbar buttons
  • Windows Logo+Break: System Properties dialog box


Microsoft Natural Keyboard with IntelliType software installed

  • Windows Logo+L: Log off Windows
  • Windows Logo+P: Starts Print Manager
  • Windows Logo+C: Opens Control Panel
  • Windows Logo+V: Starts Clipboard
  • Windows Logo+K: Opens Keyboard Properties dialog box
  • Windows Logo+I: Opens Mouse Properties dialog box
  • Windows Logo+A: Starts Accessibility Options (if installed)
  • Windows Logo+SPACEBAR: Displays the list of Microsoft IntelliType shortcut keys
  • Windows Logo+S: Toggles CAPS LOCK on and off

    APPLIES TO
    Windows Server 2008 Datacenter
    Windows Server 2008 Enterprise
    Windows Server 2008 Standard
    Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
    Microsoft Windows Server 2003, Enterprise x64 Edition
    Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
    Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
    Microsoft Windows Server 2003, Standard x64 Edition
    Microsoft Windows Server 2003, Standard Edition (32-bit x86)
    Microsoft Windows 2000 Server
    Microsoft Windows Millennium Edition
    Microsoft Windows 98 Second Edition
    Microsoft Windows 98 Standard Edition
    Microsoft Windows 95
    Windows Vista Business
    Windows Vista Enterprise
    Windows Vista Home Basic
    Windows Vista Home Premium
    Windows Vista Starter
    Windows Vista Ultimate
    Microsoft Windows XP Home Edition
    Microsoft Windows XP Professional
    Microsoft Windows XP Starter Edition
    Microsoft Windows XP Tablet PC Edition