Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been tasked with providing a method of shutting down our Linux + Unix farms in a simple way. This would be used in the event of an air conditioning failure, UPS failure or some other disaster which required us to shut everything down quickly.
We are running a mixture of Linux distros, Red Hat 7-9, Mandrake 10, Solaris 7-9. I would like to know if anyone else has got a method for performing such shutdowns - I don't want to start reinventing the wheel.
I have full root access to all the machine, so access is not a problem. I'd don't want a monitoring daemon running which is waiting to shut the box down (for obvious reasons).
My initial thoughts on the problem was to use a script issued from one machine which would open ssh sessions on the other machines and issue the shutdown command. Does anyone have anything like this that they could share with me? Or do you have another insight into this?
it's an automation program for tasks such as yours. I know you don't want a daemon but perhaps it's still of some use? (Like, see what the program produces, copy it and create something useful out of it)
Many thanks for this, I found a few scripts on t'Internet which people had already written which open an ssh session to a machine.
For interest, and in case anyone else asks the question, I've included an example script in this post. From this, it is pretty trivial to set the script up to connect to many servers and issue the shutdown command. I'm going to put servers in different groups so I can apply some order to the shutdown process.
To get this to work, I had to install Expect and TCL onto a Red Hat 7.3 machine. Haven't tried it on the Solaris machines yet but I can't see this being a problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.