1、關注命令logman
Logman create counter test
–cf “d:\logman.txt” 輸入需要的計數器文件路徑
-o “d:\log” 輸出日志的路徑
-f “csv” 輸出日志的格式
-v “nnnnnn” 日志文件的版本 文件名后面加數字 log_0000001.csv
--v 取消日志文件的版本號 log.csv
-max 25 日志文件最大25Mb
--max 日志文件沒有大小限制
注:-v與--v;-max與--max均是二選一的參數
通過上述命令生成一個定時的性能計數器
2、Logman start test 開啟test這個計數器設置
3、Logman stop test 關閉這個計數器
4、Logman delete test 刪除test計數器
5、Logman query 查詢本機的所有計數器列表
6、Logman query test 查詢test計數器的明細
7、附:logman.txt計數器輸入列表格式
\Memory\Available Bytes
\Memory\Pages Input/sec
\Memory\Pages Output/sec
\Memory\Pages/sec
\PhysicalDisk(_Total)\% Disk Time
\PhysicalDisk(_Total)\Avg. Disk Queue Length
\Processor(_Total)\% Processor Time
\SQLServer:Buffer Manager\Buffer cache hit ratio
\SQLServer:General Statistics\User Connections
\System\Processor Queue Length