Jump to content

Native Linux server (with management scripts)


Alloc

Recommended Posts

Ah yes, maybe tar is the culprit. That would make sense. Maybe the user is being created the same as what's in the tar file somehow instead of ignoring the user permissions.

 

Thanks for the other info too. Pretty neat stuff! Can't wait to see what the future holds.

 

Oh I noticed another thing, in the players.xml file in the instance if the nick has a space in it then it gets cut off at the first space. Not sure if that's intended or what but thought I should mention it anyway.

 

Thanks again =)

 

Edit: I noticed it also in the players.log file.

Edited by ryvix (see edit history)
Link to comment
Share on other sites

Hey there,

 

I had an idea. I think the server gets slightly wonky eventually for whatever reason, but it's alpha so I guess that's to be expected. I don't really know what all exactly but just little things feel different after a restart. So is there some way to do an announcement for auto restarts? I was hoping to setup auto restarts every 6 hours or something so that it gives a series of warnings saying it's about to restart. For example:

 

The server is restarting in 5 minutes.

The server is restarting in 1 minute.

The server is restarting in 30 seconds.

The server is restarting in 10 seconds.

The server is restarting in 5 seconds.

3

2

1

The server is restarting now!

 

Then it waits for a small period of time. Then it restarts.

 

When the server is down it could even optionally do a backup before starting up again or restart the system (if there were kernel updates installed or something) or optionally update things automatically in the future or at least check for updates and optionally send an email if there is an update for this script or for 7dtd or whatever else there happens to be to check for updates for. This could help to automate things a little but give us a chance to manually update if we wanted to so things don't break.

 

I saw this but it doesn't seem to work quite right for me: http://7daystodie.com/forums/showthread.php?7246-Simple-Status-Script

 

Anyway, just an idea.

Edited by ryvix (see edit history)
Link to comment
Share on other sites

Just released v.14, added backup options (see the Release Notes).

 

Also fixed the permissions problem when installing/updating. Shame on me, just did not notice this when testing :(

 

 

Oh I noticed another thing, in the players.xml file in the instance if the nick has a space in it then it gets cut off at the first space. Not sure if that's intended or what but thought I should mention it anyway.

Yeah, of course that's intended ;)

No, it's not, never thought about the possibility for a player name to contain spaces. Could you send me a snippet of the output_log.txt containing a "RequestToSpawnPlayer:"-line for such a player?

 

 

So is there some way to do an announcement for auto restarts? I was hoping to setup auto restarts every 6 hours or something so that it gives a series of warnings saying it's about to restart. For example:

...

Then it waits for a small period of time. Then it restarts.

Hm, one could simply do this by an external script using the functions of the management scripts (i.e. the telnet-interface). Of course I could also add this internally but I think that's too user dependent. Added as ticket 15 for now.

 

When the server is down it could even optionally do a backup before starting up again ...

Well, this is the ideal usage example for hooks ;) Just write a hook for serverPostStop which executes 7dtd.sh backup.

 

 

or restart the system (if there were kernel updates installed or something)

That definitely won't go in the normal release as this is way to much depending on what the server is doing. Should never be done automatically IMHO.

 

or optionally update things automatically in the future

Again too dangerous. What if an update breaks compatibility in some aspect? The server might not be able to start again until the admin notices.

 

 

or at least check for updates and optionally send an email if there is an update for this script or for 7dtd or whatever else there happens to be to check for updates for.

For the scripts this could be done. For 7dtd I already thought about it myself but unfortunately SteamCMD doesn't provide a command to only check for updates but only allows to actually run the update :(

Added as ticket 16 though, might find some way.

 

 

I saw this but it doesn't seem to work quite right for me: http://7daystodie.com/forums/showthread.php?7246-Simple-Status-Script

Have never worked with expect myself, but I don't see an obvious reason why it should not work. You could also use the provided function telnetCommand though which basically does the same.

. /usr/local/lib/7dtd/common.sh
checkRootLoadConf
telnetCommand <instancename> <command> [timeout=1s]

Command would be "lp" or "say Checkout http://your.website.goes.here for server info" in the case of the linked thread.

 

 

Regards,

Alloc

Link to comment
Share on other sites

Released v.15, added checking for newer versions of the engine (see the Release Notes).

 

For 7dtd I already thought about it myself but unfortunately SteamCMD doesn't provide a command to only check for updates but only allows to actually run the update :(

