Jump to content

Check if gameserver is not running/not responding.


Recommended Posts

Hello,

I've made a script in autoit to restart my gameservers if they shutdown, or when dw20.exe appears, but unfortunately that doesn't cover all crashes.

It's about a modern warfare 2 dedicated server, which looks like this: Posted Image

The gameserver is down when:

  • program is closed
  • When dw20.exe appears
  • sv_running returns "sv_running" is: "0" default: "0" in the console
  • or when it's stuck for over 30 seconds

Now, the first 2 things are covered with my current script, but the other 2 aren't.

Is it possible to make a script which covers those?

sv_running can be checked if sv_running is typed into the server console, and it will directly return 0 or 1 (as stated above), but I don't know how to that, and if that's even possible.

The 4th error shouldn't be such a problem, but the problem is that I don't really understand the current scripts which cover that.

I would really appreciate it if someone could help me out (I'm a kind of "noob" in autoIT)

Link to comment
Share on other sites

The way I see it, you are trying to automate restarting your server in case of crash. Seems legit to me, but I could be wrong as well.

*edit*

Can autoIt's Window info tool read the server console? if you you can use a regex to get the text for #3

for #4 There have been posts in the forums about detecting when a exe has stopped responding, finding those posts may help with that :)

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

only adding additional info

info on page with (ctrl+F) "By May 2010"

http://en.wikipedia.org/wiki/Controversies_surrounding_Call_of_Duty:_Modern_Warfare_2#PC_version

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

The way I see it, you are trying to automate restarting your server in case of crash. Seems legit to me, but I could be wrong as well.

*edit*

Can autoIt's Window info tool read the server console? if you you can use a regex to get the text for #3

Yes it can. Posted Image

Though, I don't really know what to do with it.

for #4 There have been posts in the forums about detecting when a exe has stopped responding, finding those posts may help with that :)

Ok, I will take another look at it later on.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...