我可以使用以下命令来获取所有适当进程的内存使用情况:
C:\> wmic process where name="test.exe" get workingsetsize | findstr /v "WorkingSetSizeC:\> for /F %i IN ('wmic process where name="test.exe" get workingsetsize ^| findstr /v "WorkingSetSize
99.9%的情况下,我们只需执行以下操作:而且效果很好。WMIC Path win32_process WHERE "CommandLine Like '%%tomcat%%'" CALL Terminate
WMIC Path win32_processWMIC service where "name like &