Heh, it is possible but you have to find out how to do so first. SteamCMD is not as well documented as I would like it to be ;)

Though I am not really checking for updates but instead I compare the buildid of the installed version with the buildid for the latest public branch.

 

Regards,

Alloc

Link to comment
Share on other sites

Could you send me a snippet of the output_log.txt containing a "RequestToSpawnPlayer:"-line for such a player?

I sent a PM with this info.

 

That definitely won't go in the normal release as this is way to much depending on what the server is doing. Should never be done automatically IMHO.

True, only if the machine is completely dedicated to this game and I know exactly what's going on would I get the machine to restart during a game restart if necessary and plus I can easily write a script to do this.

 

Again too dangerous. What if an update breaks compatibility in some aspect? The server might not be able to start again until the admin notices.

That is definitely a possibility if people were to turn such an option on. Perhaps it could just give notifications that there is an update of some sort. If it could give a notification or an email saying there is an update ready and to click here to apply. I guess to click though you would have to have some sort of web interface control panel thing but that would be another project or layer to this. Doing things manually isn't so bad yet I suppose.

 

Have never worked with expect myself, but I don't see an obvious reason why it should not work. You could also use the provided function telnetCommand though which basically does the same.

. /usr/local/lib/7dtd/common.sh
checkRootLoadConf
telnetCommand <instancename> <command> [timeout=1s]

Command would be "lp" or "say Checkout http://your.website.goes.here for server info" in the case of the linked thread.

Oh nice! That should be perfect. Thanks!

Link to comment
Share on other sites

Release v.16, fixed the playernames with blanks issue.

 

Perhaps it could just give notifications that there is an update of some sort. If it could give a notification or an email saying there is an update ready

That would be easy to add and I think it would basically be a good thing. Drawback: I have to rely on yet another tool like sendemail in order to do so :(

Link to comment
Share on other sites

Could those of you who already run the Linux engine report in on how it performs? And if you ran it through Wine on the same environment with the same usage (players) before a "comparison" of how both perfom would be especially nice.

"Performs" as in: CPU usage, memory usage, "felt" performance on client side (lagging zombies etc).

Also please give a few facts about the player count and HW (CPU, RAM).

 

Would really appreciate it and probably there are others who would too ;)

 

Regards,

Chris

Link to comment
Share on other sites

Could those of you who already run the Linux engine report in on how it performs? And if you ran it through Wine on the same environment with the same usage (players) before a "comparison" of how both perfom would be especially nice.

"Performs" as in: CPU usage, memory usage, "felt" performance on client side (lagging zombies etc).

Also please give a few facts about the player count and HW (CPU, RAM).

 

Would really appreciate it and probably there are others who would too ;)

 

Regards,

Chris

 

Might be good to list how many CPU Cores you have dedicated to that Virtualization if possible, I'm trying to figure out the full specs for a 20 slot server running that headless linux server. I don't think our current 2 Cores, is going to do it most likely need to add more to the VPS. Anyone know minimum specs for a 20 slot?

Link to comment
Share on other sites

4 cores with 2.67GHz and 4 GB RAM running under wine 32 can take up to 6 players without any lags (cpu load about 2).

More people haven't joined the server yet or leave it instantly (it is a realistic one).

 

If you are running with wine-64 you need less CPU and less RAM.

Link to comment
Share on other sites

4 cores with 2.67GHz and 4 GB RAM running under wine 32 can take up to 6 players without any lags (cpu load about 2).

More people haven't joined the server yet or leave it instantly (it is a realistic one).

 

If you are running with wine-64 you need less CPU and less RAM.

Thanks =)

But you haven't tried the native engine to compare with?

Link to comment
Share on other sites

Could those of you who already run the Linux engine report in on how it performs? And if you ran it through Wine on the same environment with the same usage (players) before a "comparison" of how both perfom would be especially nice.

"Performs" as in: CPU usage, memory usage, "felt" performance on client side (lagging zombies etc).

Also please give a few facts about the player count and HW (CPU, RAM).

 

Would really appreciate it and probably there are others who would too ;)

No one else? Thought there were more people running their servers on Linux ... ;)

Link to comment
Share on other sites

No one else? Thought there were more people running their servers on Linux ... ;)

 

I would think there is room for improvement in the future since this is just alpha. I have never used it on wine, at least I don't think, just what this script does now.

 

