-1

This is the doubt i have in my mind we can reboot the remote server using reboot command but how can we down the server for an hour or a specific time. In our case we login to the server through putty with credentials can that be possible

1
  • If the system's BIOS supports Wake-On-LAN you could make use of that...
    – Nathan C
    Jul 7, 2014 at 13:52

5 Answers 5

3

Typically enterprise class server hardware comes with provisions for out of band management, either based on the open IPMI standard or the more proprietary options such as HP's ILO, Dell's DRAC, Oracle/SUN ILOM.

As @Jose Flores mentioned some datacenter providers have managed PDU's that allow you to remotely power cycle your servers.

2

Somewhat of a strange requirement, but assuming actually turning the server off for an hour isn't your objective, but, rather, to simply make it unavailable to the outside world, why not just firewall the server completely (apart from whatever you're using to manage it, such as SSH) for the period of time and then delete the firewall rules afterwards?

This of course is assuming you don't have an out of band management option such as ilo/drac or even remotely-addressable PDU where you can toggle the power to bring the server back online (assuming the BIOS is set to always power on and not "Last" or "Memory" which would leave your machine off if you had shut it down prior)

1

If you have a PDU that you can control remotely then you could power off and on the server after a certain amount of time. I don't think it can do it automatically.

A remote PDU is the only thing I can think of right now.

1

The proper way to do this is using an out-of-band server management solution, like HP iLO, Dell iDRAC, etc. As Nathan says, WOL is useful too. Barring that, you need remote hands - someone onsite that you can call when you need it turned back on.

0

What mfinni says: this is what out of band management is for

Assuming you do not have it, how do you define "down" server? Do you need the power off? Or do you need the server to not be reachable? or ..... ?

If you just need the server to not be reachable, you can put in a "sleep" statement somewhere in one of the init.d scripts that starts before the network start script.

Or create your own

Or put it in one of the "boot." scripts.

Just make sure you take it out, otherwise everytime you reboot it will take an hour.

Test it on a local server you have with same OS and put in a sleep for say a minute and watch the terminal. If it works, you can try it on the remote server

I suggest the above only as a last resort.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .