Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Technical Support » Win32 FDS » Priority
Priority [message #208485] Mon, 17 July 2006 00:34 Go to next message
Goztow is currently offline  Goztow
Messages: 9738
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
I'm very annoyed that I need to manually set the priority for my clan's servers each time it restarts. While it's only 10 seconds of work, it requires me to be online a lot if I want the priority to stay correctly at real time.

Is there a solution to get this automated? Did I read something about a BHS FDS release that did this? I didn't find it on their (unupdated) website.

Please help Smile.


You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
Re: Priority [message #208496 is a reply to message #208485] Mon, 17 July 2006 03:26 Go to previous messageGo to next message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma: 0
General (1 Star)
Moderator/Captain

--> Renegadeserver.exe -h Wink

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."
Priority of RenegadeServer.exe on start up [message #208498 is a reply to message #208485] Mon, 17 July 2006 03:46 Go to previous messageGo to next message
rafkid is currently offline  rafkid
Messages: 14
Registered: June 2005
Karma: 0
Recruit
Thanks for the reply - I am working with Goz on this. This helped. Unfortunately it wont allow a priority above 3 which is "normal" - it implies it would - you get the option after renegadeserver.exe -h to put in the value "5" which is what we want, but it then errors with "invalid priority" - any suggestions would be warmly appreciated.
Re: Priority [message #208499 is a reply to message #208485] Mon, 17 July 2006 04:11 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9738
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
This also won't help when the server crashes and reboots itself or if we do !restart from irc.

You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord

[Updated on: Mon, 17 July 2006 04:11]

Report message to a moderator

Re: Priority [message #208507 is a reply to message #208485] Mon, 17 July 2006 06:04 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Well, when you are starting it from the startmenu use a batch file to load it with the Real Time priority if you want.

From the command line;

start/realtime C:\Westwood\RenegadeFDS\Server\RenegadeServer.exe

will run it in realtime priority Thumbs Up


http://steamsignature.com/card/1/76561197975867233.png
Re: Priority [message #221894 is a reply to message #208507] Sun, 24 September 2006 12:57 Go to previous messageGo to next message
rafkid is currently offline  rafkid
Messages: 14
Registered: June 2005
Karma: 0
Recruit
Dan u slapper - I did not expect you to be replying here? It's good you did though - thanks I appreciate it. This does not work BTW, the server fires up alright as you would expect but it's priority is still set to normal and not real time. Has anyone any ideas about this? I used to know this stuff twelve years ago, when I was used to firing stuff up via a DOS config file whose name escapes me for the moment - did it begin with a B?.

We are using Win2K Pro as the server OS - because it was available and legal is why.

Chin, chin all.
Re: Priority [message #221914 is a reply to message #208507] Sun, 24 September 2006 13:55 Go to previous messageGo to next message
Nightma12 is currently offline  Nightma12
Messages: 2593
Registered: August 2003
Karma: 0
General (2 Stars)
Category Moderator
danpaul88 wrote on Mon, 17 July 2006 08:04

Well, when you are starting it from the startmenu use a batch file to load it with the Real Time priority if you want.

From the command line;

start/realtime C:\Westwood\RenegadeFDS\Server\RenegadeServer.exe

will run it in realtime priority Thumbs Up


that loads RenegadeServer.exe in real time, but no server.dat Razz
Re: Priority [message #221917 is a reply to message #221914] Sun, 24 September 2006 14:05 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Nightma12 wrote on Sun, 24 September 2006 21:55

danpaul88 wrote on Mon, 17 July 2006 08:04

Well, when you are starting it from the startmenu use a batch file to load it with the Real Time priority if you want.

From the command line;

start/realtime C:\Westwood\RenegadeFDS\Server\RenegadeServer.exe

will run it in realtime priority Thumbs Up


that loads RenegadeServer.exe in real time, but no server.dat Razz



good point ^^ I always thought windows was clever enough to launch child processes with the same priority as their parent processes unless otherwise specified... stupid assumption I know Razz



going back to the problem in hand, you could create a batch file using this tool -> http://www.beyondlogic.org/solutions/processutil/processutil .htm - to set the priority 2 seconds after the server is loaded, but it still won't be able to handle when the server reboots itself.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sun, 24 September 2006 14:17]

Report message to a moderator

Re: Priority [message #221922 is a reply to message #208485] Sun, 24 September 2006 14:27 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

Then make a batch file just starting server.dat and looping?

BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Priority [message #221927 is a reply to message #208485] Sun, 24 September 2006 15:17 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I don't think you can start server.dat directly can you?

http://steamsignature.com/card/1/76561197975867233.png
Re: Priority [message #221928 is a reply to message #208485] Sun, 24 September 2006 15:18 Go to previous messageGo to next message
Nightma12 is currently offline  Nightma12
Messages: 2593
Registered: August 2003
Karma: 0
General (2 Stars)
Category Moderator
rename it to server.exe, i think that works?
Re: Priority [message #221929 is a reply to message #208485] Sun, 24 September 2006 15:20 Go to previous messageGo to next message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma: 0
General (1 Star)
Moderator/Captain

damn, that was a secret Razz

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."

[Updated on: Sun, 24 September 2006 15:26]

Report message to a moderator

Re: Priority [message #222012 is a reply to message #208485] Mon, 25 September 2006 00:04 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

or just use
start server.dat
Works fine Smile


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Priority [message #222209 is a reply to message #208485] Mon, 25 September 2006 15:44 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
lol, dat files are so fake. also this is the first question iv seen Goztow make, i have been waiting for this day lol.

im sure you could edit scripts.dll so it does it automaticly.
Re: Priority [message #222382 is a reply to message #222209] Tue, 26 September 2006 00:30 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9738
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
help-linux wrote on Tue, 26 September 2006 00:44

lol, dat files are so fake. also this is the first question iv seen Goztow make, i have been waiting for this day lol.

im sure you could edit scripts.dll so it does it automaticly.

The question is old and tbh: noone gave me a satisfying answer. It's a first step to have a batch file but when I start it, I can do it manually as well. It's in case of a !restart that the priority should be set automatically.

I wonder if it's possible in scripts.dll ... Anyone can tell me?


You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
Re: Priority [message #222403 is a reply to message #208485] Tue, 26 September 2006 04:50 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
im not too sure about this because i have only looked for a bout 2 minits in google but this is what i found.

BOOL SetPriorityClass(HANDLE hApp, DWORD priority);



REALTIME_PRIORITY_CLASS 
HIGH_PRIORITY_CLASS 
ABOVE_NORMAL_PRIORITY_CLASS
NORMAL_PRIORITY_CLASS 
BELOW_NORMAL_PRIORITY_CLASS


these are the definitions for "DWORD priority"

hope this helps Wink
Re: Priority [message #222720 is a reply to message #208485] Wed, 27 September 2006 06:33 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

That would mean you need something like
SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS));
to set the current process priority, excecuted somewhere when the dll loads (so in the dllmain).


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Priority [message #222722 is a reply to message #222720] Wed, 27 September 2006 06:46 Go to previous messageGo to next message
EvilWhiteDragon is currently offline  EvilWhiteDragon
Messages: 3751
Registered: October 2005
Location: The Netherlands
Karma: 0
General (3 Stars)

After some fooling around I got this file and I think it works Razz
  • Attachment: server.bat
    (Size: 0.10KB, Downloaded 90 times)


http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/

V, V for Vendetta

People should not be afraid of their governments.
Governments should be afraid of their people.
Re: Priority [message #222753 is a reply to message #222722] Wed, 27 September 2006 09:05 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
EvilWhiteDragon wrote on Wed, 27 September 2006 14:46

After some fooling around I got this file and I think it works Razz



If your using this you probably have to turn auto-restart off it could end up with 2 or more copies of the server fds running...


http://steamsignature.com/card/1/76561197975867233.png
Re: Priority [message #222793 is a reply to message #222753] Wed, 27 September 2006 11:05 Go to previous messageGo to next message
EvilWhiteDragon is currently offline  EvilWhiteDragon
Messages: 3751
Registered: October 2005
Location: The Netherlands
Karma: 0
General (3 Stars)

Not really, although I forgot to mention that you should only start this file, not the renegadeserver.exe file, as that isnt necetary. Only for auto updates, but I dont really explect that to happen anytime soon Wink

http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/

V, V for Vendetta

People should not be afraid of their governments.
Governments should be afraid of their people.
Re: Priority [message #223029 is a reply to message #208485] Thu, 28 September 2006 00:18 Go to previous message
Goztow is currently offline  Goztow
Messages: 9738
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
Works like a charm, problem solved. Thanks!

You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
Previous Topic: NightRegulator
Next Topic: Team Remix
Goto Forum:
  


Current Time: Fri Nov 29 06:01:41 MST 2024

Total time taken to generate the page: 0.01282 seconds