Message boards :
Number crunching :
Changing Windows process priority on the fly via command line.
Message board moderation
Author | Message |
---|---|
HAL9000 Send message Joined: 11 Sep 99 Posts: 6534 Credit: 196,805,888 RAC: 57 |
It has been asked several times if there is a way in Windows to adjust process priority on the fly automatically. Generally you can install software such as process lasso or such. However there is a command line option to so the same thing using wmic. Apparently it has been around since XP... I recently learned about it when doing some other things. So I figured I would share the info. The command line syntax: wmic process where name="AppName" CALL setpriority ProcessIDLevel The customary notepad example setting it to "Above Normal": wmic process where name="notepad.exe" CALL setpriority 32768 Idle: 64 Below Normal: 16384 Normal: 32 Above Normal: 32768 High Priority: 128 Real Time: 256 On XP/2003 I had to run wmic by itself first where it stated "Please wait while WMIC is installed. At the moment I'm trying to work out how to use the Task Scheduler to set the science app priority up when the machine is idle and then return them to low when not idle. SETI@home classic workunits: 93,865 CPU time: 863,447 hours Join the [url=http://tinyurl.com/8y46zvu]BP6/VP6 User Group[ |
.clair. Send message Joined: 4 Nov 04 Posts: 1300 Credit: 55,390,408 RAC: 69 |
Ah. The hidden feature`s of an operating system . . . If only we knew what they were, where they iz And wot to do with them once we have found them :¬) For better or worse .... |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
Yeah - almost as well documented as my phone apps. God, bad programmers ought to have their own personal place in Hell. |
outlaw Send message Joined: 6 Mar 00 Posts: 43 Credit: 17,063,897 RAC: 0 |
You can use Task Manager, it is probably quicker and less error prone; and they both call the same API. Go to the Processes tab, right click the process you wish to change the priority of... |
EdwardPF Send message Joined: 26 Jul 99 Posts: 389 Credit: 236,772,605 RAC: 374 |
I love this kind of stuff!!!! Thanks for the post!!! Ed F |
kittyman Send message Joined: 9 Jul 00 Posts: 51468 Credit: 1,018,363,574 RAC: 1,004 |
Our friend Fred's priority tool does a wonderful job of setting the priority of Seti apps to whatever level you wish. And does so automatically every time a task is finished and a new task launches. "Freedom is just Chaos, with better lighting." Alan Dean Foster |
HAL9000 Send message Joined: 11 Sep 99 Posts: 6534 Credit: 196,805,888 RAC: 57 |
You can use Task Manager, it is probably quicker and less error prone; and they both call the same API. This information is more for those that ask how to change the to process priority automatically. Other than telling them to "install 3rd party software". Since I stumbled on it while doing other things & no one had mentioned it before, that I could find, I figured someone might have a use for it. A full write up about all the various ways of controlling the science app processes would probably be more informative when I get around to putting this up on my webserver. SETI@home classic workunits: 93,865 CPU time: 863,447 hours Join the [url=http://tinyurl.com/8y46zvu]BP6/VP6 User Group[ |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.