Created
April 26, 2020 16:43
-
-
Save airstrike/e8d12d10af7ff661209fd4a2f00bf1f2 to your computer and use it in GitHub Desktop.
Misc process load monitoring snippets for Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem CPU load by process (e.g. python*) | |
echo "Python processes % Processor Time" | |
typeperf "\Process(python*)\% Processor Time" -sc 10 | grep / | sed -r 's/.*:(.*)/\1/g' | sed -r 's/[\",]+/ /g' | |
rem Total CPU Load | |
echo "Total CPU Load %" | |
@for /f %p in ('wmic cpu get loadpercentage ^| grep -P \d+') do @echo %p% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment