Author Topic: Soldat server manager  (Read 13575 times)

0 Members and 1 Guest are viewing this topic.

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Soldat server manager
« on: April 19, 2009, 12:47:28 pm »
been using this for my own soldat servers for quite awhile thought it might be useful for other ppl as well so here it is. basically its a monitor for linux that checks for corrupted/dead servers and restarts them.

*edit*

Rewrote the code to not using popen as it relies on hgetcontents which is somewhat buggy. now it monitors the servers though the admin socket instead. and forks the servers properly into the background. old system can be used by enableing it in the config though if needed.

*edit*

Rewrote code again so now it reads config every 10 seconds and swaps in/out servers as well as restarts the servers every night.
« Last Edit: April 30, 2010, 05:05:43 am by zakath »

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5036
Re: Soldat server manager
« Reply #1 on: April 19, 2009, 04:42:08 pm »
Cool. Added to the Fan Apps list.
There are other worlds than these

Offline LORD KILLA

  • Camper
  • ***
  • Posts: 254
  • Happie
Re: Soldat server manager
« Reply #2 on: April 22, 2009, 12:00:43 pm »
Sorry, but could you compile this for me?
and i dont really understand your readme   =|
(send me PM, i may dont look in here again)

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #3 on: April 23, 2009, 08:51:10 am »
Sorry, but could you compile this for me?
and i dont really understand your readme   =|
(send me PM, i may dont look in here again)

Its quite easy to compile it yourself just type "make"

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #4 on: July 29, 2009, 11:46:50 am »
rewrote the code to use sockets instead of popen and reading the pid from /proc/ instead of using "ps" with popen
if you are using It I recommend updateing it. as well as checking out the new config.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Soldat server manager
« Reply #5 on: August 02, 2009, 03:18:25 pm »
I"ll have to try this little script out. :P
So far, it works really nicely with pretty low overhead.
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: Soldat server manager
« Reply #6 on: August 03, 2009, 04:48:24 am »
Works good when i run it like ./ssm, but i can't use screen on it ( it's terminating ). Could you add -d parameter like in soldatserver?

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #7 on: August 03, 2009, 05:06:47 am »
Works good when i run it like ./ssm, but i can't use screen on it ( it's terminating ). Could you add -d parameter like in soldatserver?

it forks itself into the background automatically I included a small bash script to add to crontab for autostarting of the script.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Soldat server manager
« Reply #8 on: August 03, 2009, 07:10:26 pm »
It actually ran quite well for me and I didn't have to cron the autostarter at all. :D
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #9 on: August 04, 2009, 06:21:12 am »
It actually ran quite well for me and I didn't have to cron the autostarter at all. :D

well afaik it shouldn't crash or anything. I just included the cron script because thats how I run my own servers in a normal user account(so I don't have access to the usual startup scripts).

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Soldat server manager
« Reply #10 on: September 04, 2009, 12:39:27 pm »
This app recompile crashed scripts automaticaly?

I can use this on windows?

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #11 on: September 04, 2009, 12:56:17 pm »
This app recompile crashed scripts automaticaly?

I can use this on windows?
It doesn't recompile but restarts the server after a defined number of violations, or a crash of the server.

Sfraid it doesn't work on windows.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline Xxypher

  • Veteran
  • *****
  • Posts: 1319
  • Soldat Veteran.
Re: Soldat server manager
« Reply #12 on: September 04, 2009, 01:01:43 pm »
Could you make a Windows version?

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #13 on: September 04, 2009, 01:48:23 pm »
Could you make a Windows version?

well I guess I can but I have long todo list so it will probably take quite a while.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5036
Re: Soldat server manager
« Reply #14 on: September 04, 2009, 03:32:15 pm »
Xxypher, Zabijaka: This app was written specifically for Linux, and since Windows and Linux do things entirely differently, porting it to Windows would likely require a complete rewrite.

(just thought I'd clarify)
There are other worlds than these

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #15 on: September 04, 2009, 04:00:20 pm »
Xxypher, Zabijaka: This app was written specifically for Linux, and since Windows and Linux do things entirely differently, porting it to Windows would likely require a complete rewrite.

(just thought I'd clarify)

well I have a app at work that does something similar so I dont have to start from scratch I basically just needs to port the socket stuff which shouldn't be that hard considering sockets are basically the same in windows. but still its way down the line as I dont have a windows server myself. And have many other projects in the making.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #16 on: April 28, 2010, 09:14:54 am »
Update:
- New way of handleing servers and more dynamic as well as nightly restarts.

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Soldat server manager
« Reply #17 on: April 28, 2010, 12:25:52 pm »
happy 1-year anniversary btw (for this project :P). and gj.
If you plan on updating it to be cool, I would wonder if its possible to have it: only restart the server a moment after the last player leaves after 20 hours from the last shutdown (for more popular servers, if there are people even on the server often at night) and mayb after 36 hours, the first moment it becomes 1:00 in the morning (or midnight or whatever time), restart even if ppl in server or something. That would be realllllyyyy coool :P
I'm just thinking out loud, I don't actually expect this (tbh, I probably won't use it, but i would if I hosted many servers, sounds nice :D).

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: Soldat server manager
« Reply #18 on: April 28, 2010, 01:05:03 pm »
happy 1-year anniversary btw (for this project :P). and gj.
If you plan on updating it to be cool, I would wonder if its possible to have it: only restart the server a moment after the last player leaves after 20 hours from the last shutdown (for more popular servers, if there are people even on the server often at night) and mayb after 36 hours, the first moment it becomes 1:00 in the morning (or midnight or whatever time), restart even if ppl in server or something. That would be realllllyyyy coool :P
I'm just thinking out loud, I don't actually expect this (tbh, I probably won't use it, but i would if I hosted many servers, sounds nice :D).

actually it does this already in a way it tries to restart it whenever empty from 04:00

From: April 30, 2010, 05:06:27 am
Fixed the attachment as it seemed to be missing.
« Last Edit: April 30, 2010, 05:06:27 am by zakath »

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Soldat server manager
« Reply #19 on: January 19, 2011, 11:29:37 am »
*BUMP*

First of all, thanks for the newest sources, they seems to be much more stable than current ones. Tho it would be nicer if you make only lastest acces violations into account, not all of them.
Also, it could sometimes check if REFRESH(X) packages still works, as servers sometimes have mood to freeze, but they still run and all admin connections are still working. just freezed.


Oh, one more thing: as you mentioned, it restarts servers around 4:00am. Please make it store somewhere information about if it already restarted or not as if it go into crash spree mode, it restarts the servers in some freaking loop. Unless it'll stay as stable as it is now...
« Last Edit: January 19, 2011, 11:31:33 am by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.