![]() ![]() You are obliged to use remotely PSLIST -accepteula \\servername to list the remote processes, then you must use PSKILL -accepteula \\servername psexesvc to kill the psexec service.Ĭ:\>wmic path win32_perfformatteddata_perfproc_process where Name=”iexplore” get Name, Caption, PercentProcessorTime, IDProcess /format:listĬ:\>wmic path win32_perfformatteddata_perfproc_process where (Name=’iexplore’) get Name, Caption, PercentProcessorTime, IDProcess /format:listĬ:\>wmic path win32_perfformatteddata_perfproc_process get Name, Caption, PercentProcessorTime, IDProcess /format:listĮxample of batch script with an infinite loop which checks and kills svchost and mcshield in case they go too OFF &SETLOCALįor /f %%a in (‘wmic path Win32_PerfFormattedData_PerfProc_Process where “Name = ‘svchost’ and PercentProcessorTime > 95” get IDProcess’) do (įor /f %%b in (“%%~a”) do taskkill /F /pid %%~bįor /f %%a in (‘wmic path Win32_PerfFormattedData_PerfProc_Process where “Name = ‘mcshield’ and PercentProcessorTime > 95” get IDProcess’) do (Ĭ:\>wmic cpu get loadpercentage /f “skip=1″ %p in (‘wmic cpu get loadpercentage’) do %p% Note: this command line abot works well through a PSEXEC remote command. Note: this command line above works well through a PSEXEC remote commandĬ:> wmic path win32_perfformatteddata_perfproc_process where (PercentProcessorTime ^> 80) get Name, Caption, PercentProcessorTime, IDProcess /every:5 every 5 sec Get processes and percentage process time:Ĭ:> wmic path Win32_PerfFormattedData_PerfProc_Process get Name,PercentProcessorTime,IDProcessĬ:> wmic path win32_perfformatteddata_perfproc_process where (PercentProcessorTime ^> 80) get Name, Caption, PercentProcessorTime, IDProcess /format:list (or /format:table) Procexp is GUI only and cannot be started from the command line. ![]() Other useful command lines: from sysinternals suite: pslist, pskill. Using old Windows 2003 resource kit utility – it works also on latest Windows OS: pmon.exe (but pmon.exe does not work through a psexec connection) Here are tools and methods to get the processes and CPU consumption to detect which process has caused 100% CPU (equivalent to the famous linux command “top”): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |