5/06/2011

使用 IBM Dynamic System Analysis (DSA) 蒐集 ESXi 主機硬體 Log

 

IBM 官方的 Log 蒐集工具,IBM Dynamic System Analysis (DSA) 可使用在 Linux, Windows, VMware ESX等平台。

而要蒐集 VMware ESXi 也是可以的,只要透過以下參數 (下列使用 Windows 版 DSA 示範):

以下是在命令提示字元:

C:\>ibm_utl_dsa_dsyt85t-3.40_portable_windows_x86-64.exe –h
注意下面這個參數的說明
--vmware-esxi <userid:password@IP [:port]>
         Retrieve system information from the remote target system loaded
         with VMWare Embedded Hypervisor.

C:\>ibm_utl_dsa_dsyt85t-3.40_portable_windows_x86-64.exe --vmware-esxi root:password@192.168.1.1
上例假設 ESXi 主機的帳號為 root 密碼為 password , @後為 ESXi 主機 IP。DSA 會使用 TCP 5989 與 ESXi 主機溝通。並將 Log 蒐集至本機的 C:\IBM_Support 目錄。


1/07/2011

RHEL Login shells v.s. non-login shells

 

Login Shells

  1. Login Shells 使用的 Startup scripts 如下順序: (紅色只有 Login shells 才有)
    1. /etc/profile (global configuration)
    2. /etc/profile.d/*.sh
    3. $HOME/.bash_profile (user configuration)
    4. $HOME/.bashrc
    5. /etc/bashrc
  2. 有哪些是 Login Shells ?,任何在登入時建立的 shells,舉例有
    • Virtual Console (Ctrl + Alt F1 ~ F6)
    • X Login
    • Remote Login (SSH, Telnet …etc.)
    • su -
    • 用 su - 切換時使用者也是 login shells。

 

Non-Login Shells

  1. Non-Login Shells 使用的 Startup scripts 如下順序:
    1. $HOME/.bashrc
    2. /etc/bashrc
    3. /etc/profile.d/*.sh
  2. 有哪些是 Non-Login Shells ?,沒有登入的 shells (打帳號 / 密碼),舉例有
    • su
    • graphical terminals.
    • any other bash instances.
    • executed scripts.

 

應用方式

依 Login shells 與 Non-Login shells 使用不同 Startup script 的特色,來做一些環境變數(Environment variables)的調整。



1/05/2011

RHEL 6 文件入口

 

RHEL 6 official document portal

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/



Putty 好站

 

一直以來都是簡單的拿 putty 做些 ssh 或 telnet 連線而已,

直到發現“putty 知多少”真的是詳細的介紹一些實用的功能。



更改 RHEL Virtual Console 解析度

 

Change Virtual Console Resolution

參考下表:

Color 640 x 480 800 x 600 1024 x 768 1280 x 1024 1600 x 1200
256 769 771 773 775 796
32 k 784 787 790 793 797
64 k 785 788 791 794 798
16 M 786 789 792 795  

編輯  /boot/grup/menu.lst  檔,找到類似下一行的東西,

kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet vga=788

加入粗體字的部份,即設定解析度為800 x 600。

建議可以先在 GRUB 開機的時候,先用編輯的測試 OK 後在寫到 menu.lst 檔。

參考資料:

[SOLVED] how to set video mode at boot

Console Resolution: VGA Values

Kernel source:
/usr/share/doc/kernel-doc-*/Documentation/fb/vesafb.txt
/usr/share/doc/kernel-doc-*/Documentation/svga.txt

如何調整linux console 解析度



12/21/2010

ESX 4 update 2 and ESX 4.1 or Later reset Service Console IP

 

 

回復 ESX 4 update 2 或 ESX 4.1 及之後版本的 Service Console IP 資訊。

這邊討論的是一個比較方便的指令,通常 ESX 或安裝完都會設定好 IP,

接著大家就會用 vSphere Client 來連線設定了。

但有些情況會需要將 Service Console 的 IP 重新設定,比方說…

  1. Virtual Distribution switch 設定錯誤。
  2. 誤刪 Service Console。
  3. 一開始就設定錯 IP。

回復的方法兩種(或許該說修改回正確值的方法),

  1. 復雜版,透過兩個指令來做,
    • esxcfg-vswitch
    • esxcfg-vswif
  2. 方便版,透過一個交談式指令完成。(親愛的朋友,這個方便的指令是從 ESX 4.0 Update 2 後才有的,若您是舊版本的話,請認命一點用方法1吧。)
    • console-setup

這邊當然是推薦使用 方法2 “console-setup” 指令,

不止是因為簡單,有使 Virtual Distribution switch 設定錯,

要用方法1改回來也是滿花時間的,同樣效果當然是選快的方法嚕。

 

對了,若是 ESXi 的話…就不必麻煩,直接去 Console 前 Reset 即可。
(當然所以設定都會一起 Reset,請小心評估。)

 

Reference data:

Configuring networking from the ESX service console command line

 

Configuring or restoring networking from the ESX service console using console-setup



12/10/2010

vmlinuz 與 vmlinux 的差異

 

vmlinuz 及 vmlinux 都是 Linux 的 kernel,

而他們的差異處簡單,以檔案大小來做區分。

檔案大小 > 640 KB 就取名為 vmlinuz ,有壓縮的意思。

檔案大小 < 640 KB 則取名為 vmlinux,在嵌入式系統較常見。



安裝 RHEL / CentOS 中文字型,以顯示中文。

 

若一開始是使用英文方式安裝,且又沒安裝中文語系,

之後在切換為 zh_TW.UTF-8 時,都會出現方塊字,

這個時候需要透過安裝字型來解決方塊字的問題。

 

作法是,在 RHEL / CentOS 光碟中的 \Server 資料夾內找到兩個 rpm 檔。

fonts-chinese-3.02-12.el5.noarch.rpm

fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

在 X-Windows 下直接點擊該檔執行即可。

若是使用指令的話則是如下:

### 假設剛說的兩個 rpm 檔都放在 /tmp 下。

/ # cd /tmp

/tmp # rpm –ivh fonts-chinese-3.02-12.el5.noarch.rpm

/tmp # rpm –ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

結束,現在登出系統在重新登入即可。(重開機也行)



11/23/2010

Windows Vista 之後版本的 Session 0

 

Windows Vista 及其之後的版本,

使用者都不會取得 Session 0,這是基於安全性的理由,

會設計為 Session 0 專為 System processes 與 Services 專用。

 

因此..只有 Windows Vista 之前的版本連遠端桌面的時候,

要做些特別應用的時候,需要在 CMD 輸入類似下面指令,來取得 Console Session。

mstsc /v:192.168.1.1 /admin

 

至於 Windows Vista 及 Windows Server 2008 和之後的版本,

基本上有沒有用 /admin 參數是一樣的...

除非你的 Windows Server 2008 或之後的版本,是有啟動 "終端機服務" 的,

才會需要用這個參數 (/admin),

用意是管理用 Session …不會計 Client Access License (有錯請指正)。

 

參考資料:

Impact of Session 0 Isolation on Services and Drivers in Windows