|
Dedicated Server Discuss technical issues related to hosting your own servers. |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Checking if the server is running?
Hey, is there any way of making sure the server software is running from within my application?
I've tried it the easy way, sending random whisper and custom commands with random parameters, but this doesn't generate events in the JSON log file ( I know, I'm being screwed over by good design ) I don't want to use commands wich would effect the server in any way. The only other things I can think of is reading the text log file (kind of inconveniant, but probably me best option if noone has other ideas) or using flakey PID checking (not cross platform so would take a while, and might be errorous) any other suggestions? Thanks! P.S. any chance of the server software becoming open source at some point? I understand possible security and hacking conserns and such, but It would open up so many opertunities for custom modes and other stuff, having direct access to everything ^.^ Or maybe support for connecting custom software to the master server (not that I think I could write a custom server )? eidt: Also, is there any way to reload the server conifg without restarting? Last edited by LewisH; 02-27-2013 at 06:04 PM. |
#2
|
|||
|
|||
Commands and text from commands.txt don't end up in the JSON?
Looking into some options with a parser. The most basic that comes to mind is when was log.txt last modified. If your application can see edit date on a file, and that file is edited, the server is running. I don't think soft resets are available. So, after telling commands.txt: Code:
27277,console,serverMessage Oh, hai Code:
"{"port":27277,"time":127189699,"arguments":["Oh, hai"],"source":"00000000-0000-0000-0000-000000000000","command":"serverMessage","group":"server","type":"consoleCommandExecute"}" Last edited by Aki1024; 02-27-2013 at 06:15 PM. |
#3
|
|||
|
|||
Quote:
The issue is that when the command has incorrect parameters, nothing apears in the log, and I can't think of any commands I could pass which is correct but would not effect the server. I like the idea about checking the last modified of the log file though, I'll probably use that. Hopefully the boost::filesystem's last_write_time function will work. Thanks Aki oh, and as a side note I'm not actually trying to run a server, i'm writing a lua scripting 'API' of sorts in c++, the main reason for wanting to reload the config is so commands and admins could be added by my parser without having to realod the server, so script development can be as fast as possible. I should be putting it up on the forums in about a month or so, it's all working as it should at the moment, just a few more things to add to make it more user friendly ^.^, I'll probably suggest the config reloading in the suggestions section at one point, allong with some other commands I would love to see, It would be useful Last edited by LewisH; 02-27-2013 at 06:33 PM. Reason: spelling >.< |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Altitude Server as a Service? | XFSBrett | Suggestions | 6 | 08-05-2011 07:25 AM |
Steam not running | notromda | Tech Support | 1 | 11-16-2010 04:08 PM |
Help on some things running a server. | raziel | Dedicated Server | 3 | 07-23-2010 09:29 PM |
Crashes when checking for updates | argonide | Tech Support | 2 | 06-11-2010 04:11 PM |
Game not running. | Lion | Tech Support | 1 | 07-20-2009 02:52 AM |