![]() |
|
|
#56 | ||
|
May 2003
Republic of Moldova
1010002 Posts |
Quote:
Quote:
It would be the best to have access to Prime95's internal priority setting option (from the command line), but there is no such a feature implemented (yet, I hope). We could modify the prime.ini file directly, changing the value of the "Priority" parameter, but this would require restarting the client. You can stop the client running under Win2000/XP as a service using the "net stop" command, and you can stop the client running under Win98/ME by sending the WM_CLOSE message to Prime95's window, if it's not hidden, but how to close it gently if it has the "No Icon" option enabled (so it hasn't a window)? I've played with that before, and did not find a way to make (from the command line) the hidden client save its state and exit. Here is again the lack of command-line features that a program like Prime95 should have... Also, the screensaver could kick in many times per day, so the client would be restarted frequently - at the moment when the monitor enters the stand-by mode and at its awakening (maybe it's not a problem for someone, but for me...).
|
||
|
|
|
|
|
#57 |
|
Sep 2003
Borg HQ, Delta Quadrant
2×33×13 Posts |
Okay, new problem: we can't adjust Prime95's thread or process priorities. Believe me, I've spent the better part of two hours trying to make it work. Which just brings us back to where we were before: set the priority of the screensaver so low that Prime95's priority is higher than it. I have an idea that might work, I'll post again in a little while.
|
|
|
|
|
|
#58 |
|
Sep 2003
Borg HQ, Delta Quadrant
70210 Posts |
Okay, here's the scoop: I can tinker with the priority of the thread and process for the screensaver. I can set it to the lowest process priority possible (IDLE_PRIORITY_CLASS) and the lowest thread priority (THREAD_PRIORITY_IDLE). Unfortunately, at Priority 1, Prime95 uses the same settings, therefore half of the cycles go to the screensaver and half go to Prime95. Thus to get the most cycles possible, Prime95 must use priority 2 or above.
Have just discovered a slight side-effect, will look into it further... |
|
|
|
|
|
#59 |
|
Sep 2002
23×37 Posts |
what if you had two instances of prime95
you had one set to pority 1 after x amount of idle time it would end that and then start one that was set to poroty Y ( whatever you set it too ( 1-10) then wen it detects it comes out of idle it kills prime95(2) and starts the other lowpority 1 im not sure how you would do it with the prime.ini but you could make two dir's and modify the working dir to match so that the back up files match ( im just kinda of thinking out loud here ) let me know what you think |
|
|
|
|
|
#60 |
|
Aug 2003
Upstate NY, USA
2×163 Posts |
I personally just disable all my screen-savers and such things so I don't have to worry about changing prime95's priority beyond 2 which I did because I also have UD-Agent (cancer research stuff) running and setting prime95 priority to 2 gives it 95~99% cpu when idle
|
|
|
|
|
|
#61 | ||
|
Sep 2003
Borg HQ, Delta Quadrant
2BE16 Posts |
Quote:
Quote:
|
||
|
|
|
|
|
#62 |
|
May 2003
Republic of Moldova
23×5 Posts |
I have finally managed to set Prime95's priority programatically using the method provided by itself - through its menu. I just emulated the walking-through-menus-and-windows procedure, that the user would perform manually, using the mouse or the keyboard (Go to menu > "Advanced" > "Priority..." > Change priority > Click OK).
I've attached the program that sets the priority. If you run it without parameters, it will set the priority of Prime95 to 4, but if you provide a value in the command line (between 1 and 10, as stated in the Prime95's dialog window, used to set the priority), it will set the priority to that value. E.g.: SetPrime95Priority 7 (you may rename the file, if you think its name is too long) The program works as follows: it searches for a window, the title of which contains the string "Prime95", then goes through its menu, activates the "Priority..." option, then changes the text of the corresponding editbox to the value, specified in the command line (or to 4, if there is not one), and "clicks" the OK button. Therefore, it works as if you change the priority manually, using the mouse. That means that Prime95 will continue running, and will just restart the test using the new priority (you can try it manually and see how it goes). While restarting, it will save the current progress (that means writing to disk), but you can't avoid it using this method (hoping that the screensaver won't start/stop too frequently). Notes: 1. This program will work properly even if Prime95's window is hidden (the NoIcon option is selected). 2. It will work only with GUI version of Prime95 - it won't work with NTPrime (the console version, designed to run as an NT service), because it does not have a menu; for those who use NTPrime the single solution (besides setting the thread's priority, which is harder to implement) is editing directly the prime.ini file and restarting the NTPrime service. 3. If Prime95 is not running, the program will wait one minute for the Prime95's window, then stop. 4. The program does not verify the value, provided as a command line parameter (it just passes the value to Prime95), so if you type a value, different not in the 1-10 range, Prime95 will show an error. Thanks to the author of Sign Of Misery, the program which I used to make SetPrime95Priority. It's a powerful script editor and compiler, that has a set of commands, used for window managing, keyboard and mouse emulating, patching files, working with registry and many more. It's very simple to combine these commands into scripts, and you don't have to know WinAPI or any programming language to use it. This is not advertising (the program is freeware), I'm just enchanted by the functionality of this useful program (if you are interested, I could write more about it). |
|
|
|
|
|
#63 | |
|
Sep 2003
Borg HQ, Delta Quadrant
2·33·13 Posts |
Quote:
Now, a more important question: will this 'wake up' the computer if running screensaver or in monitor sleep? |
|
|
|
|
|
|
#64 |
|
May 2003
Republic of Moldova
23·5 Posts |
Firstly answering PrimeCruncher's question: since the SetPrime95Priority does not emulate the keypresses, it doesn't make the screensaver stop or monitor wake up, so it's ok. It just executes (internally) the menu commands, changes the editbox's text and sends to "OK" button a "click" message.
Now about Sign Of Misery. It was written by a Russian programmer, who names himself CyberManiac. He has a web-page (http://inqsoft.tsx.org), Russian only. But there is also a "partner" web-page, in English: http://www.geocities.com/xmemor/2lz/s0m.html. Currently there are available version 2.65 (with the update to 2.68) and the pre-release of version 2.7 (with the update to pre-release 2). You may choose the 2.65 (2.68) version as a stable-proved one, or go with the pre-release of 2.7 version, which has many improvements and fixes, but is still a beta. To install the update, simply unzip it into the folder where you installed S0M, replacing the old files. The program has both Russian and English interfaces, so you can use it if you don't understand Russian, but unfortunately it doesn't have English help yet (Russian only). The help describes the commands S0M has, and is very useful if you don't understand how a certain command works, but that is - no English help available at the moment. However, most of the commands are quite intuitive, so it's not difficult to use them. Below I attach the SetPrime95Priority script, which you can edit and compile using S0M. Edit: Attachment removed due to possible virus. |
|
|
|
|
|
#65 |
|
Mar 2003
24 Posts |
Looks like you are nearing a resolution.
One way I was thinking about would be to write a custom screensaver. Its purpose would be to start the user-defined screensaver and when the monitor goes into powersave kill the screensaver. If you want to go this route the source from distributed.net's screensaver multiplexor (http://http.distributed.net/pub/dcti...0030303.tar.gz 1.6MB, file pub-20030303/plat/win/w32ss.cpp) might be valuable. Unfortunately I won't be able to test this out myself anytime soon. Some random links I found: HOWTO: Force a Screen Saver to Close Once Started in Windows NT/2000/2003 http://support.microsoft.com/default...b;EN-US;140723 HOWTO: Determine Whether a Screen Saver Is Running on Windows NT http://support.microsoft.com/default...b;EN-US;150785 HOWTO: Know When Your Screen Saver Starts http://support.microsoft.com/default...b;en-us;238882 DefScreenSaverProc Function http://msdn.microsoft.com/library/de...nsaverproc.asp (if making a screen saver) Last fiddled with by lunna on 2004-05-16 at 19:02 |
|
|
|
|
|
#66 | ||
|
Sep 2003
Borg HQ, Delta Quadrant
2·33·13 Posts |
Quote:
Quote:
|
||
|
|
|