Official Soldat Forums

Soldat Fans => Fan Apps => Topic started by: zakath on April 19, 2009, 12:47:28 pm

Title: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: jrgp on April 19, 2009, 04:42:08 pm
Cool. Added to the Fan Apps list.
Title: Re: Soldat server manager
Post by: LORD KILLA 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)
Title: Re: Soldat server manager
Post by: zakath 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"
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: rayanaga 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.
Title: Re: Soldat server manager
Post by: Polifen 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?
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: rayanaga 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
Title: Re: Soldat server manager
Post by: zakath 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).
Title: Re: Soldat server manager
Post by: Zabijaka on September 04, 2009, 12:39:27 pm
This app recompile crashed scripts automaticaly?

I can use this on windows?
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: Xxypher on September 04, 2009, 01:01:43 pm
Could you make a Windows version?
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: jrgp 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)
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: zakath on April 28, 2010, 09:14:54 am
Update:
- New way of handleing servers and more dynamic as well as nightly restarts.
Title: Re: Soldat server manager
Post by: DorkeyDear 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).
Title: Re: Soldat server manager
Post by: zakath 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.
Title: Re: Soldat server manager
Post by: Falcon` 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...
Title: Re: Soldat server manager
Post by: Falcon` on October 30, 2011, 05:23:10 am
Two bugs:

Minor one: ssm doesn't recognize -c xx.ini and -p 1234 parameters, therefor when they're used it may try to connect to wrong port. That can be easily fixed by making symbolic links though.
Major one: never mind, i wrote it in above post (the refreshx thingy)
Title: Re: Soldat server manager
Post by: Falcon` on February 02, 2012, 05:12:54 pm
i don't know if you still develop this app but one more bug:
sometimes (very often actually) when i alter config file and ssm reread it, it goes into some fork bomb mode and starts replicating itself, what causes servers to switch on/off in some infinite loop.
Title: Re: Soldat server manager
Post by: machina on February 03, 2012, 05:36:07 am
Eee, screens! :P Could you upload some pictures those show your app?
Title: Re: Soldat server manager
Post by: zakath on February 03, 2012, 06:06:33 am
i don't know if you still develop this app but one more bug:
sometimes (very often actually) when i alter config file and ssm reread it, it goes into some fork bomb mode and starts replicating itself, what causes servers to switch on/off in some infinite loop.
should probably do a redesign/refactoring of the app to handle that as it is now its a bit of a hack.

Eee, screens! :P Could you upload some pictures those show your app?
its not a visual app its more like a background service that manages soldatservers.
Title: Re: Soldat server manager
Post by: Falcon` on February 03, 2012, 07:32:20 am
machina seriously, don't try to be a smartass in every topic you know shit about, It simply doesn't work.

zakath, if you'll ever change something, poke me on IRC, I'm the first to beta test :)
Title: Re: Soldat server manager
Post by: machina on February 03, 2012, 08:05:45 am
its not a visual app its more like a background service that manages soldatservers.
Ah, I got feelng like that... Nevermind.