Sun Cluster 系統管理指南(適用於 Solaris 作業系統)

Procedure如何檢視 Sun Cluster 指令記錄的內容

/var/cluster/logs/commandlog ASCII 文字檔案包含執行於叢集中所選取的 Sun Cluster 指令的記錄。當您設定叢集時,會自動開始記錄指令,而當您關閉叢集時,則會結束記錄。指令會記錄至所有在叢集模式中開啟與啟動的節點。

未記錄到此檔案的的指令包括顯示叢集配置與目前狀態的指令。

記錄在此檔案中的指令包括配置與變更叢集目前狀態的指令:

commandlog 檔案中的記錄可包含下列元素:

根據預設,commandlog 檔案會定期歸檔,且一週一次。若要變更 commandlog 檔案的歸檔策略,請在叢集中的每個節點上使用 crontab 指令。請參閱 crontab(1) 線上手冊以取得更多資訊。

Sun Cluster 軟體可於任何特定的時間在各個叢集節點上最多維護 8 個先前已歸檔的 commandlog 檔案。目前這週的 commandlog 檔案命名為 commandlog。最新完成的週檔案被命名為 commandlog.0。最舊完成的週檔案被命名為 commandlog.7

    檢視目前這週的 commandlog 檔案內容,一次一個畫面。


    # more /var/cluster/logs/commandlog
    

範例 1–10 檢視 Sun Cluster 指令記錄的內容

下列範例顯示 more 指令所顯示的 commandlog 內容。


more -lines10 /var/cluster/logs/commandlog
11/11/2006 09:42:51 phys-schost-1 5222 root START - clsetup
11/11/2006 09:43:36 phys-schost-1 5758 root START - clrg add "app-sa-1"
11/11/2006 09:43:36 phys-schost-1 5758 root END 0
11/11/2006 09:43:36 phys-schost-1 5760 root START - clrg set -y
"RG_description=Department Shared Address RG" "app-sa-1"
11/11/2006 09:43:37 phys-schost-1 5760 root END 0
11/11/2006 09:44:15 phys-schost-1 5810 root START - clrg online "app-sa-1"
11/11/2006 09:44:15 phys-schost-1 5810 root END 0
11/11/2006 09:44:19 phys-schost-1 5222 root END -20988320
12/02/2006 14:37:21 phys-schost-1 5542 jbloggs START - clrg -c -g "app-sa-1"
-y "RG_description=Joe Bloggs Shared Address RG"
12/02/2006 14:37:22 phys-schost-1 5542 jbloggs END 0