Sponsored Content
Operating Systems Linux Fedora Script for shutting down 48 computers Post 302941461 by Jeff Rollins on Thursday 16th of April 2015 08:05:41 AM
Old 04-16-2015
Script for shutting down 48 computers

Hi All, I am pretty new to unix type languages. At work we have a server room with about 50 windows computers in one system and 50 in a unix system. We sometimes have power outages and I don't like the power slam. I wrote a windows batch file using sysinternals help to shutdown the windows computers. I am trying to write one for the unix servers. I started by using vi editor. I remember a little from school. Anyhoo, I start from one of the computers (I use ACC36 because that is where my KVM is. all are names ACC###)ACC36 and
Code:
ssh ACC30

to get to ACC30. Then my next line is
Code:
init 0

this is the shutdown command.
My next command is to get back to ACC36 before the shutdown is
Code:
ssh ACC36

Well, that works, but when I repeat the commands in the script for the other ACC's, it never goes past the first return to ACC36. After I write and save it with :wq , I then
Code:
chmod 755 power-off

Then to execute I go
Code:
./power-off

What am I doing wrong? Any help would be appreciated.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to get IP addresses of LAN computers

I need a shell script for OS X, one that can find IP addresses of machines connected to my LAN, get the names of the computer associated with those addresses, then display them like so in a list: "Bob's L33T Boxx: #.#.#.#" Something like the network scanner in Apple Remote Desktop is what I'm... (1 Reply)
Discussion started by: sladuuch
1 Replies

2. UNIX for Advanced & Expert Users

Shutting down Solaris

Hi I have a mix of solaris 8,9 & 10. I need to have our 6 Solaris servers shutdown buy a script that will be executed by APC network Shutdown software Im really not sure how I would write a script to shut them down and the following processes? the processes are portmapper seq seq_api... (1 Reply)
Discussion started by: tonysequoia
1 Replies

3. UNIX for Dummies Questions & Answers

Shutting down the Server

Hi Is there anyway i can find out from which terminal a shutdown command has been run from ? :( (3 Replies)
Discussion started by: ktech
3 Replies

4. Ubuntu

Ubuntu Hangs when shutting down

i really dont know any other way to put it besides that Ubuntu 8.04, that i just installed on my computer hangs when it shuts down. the bar depletes the orange like it should, but it never actually shuts down. anyone know whats going on? (3 Replies)
Discussion started by: Texasone
3 Replies

5. Shell Programming and Scripting

Shell script to Shutdown Computers on Cluster

Hello all. I have built a cluster of 9 Macs for computational chemistry and I need a shell script that I can use from one computer to all the rest to shutdown. I have modified all of the Macs so that there is pass-wordless ssh. As well, I have modified each "visudo" file on each machine by... (1 Reply)
Discussion started by: marcozd
1 Replies

6. Solaris

I Need to edit message at shutting down

on solaris 8 i edited file rc0 in /sbin at last line ex. /sbin/sync; /sbin/sync; /sbin/sync # Unmount file systems. /usr, /var, /var/adm, /var/run are not unmounted by # umountall because they are mounted by rcS (for single user mode) rather than # mountall. If this is changed,... (1 Reply)
Discussion started by: infjustice
1 Replies

7. AIX

Getting error while shutting down

Hi, I am getting the error "/etc/rc.shutdown failed. Shutdown aborting" while shutting down the os. Please suggest. (1 Reply)
Discussion started by: manoj.solaris
1 Replies

8. Shell Programming and Scripting

Can i see wich Computers are up in my network with a script

#!/bin/bash for ((n=0 ; n < 254 ; n+=1)) do ip=192.168.0.$n if ping -c 1 -w 1 $ip > /dev/null 2> /dev/null >> /etc/logping.txt; then echo "${ip} is up" # output up # sintax >> /etc/logping.txt log with .txt format else echo "${ip} is down" # output... (4 Replies)
Discussion started by: Roggy
4 Replies

9. Solaris

11.2 not shutting down completely

I just installed this 11.2 ver and when I tell it to shutdown it takes for ever then just hangs with this just a little bit of that red line left to go, then it just sits there like forever until I get tired of looking at it then force a shutdown by holding my power button down until my laptop... (8 Replies)
Discussion started by: userx-bw
8 Replies
C-BIOS(7)						 Miscellaneous Information Manual						 C-BIOS(7)

NAME
C-BIOS - provides open source BIOS ROM files for MSX computers DESCRIPTION
This manual page documents briefly the C-BIOS rom files. This manual page was written for the Debian distribution because the original program does not have a manual page. C-BIOS is an open source BIOS for MSX computers. C-BIOS can be shipped with MSX emulators so they are usable out-of-the-box. Details about the BIOS calls available in the ROM files can be found at http://map.tni.nl/ but keep in mind the C-BIOS is work in progress and does not support all BIOS calls yet. C-BIOS comes in three versions currently. C-BIOS_MSX1 is compatible with MSX1 machines, C-BIOS_MSX2 is compatible with MSX2 machines and C- BIOS_MSX2+ is compatible with MSX2+ machines. Each version comes in three localisation variants, an international, Japanse (JP) and Brazilian (BR) one. SEE ALSO
openmsx (1), openmsx-catapult (1), pasmo (1). AUTHOR
This manual page was written by Joost Yervante Damad for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. Joost Yervante Damad C-BIOS(7)
All times are GMT -4. The time now is 01:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy