emergency shutdown best practices.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users emergency shutdown best practices.
# 8  
Old 10-08-2008
Thanks for the help.

for host in `cat hostlist`; do ssh $host shutdown <arguments>;done

will work for me.
# 9  
Old 10-08-2008
Quote:
Originally Posted by jsw371
Thanks for the help.

for host in `cat hostlist`; do ssh $host shutdown <arguments>;done

will work for me.
that will work if you have a unix server with a simple config, totally managed trough systemv scripts.

but, in reality, you have server with multiple services, servers containing multiple virtual servers.
some services need to be properly shutdown with some command, and some even need some time since you issue the stop command before you could actually bring down the Os itself.
that is why i pointed that instead of the shutdown command, use a script.
it should be named the same way, in the same path on all servers to allow a simple while in the "master" server.

and each script will be responsible for all the logic for the stop procedure of this weird services that cant simple be killed. the sleeps to ensure they have some time to end correctly, ect

i remember one place i used to work, they used a protocol over tcp/ip to transfer messages between servers.
you had one gateway, receiving msg, distributing them to the proper apps and databases, and replying to them.
this gateway was also listening to other gateways in other countries from the same company.
the thing is that you couldnt simple kill everything down.
you had to isse stop commands to all the backends, to stop answering requests, but dont kill the current ones, after some time (something like 10 mins)
in the meant time, you had to tell the gateway there was problems, so it had time to tell others gateways, so they could start answering the request sent to him.
after all the backends where stoped, , you had to stop the gateway.

and that is a simple example. i have seen way more complicated companies, where they had multiple machines working in line.
they neede a complete hour to shutdown the hole procesing line, without lossing data in between
# 10  
Old 10-08-2008
You have really opened my eyes broli.

I was hoping that the scripts in the /etc/rc*.d files would bring down services,applications, etc...

I am so screwed because I have no clue what is happening on most of the servers. You see I am a dba and was tasked with this "side" project because I new unix shell scripting. I was given a server list and told to create an emergency shutdown script that will bring the servers down quickly, but not painfully like a recent power failure did. I still do not know why this was not assigned to syseng. (We are way under-staffed in syseng).
# 11  
Old 10-09-2008
Quote:
Originally Posted by jsw371
You have really opened my eyes broli.

I was hoping that the scripts in the /etc/rc*.d files would bring down services,applications, etc...

I am so screwed because I have no clue what is happening on most of the servers. You see I am a dba and was tasked with this "side" project because I new unix shell scripting. I was given a server list and told to create an emergency shutdown script that will bring the servers down quickly, but not painfully like a recent power failure did. I still do not know why this was not assigned to syseng. (We are way under-staffed in syseng).
its a matter of how much pressure you can create.
how much you can force other depts in the company to give you the info, or how much you can sustain when they dont, and your script destroys their data

on a side note, try your best, and ask for money :P
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Linux

Virtualization best practices

Hello admins and gurus I have a controversial topic: now we are investing in a new Linux OS that will hold our Sybase database. The server will virtualized on a VMware server hosted on SAN storage. Now the question is, when we install the database engine is it better - in terms of performance -... (1 Reply)
Discussion started by: abohmeed
1 Replies

2. Shell Programming and Scripting

UNIX emergency

can anyone please tell me that how can i boot unix from a cd? full procedure. it's an emergency. reply asap (1 Reply)
Discussion started by: niket agarwal
1 Replies

3. Solaris

Best practices

Dear all, Kinda lame question but i'd like to hear your experiences and advice. Question in short ----------------- What permission should a mount point "ideally" have - i think it's root. Ex:- /usr/app/ i'd set the app to be owned by root and within /usr/app i would create another... (1 Reply)
Discussion started by: ossupport55
1 Replies

4. Solaris

Emergency !!!Help Please--- NFS

Hi Guru's, I am unable to mount NFS share on unix system (DG/UX) which is nfs client. Error: mount: /nfsshare: Invalid argument mount: giving up on: /mountpoint i tried following commands mount -t nfs remotehost:/nfsshare /mountpoint Error: mount: /nfsshare: Invalid... (1 Reply)
Discussion started by: Justin John
1 Replies

5. Ubuntu

Emergency help with ubuntu

Hi guys i have some question about ubuntu(10.10) 1.what time scheduling & page replacement algorithm have been used in ubuntu 2.how to create a process 3.how to kill a process 4.how to send information to a process 5.how to see a process 6.how to increase priority of a process 7.how to... (1 Reply)
Discussion started by: mortez28
1 Replies

6. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

7. Shell Programming and Scripting

Need Emergency help with script!

I'm trying to write a script to push out to all our servers some Veritas add-ons. I want the script to push to all servers and if there server hardware matches the uname -i statement, it will install a additional add-on.. The script keeps giving me a error on line 29. Here is the script.... (3 Replies)
Discussion started by: soupbone38
3 Replies

8. SCO

Emergency boot

I need to boot an OpenServer 5.0.5 server but I don't have emergency boot disks for it. There are some boot disks of other servers. Can I use these disks, changing defbootstr ?. How ?. The fact is that administrator can't login as root and it seems to be a corrupted auth system issue. Other... (2 Replies)
Discussion started by: dags
2 Replies
Login or Register to Ask a Question