Iznogoud Posted August 14, 2006 Posted August 14, 2006 Is it possible to limit an application to a specific maximum processor power? For an example: A dos programm running wich is waiting for a respond uses 100% of your processor power if its active. This is because its polling your keyboard for pressed keys. Is it possible to limit the processor power to a specific maximum with AutoIT? Why do i want to do this: If you run DOS programs in a Terminal Server enviroment, it will dramatically reduce your performance if multiple users are using the same DOS program. There are some programs wich can do this, but if they can do it, why can't we do it?
MHz Posted August 15, 2006 Posted August 15, 2006 The DOS "Start" command can set priority to start a process. AutoIt3 also does have a ProcessSetPriority() that can used to change the priority of a process.
Iznogoud Posted August 15, 2006 Author Posted August 15, 2006 The DOS "Start" command can set priority to start a process.AutoIt3 also does have a ProcessSetPriority() that can used to change the priority of a process.Is that enough? Isnt't there a way you can set the processor power to maximum of 20%?
Moderators SmOke_N Posted August 15, 2006 Moderators Posted August 15, 2006 Is that enough? Isnt't there a way you can set the processor power to maximum of 20%?Sure, close it right before it hits 21% ... j/k Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
MHz Posted August 15, 2006 Posted August 15, 2006 Is that enough? Isnt't there a way you can set the processor power to maximum of 20%?Yes . WMI also does the same priority concept.Seems like SmOke_N's reply could be the only reality to 20% control.
Iznogoud Posted August 15, 2006 Author Posted August 15, 2006 Yes . WMI also does the same priority concept.Seems like SmOke_N's reply could be the only reality to 20% control.Not the only option, because Citrix has developed a way wich controls the power usage of DOS applications.But maybe i am just retarded to think its possible to make it on your own with help of Auto IT members.
MHz Posted August 15, 2006 Posted August 15, 2006 (edited) Programs I have seen where you can monitor a process by setting it at say 20%, will raise or lower the priority to roughly allow 20% mark, give or take some. That is where ProcessSetPriority() comes into it. WMI I believe may return the CPU percentage so you can script on reading the level of the process and raise or lower the priority with ProcessSetPriority(). Edited August 15, 2006 by MHz
novatek Posted November 16, 2006 Posted November 16, 2006 (edited) Process CPU: http://www.autoitscript.com/forum/index.ph...=_Get_CPU_Usage Func _Get_CPU_Usage($strComputer, $percent = 2, $strProcess = "")This function is poor in averageing CPU usage (e.g. average use in last 500ms). It is giving alternating results 0% or 100%, during the process run with average 98% CPU. If anyone know how to set averaging time for WMI service within this function, it would be quite useful at this point. PV.exe in quite strong in this way. _Get CPU_Usage Tip: Value "_Total" with the name of the process ($strProcess) is retuning total CPU usage. Edited November 18, 2006 by novatek
novatek Posted November 19, 2006 Posted November 19, 2006 (edited) Func _Get_CPU_Usage($strComputer, $percent = 2, $strProcess = "") This function is poor in averageing CPU usage (e.g. average use in last 500ms). It is giving alternating results 0% or 100%, during the process run with average 98% CPU. If anyone know how to set averaging time for WMI service within this function, it would be quite useful at this point.Solved: http://www.autoitscript.com/forum/index.ph...c=36490&hl= Func _ProcessGetCPU() Edited November 20, 2006 by novatek
/dev/null Posted November 19, 2006 Posted November 19, 2006 Not the only option, because Citrix has developed a way wich controls the power usage of DOS applications.But maybe i am just retarded to think its possible to make it on your own with help of Auto IT members.yeah, but obviously you don't know that Citrix replaces "half" of the operating system. So, before you insult members here you should proof some better understanding of what you are talking about!CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now