Windows-Server-2008

如何計算到 IIS FTP 伺服器的永久連接數?

  • June 8, 2011

Whitc PerfMon 計數器顯示與伺服器的連接數。作業系統 - Windows 2008 R2。IIS + FTP。

沒有到 FTP 的永久連接,在 perfmon 中您只會看到目前連接。我建議您使用類似此腳本的內容從日誌中生成 FTP 報告(需要 logparser):

@echo off

set LOGPATTERN=u_ex*.log

logparser.exe "SELECT DISTINCT date,x-session INTO '%~n0.tmp' from %LOGPATTERN%" -i:w3c -o:tsv -headers:ON

if exist "%~n0.tmp" (
logparser.exe "SELECT date,COUNT(x-session) AS sessions INTO sessions.tsv FROM '%~n0.tmp' GROUP BY date" -i:tsv -o:tsv -headers:ON
del "%~n0.tmp"
)

set LOGPATTERN=

引用自:https://serverfault.com/questions/278214