微軟有推出一個 Internet Information Services Diagnostic Tools 工具程式集,可以幫助你分析 IIS 6 的各種問題,其中有個很棒的工具叫做 Request Viewer 可以做到類似 Apache 中 mod_status 產生出來的伺服器執行狀態。如下圖示:
Apache 的 server-status 畫面

啟動 IIS Diagnostic Tools 的 Request Viewer

IIS Diagnostic Tools 的 Request Viewer 的執行畫面

不過我一開始執行 Request Viewer 的時候發生了一個小狀況,就是會出現【OpenTraceLogFile() failed ( Win32 error: -2147024735 - 指定的路徑不正確。 )】這個錯誤訊息,如下圖所示:

這個錯誤是因為系統的 TEMP 環境變數中預設值是 %USERPROFILE%\Local Settings\Temp,如果你登入的帳號是 Administrator 的話,這個路徑就在 C:\Documents and Settings\Administrator\Local Settings\Temp:

不過這卻會造成 Request Viewer 無法正確存取暫存目錄,解決之道就是將 TEMP 環境變數「改短一點」,例如說你可以在 C:\ 建立一個 TEMP 目錄,並修改 TEMP 環境變數到 C:\TEMP,這樣一來 Request Viewer 就會正確執行了!
相關連結