监测超过2G的进程
@echo off
:1
ping -n 2 127.0.0.1 & taskkill /fi "memusage gt 2048000" /f
goto :1
监测进程名称dll开头的,并记录特定内容
@echo off
:1
ping -n 2 127.0.0.1
:2
echo
taskkill /fi "p_w_picpathname eq dll*" | find "成功">>c:\test.txt
:3
taskkill /fi "p_w_picpathname eq dll*" /f
goto :1
记录特定内容时添加系统时间
@echo off
:1
ping -n 2 127.0.0.1
:2
taskkill /fi "p_w_picpathname eq dllho*" | find "进程" >> c:\t.txt && echo %date:~0,10% %time% >>c:\t.txt
:3
taskkill /fi "p_w_picpathname eq dll*" /f
goto :1
显示指定筛选进程的信息并删除
@echo off
:1
ping -n 2 127.0.0.1
:2
tasklist /FI "memusage gt 512000" >> D:\X\X2.txt
:3
taskkill /FI "memusage gt 864000" |findstr "进程" >> D:\X\X1.txt && echo %date:~0,10% %time% >>D:\X\X1.txt
:4
findstr /v "信息:" D:\X\X2.txt >>D:\X\X1.txt
goto 5
:5
del D:\X\X2.txt
goto :1