Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Support > Dedicated Server
FAQ Community Calendar

Dedicated Server Discuss technical issues related to hosting your own servers.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2013, 04:02 PM
LewisH LewisH is offline
Senior Member
 
Join Date: Mar 2012
Location: Earth
Posts: 215
Default 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.
Reply With Quote
  #2  
Old 02-27-2013, 06:09 PM
Aki1024 Aki1024 is offline
Senior Member
 
Join Date: Jul 2011
Location: Across from you at a chess table. Your play is?
Posts: 1,080
Default

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
I saw in log.txt:
Code:
"{"port":27277,"time":127189699,"arguments":["Oh, hai"],"source":"00000000-0000-0000-0000-000000000000","command":"serverMessage","group":"server","type":"consoleCommandExecute"}"
This opens up the option for the parser to watch for consoleCommandExecute anything to update the app or a database with last command ran time, which means the server is alive. Question at that point being, does your server have a parser on it?

Last edited by Aki1024; 02-27-2013 at 06:15 PM.
Reply With Quote
  #3  
Old 02-27-2013, 06:31 PM
LewisH LewisH is offline
Senior Member
 
Join Date: Mar 2012
Location: Earth
Posts: 215
Default

Quote:
Originally Posted by Aki1024 View Post
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
I saw in log.txt:
Code:
"{"port":27277,"time":127189699,"arguments":["Oh, hai"],"source":"00000000-0000-0000-0000-000000000000","command":"serverMessage","group":"server","type":"consoleCommandExecute"}"
This opens up the option for the parser to watch for consoleCommandExecute anything to update the app or a database with last command ran time, which means the server is alive. Question at that point being, does your server have a parser on it?
Yes, my server does have a parser, I probably should have mentioned that before.

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 >.<
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC