Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2012, 01:38 AM
Sinclipse
Hill Giant
 
Join Date: May 2012
Posts: 122
Default Quest to auto-restart server?

I've seen it on a few server, and me and my coder can't figure it out, anyone up for helping?

I want it set up to every 23 hours and 50 minutes a NPC will shout across zones that the server is coming down in 10 minutes. Then at 23 hours and 55 minutes that it'll be coming down in 5 minutes. Then start a countdown from 5 minutes to server shut down, then have the server brought up on it's own...
Reply With Quote
  #2  
Old 06-03-2012, 10:36 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

Sorry I can't help you with the quest, but why do you need a 24hour restart cycle? That's crazy lol.
Reply With Quote
  #3  
Old 06-03-2012, 01:37 PM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default

So that he won't have to do random daily restarts for stuff unless it's very important, and that way it establishes a stable restart time where everyone knows when it will restart. Also keeps any changes very current.
__________________
Reply With Quote
  #4  
Old 06-03-2012, 02:25 PM
Sinclipse
Hill Giant
 
Join Date: May 2012
Posts: 122
Default

^ This guy gets it.
Reply With Quote
  #5  
Old 06-04-2012, 01:21 PM
iluvseq
Sarnak
 
Join Date: Aug 2009
Location: Somewhere
Posts: 53
Default

I suspect this sort of functionality is handled via an external script that runs at the proper time and connects to the telnet console to send the periodic broadcasts, issues a worldshutdown command, and then makes sure all processes are cleaned up before restarting the server.
Reply With Quote
  #6  
Old 06-04-2012, 06:54 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

Quote:
Originally Posted by Durge View Post
So that he won't have to do random daily restarts for stuff unless it's very important, and that way it establishes a stable restart time where everyone knows when it will restart. Also keeps any changes very current.
As a developer, I disagree. A 'stable' restart time is when needed. Generally once a week or so. If your server 'needs' restarts every day you have some underlying issues.
Reply With Quote
  #7  
Old 06-05-2012, 12:40 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Quote:
Originally Posted by chrsschb View Post
As a developer, I disagree. A 'stable' restart time is when needed. Generally once a week or so. If your server 'needs' restarts every day you have some underlying issues.
Not if you are tweaking things daily. Certain database changes do NOT go live without a reboot. Loot changes are a notable one.
Also if you choose to keep your server current to the SVN, it could easily get rebuilt daily at times when people are actively doing things to the server code like the last two days. Cavedude added a nice new feature for awarding LDoN win/losses to the Perl exports two days ago and then today Akkadius pushed a change for a global player.pl. Why should I have to wait a week to implement something? Setting up a scheduled daily reboot is simply respectful to your player base.
Reply With Quote
  #8  
Old 06-05-2012, 08:09 AM
iluvseq
Sarnak
 
Join Date: Aug 2009
Location: Somewhere
Posts: 53
Default

It depends on the stage of development your server is currently at.

If your world building is complete and you are in maintenance mode where you are just making changes to fix bugs and tweak things, there's no reason to reboot daily.

If you are running an 'open beta' where your world is still constantly evolving, with new content (items, factions, etc) being added as you expand the world, then a daily reboot cycle makes sense.

Keeping up with SVN is not a good reason, however. By the very nature of eqemu, it is almost certain that your server is unique. You should test any new features/changes that get pushed to SVN on a non-production server for several days and then push to live after you are certain that they work as expected in your environment. Also, with a production server, you should only consider upgrading to a new code base if there is a bug fix or feature you actually need for your world.
Reply With Quote
  #9  
Old 06-05-2012, 07:02 PM
Sinclipse
Hill Giant
 
Join Date: May 2012
Posts: 122
Default

Quote:
Originally Posted by iluvseq View Post
It depends on the stage of development your server is currently at.

If your world building is complete and you are in maintenance mode where you are just making changes to fix bugs and tweak things, there's no reason to reboot daily.

If you are running an 'open beta' where your world is still constantly evolving, with new content (items, factions, etc) being added as you expand the world, then a daily reboot cycle makes sense.

Keeping up with SVN is not a good reason, however. By the very nature of eqemu, it is almost certain that your server is unique. You should test any new features/changes that get pushed to SVN on a non-production server for several days and then push to live after you are certain that they work as expected in your environment. Also, with a production server, you should only consider upgrading to a new code base if there is a bug fix or feature you actually need for your world.
We are currently in open beta. Which is why I'm seeking a once a day reset thing, EZ Server for instance, has one. The entire server shuts down and gets brought back up. Would be kinda nice to get it.
Reply With Quote
  #10  
Old 06-06-2012, 03:14 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

What OS are you using? Most of the servers with the automated reboots are using some flavor of Linux. If you are as well then check the appropriate section on the forum.
Reply With Quote
  #11  
Old 06-06-2012, 04:45 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

You could make a script to do this through telnet pretty easily in perl on Windows or Linux, but I don't remember seeing any example scripts floating around.
Reply With Quote
  #12  
Old 06-06-2012, 07:43 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

PEQ runs Linux, and its daily reboot/maintenance/backup is handled by cron and bash scripts. I use a bash script to telnet into the server and give players a warning of the shutdown. The script is simple, and requires the expect package:

Code:
#!/usr/bin/expect -f
spawn telnet 127.0.0.1 9000
expect "Username:"
send "yourname\n"
expect "Password:"
send "yourpassword\n" 
expect "yourname>"
send "broadcast The server will be rebooting in 10 minutes. Please get to a safe location.\n"
expect "yourname>"
send "exit\n"
Just replace yourname and yourpassword with the appropriate values and if on a different server than local (which I don't recommend, unless you're using a VPN) change the IP as well.
Reply With Quote
  #13  
Old 06-07-2012, 03:28 AM
Sinclipse
Hill Giant
 
Join Date: May 2012
Posts: 122
Default

Rocking a Window's 7.
Reply With Quote
  #14  
Old 06-07-2012, 02:11 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

This first example here shows you how to do the exact same thing in Perl. http://www.perlfect.com/articles/telnet.shtml

It should work on Windows as well as Linux.
Reply With Quote
  #15  
Old 06-10-2012, 03:13 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Quote:
Originally Posted by cavedude View Post
PEQ runs Linux, and its daily reboot/maintenance/backup is handled by cron and bash scripts. I use a bash script to telnet into the server and give players a warning of the shutdown. The script is simple, and requires the expect package:

Code:
#!/usr/bin/expect -f
spawn telnet 127.0.0.1 9000
expect "Username:"
send "yourname\n"
expect "Password:"
send "yourpassword\n" 
expect "yourname>"
send "broadcast The server will be rebooting in 10 minutes. Please get to a safe location.\n"
expect "yourname>"
send "exit\n"
Just replace yourname and yourpassword with the appropriate values and if on a different server than local (which I don't recommend, unless you're using a VPN) change the IP as well.
Thanks cavedude I knew you had one. Linux based OS is > me , one day I need to dive in and learn it.
Lerxst2112 thats a nice link. Should give me a few hours of entertainment tonight. Thanks for posting it.
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

   

All times are GMT -4. The time now is 01:57 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3