First post

It’s not the first time I find that my PS it’s not working properly due it’s has lost NFS mounts, or it went out of memory due a sudden peek of traffic or maybe because a few zombie processes are hanging around produced by my not-so-good programming skill :D
Usually the quick and dirty workaround it’s to reboot the PS, but you only can do it manually at Dreamhost’s control panel.

As there is no way I could be checking my PS status all the time, and I’m not going to double the amount I’m paying already to avoid any chance of high rare peeks of traffic, I submitted a ticket to Dreamhost support asking by any way to automate reboots:

Hi,

Is there any chance I could automate reboots on my Dreamhost PS?

For example, if the number of zombie process is above 5 -> reboot PS

The hard way it's coding the Perl LWP script that logs in this panel and does the same thing at your form, but that's too crappy and I'd prefer to not take that path :D

Best regards.

Antonio.

And the answer:

Hello Antonio,

> Is there any chance I could automate reboots on my Dreamhost PS?

Sorry! We currently do not have an option to easily reboot your Dreamhost
PS via the console. You will need to (unfortunately) write the script the
access the panel in order to setup this automated reboot process.

If we add anything in the near future I will be glad to let you know, but
right now there is no easy method to automate these reboots.

Thanks!

So, this is how is born the first tool at DreamhostPStools.com: vpsreboot.pl

perl vpsreboot.pl
13:23:04: Logging at panel...
13:23:09: Logged in succesfully!
13:23:09: Requesting reboot of xxxxxx PS ...
13:23:11: Reboot pending!

And voila! PS rebooted and serving pages again :)

Once the script is executed it schedules the PS reboot, there is not any kind of intelligence to evaluate if the reboot was really needed or not (yet!).

Some improvements which came to my mind are:

  • Send an email to the owner each time a reboot is scheduled.
  • Add a security delay to avoid queued reboots produced by any kind of mistake or wrong behaviour.
  • Sites monitoring based on Dreamhost PS, after several errors launch an automated scheduled reboot.

And possibly more in the future.

Subscribe without commenting


0 Responses to “First post”


  1. No Comments

Leave a Reply