All I can compare it to is a Minecraft server and it's probably at least 5-10 times more CPU intensive than Minecraft at this point.

 

Not sure about the RAM usage but I have 32 gigs of RAM and it only takes up about 1.3 gigs so I'm not really worried about that.

 

I set max players to 10. I've had about 5 on at a time at the very most and haven't noticed any lag or anything but it was using a lot of CPU. Though I'm not sure if I would really be able to tell the difference between lag and a buggy game at this point.

 

The server is running Ubuntu 14.04 and has 32 gigs of RAM, SSD drives and Intel Xeon E3 1245v2 4 core/8 thread processor.

Link to comment
Share on other sites

Thanks ryvix, sounds quite ok.

 

@All:

Just noticed that the update detection does indeed NOT work. Looks like SteamCMD has some private cache of the AppDB so the shown buildid will always be the one when you last downloaded/updated 7dtd :(

Have not found a way to get the current remote buildid yet (and can't even go on testing that now as I updated for testing purposes and now I obviously got the current buildid again ... ;) ).

Will do more tests on the next release.

 

For those who are already running the latest scripts and want to update 7dtd: Use the --force parameter to update even though the script says there's no update ;)

 

 

Regards,

Chris

Link to comment
Share on other sites

Fixed a bug in updatescripts: It did delete the compiled start-stop-daemon but not recompile it. So after updating to v18 you will have to recompile it once manually:

cd /usr/local/lib/7dtd/start-stop-daemon
make
make install

If you don't have make installed:

cd /usr/local/lib/7dtd/start-stop-daemon
gcc -Wall -Wextra -Wno-return-type -o start-stop-daemon start-stop-daemon.c
chown root.root start-stop-daemon
chmod 0755 start-stop-daemon

 

Afterwards that should no longer be necessary when updating the scripts. Sorry about that :(

 

Regards,

Chris

Link to comment
Share on other sites

@All:

Just noticed that the update detection does indeed NOT work. Looks like SteamCMD has some private cache of the AppDB so the shown buildid will always be the one when you last downloaded/updated 7dtd :(

Ok, v.19 fixes the buildid checking in the updateengine command. I do not rely on SteamCMD for that anymore, seems to be to unstable. Using SteamDB.info now ;)

 

Regards,

Chris

Link to comment
Share on other sites

hey, i have a problem with updating 7dtd to 8.6.

 

i run the updatescript for the engine and the steamcmd part is working fine, it downloads 7dtd and says fully installed.

 

Still, the server wont let me log in, saying version mismatch (me 8.6 , server 8.5)

 

Would appreciate any help, thx

Link to comment
Share on other sites

Nice scripts.

 

But cron backup doesn't work properly.

my SDTD_BACKUP_MAX_BACKUPS is set to 10 but I have a LOT more in the backup folder.

 

adding this at the begining of the sdtdCommandBackup function make it work again for me :

cd $SDTD_BACKUP_ROOT

 

Does your server run well on linux with 6 or more players ?

I have lag and random crash @ 6 or more :/

I've seen server running very well with 20 players...

 

i'm running debian 7.5 64bit on [email protected] + 16G RAM

Link to comment
Share on other sites

But cron backup doesn't work properly.

my SDTD_BACKUP_MAX_BACKUPS is set to 10 but I have a LOT more in the backup folder.

 

adding this at the begining of the sdtdCommandBackup function make it work again for me :

Thanks for the report, wonder why I did not notice this when testing ;)

 

v.20 has this fix.

 

Does your server run well on linux with 6 or more players ?

I have lag and random crash @ 6 or more :/

I've seen server running very well with 20 players...

 

i'm running debian 7.5 64bit on [email protected] + 16G RAM

Unfortunately I can not give much input on performance. The server I am running (just for me and my friends) had at most 3 players on it and that was even a few months ago. Since the switch to the Linux engine we didn't find the time to play at all so not even 2 players tested ;)

 

AFAIR some people reported it works well and others that it does not. Sorry that I can not give you more details (would like to know myself ;) ).

 

Regards,

Chris

Link to comment
Share on other sites

No idea why that should come up. The first line in startup is ok, but the parsing errors are not.

 

@Ribesg: Did you do anything manually within the /home/sdtd folder or did you only use bootstrapper and the management scripts?

 

@Elendar: Which version of Debian are you running?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...