此公用程式可提供從各種系統計數器獲得的統計資料。以下是目前可用計數器物件的清單:
每個項目代表一個計數器物件並提供此物件的各種有用計數。本小節中僅論述 alarm、diskusage、serverresponse、db_lock、popstat、imapstat 以及 httpstat 計數器物件。如需有關 counterutil 指令用法的詳細資訊,請參閱 「Sun Java System Messaging Server 6 2005Q4 Administration Reference」中的「counterutil」。
counterutil 擁有多種旗標。此公用程式的指令格式可能如下所示:
counterutil -o CounterObject -i 5 -n 10
其中
-o CounterObject 表示計數器物件 alarm、diskusage、serverresponse、db_lock、popstat、imapstat 以及 httpstat。
-i 5 指定 5 秒的間隔時間。
-n 10 表示反覆運算次數 (預設為︰無限)。
counterutil 用法的範例如下:
# counterutil -o imapstat -i 5 -n 10 Monitor counteroobject (imapstat) registry /gotmail/iplanet/server5/msg-gotmail/counter/counter opened counterobject imapstat opened count = 1 at 972082466 rh = 0xc0990 oh = 0xc0968 global.currentStartTime [4 bytes]: 17/Oct/2000:12:44:23 -0700 global.lastConnectionTime [4 bytes]: 20/Oct/2000:15:53:37 -0700 global.maxConnections [4 bytes]: 69 global.numConnections [4 bytes]: 12480 global.numCurrentConnections [4 bytes]: 48 global.numFailedConnections [4 bytes]: 0 global.numFailedLogins [4 bytes]: 15 global.numGoodLogins [4 bytes]: 10446 ... |
這些 alarm 統計參照由 stored 傳送的警示。該警示計數器提供以下統計︰
表 23–1 counterutil alarm 統計
字尾 |
說明 |
---|---|
alarm.countoverthreshold |
超過臨界值的次數。 |
alarm.countwarningsent |
傳送的警告數目。 |
alarm.current |
目前監視的值。 |
alarm.high |
記錄的最高值。 |
alarm.low |
記錄的最低值。 |
alarm.timelastset |
上次設定目前值的時間。 |
alarm.timelastwarning |
上次傳送警告的時間。 |
alarm.timereset |
上次執行重設的時間。 |
alarm.timestatechanged |
上次變更警報狀態的時間。 |
alarm.warningstate |
警告狀態 (yes[1] 或 no[0])。 |
可以使用指令 counterutil -oCounterObject -i 5 -n 10 取得目前 IMAP、POP 以及 HTTP 連線數、失敗登入數、自啟動時間以來的總連線數等的資訊。其中,CounterObject 表示計數器物件 popstat,imapstat 或 httpstat。imapstat 字尾的涵義顯示在表 23–2 中。popstat 和 httpstat 物件可以使用相同的格式和結構提供相同的資訊。
表 23–2 counterutil imapstat 統計
字尾 |
說明 |
---|---|
currentStartTime |
目前 IMAP 伺服器程序的起始時間。 |
lastConnectionTime |
上次接受新用戶端的時間。 |
maxConnections |
IMAP 伺服器處理的並行運作連線的最大數目。 |
numConnections |
目前 IMAP 伺服器服務的連線總數。 |
numCurrentConnections |
目前使用中連線的數目。 |
numFailedConnections |
目前 IMAP 伺服器服務的失敗連線數目。 |
numFailedLogins |
目前 IMAP 伺服器服務的失敗登入次數。 |
numGoodLogins |
目前 IMAP 伺服器服務的成功登入次數。 |
指令:counterutil -o diskusage 產生以下資訊︰
表 23–3 counterutil diskstat 統計
字尾 |
說明 |
---|---|
diskusage.availSpace |
磁碟分割區中的可用空間總量。 |
diskusage.lastStatTime |
上次取得統計資料的時間。 |
diskusage.mailPartitionPath |
郵件分割區路徑。 |
diskusage.percentAvail |
磁碟分割區可用空間百分比。 |
diskusage.totalSpace |
磁碟分割區中的空間總量。 |
指令:counterutil -o serverresponse 產生以下資訊:此資訊對於檢查伺服器是否正在執行以及伺服器的回應速度非常有用。
表 23–4 counterutil serverresponse 統計
字尾 |
說明 |
---|---|
http.laststattime |
上次檢查 http 伺服器回應的時間。 |
http.responsetime |
http 的回應時間。 |
imap.laststattime |
上次檢查 imap 伺服器回應的時間。 |
imap.responsetime |
imap 的回應時間。 |
pop.laststattime |
上次檢查 pop 伺服器回應的時間。 |
pop.responsetime |
pop 的回應時間。 |
ldap_host1_389.laststattime |
上次檢查 ldap_host1_389 伺服器回應的時間。 |
ldap_host1_389.responsetime |
ldap_host1_389 的回應時間。 |
ugldap_host2_389.laststattime |
上次檢查 ugldap_host2_389 伺服器回應的時間。 |
ugldap_host2_389.responsetime |
ugldap_host2_389 的回應時間。 |