[Req] Setting priority/affinity based on "X" (parent process, commandline, etc.)

Started by Coldblackice, December 20, 2023, 04:42:31 AM

Previous topic - Next topic

Coldblackice

Not sure if this already exists, but would it be possible to add the ability to automatically set a process' priority/affinity/ProBalance based on its parent process?

For example, if a running python script opens additional pythons or sub cmd/conhosts, etc., the subsequent child processes would receive predetermined priority/affinities/PB established ahead of time by the user, whether up/down/disabled/enabled. Or even further, based on a process' (or parent process') command line parameters.

IMO "Process Watchdog" would be the simplest place for something like this to go, e.g., a drop-down like "If Parent-process contains python.exe" or "If Parent-process command-line contains X" [and child-process name|commandline contains Y], then child-process priority = Z".

This would primarily be for dynamic programs like python, Java, cmd/conhost, which in some cases might be desired having a higher or lower priority/PB-include/exclude.

Jeremy Collake

Processes can be matched based on their parents using Regular Expressions, so this should already be achievable, if not intuitive.

Example match of processes whose parent is 'python.exe':
/^([^,]*,){5}python\.exe.*,/
However, matching against the parent process command line is not supported.

Let me know if that doesn't allow you to accomplish your objective.
Software Engineer. Bitsum LLC.