一个循环采集CPU的etl日志的脚本
md D:\\temp
set TargetDriveEtl=D:\\temp
@echo off
SET /A "index=1"
SET /A "count=10"
:while
if %index% leq %count% (
echo The value of index is %index%
wmic process where name="wprui.exe" terminate
wpr -cancel
wpr -start CPU.light
timeout /T 10 /NOBREAK
wpr -stop %TargetDriveEtl%\temp%index%.etl
SET /A "index=index + 1"
goto :while
)
pause