- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script writing
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 11:43 AM
09-18-2003 11:43 AM
I would like to create a script that will shutdown multiple servers at once. I would also like the script to execute the shutdown command on 1 server and then move to the next without waiting for the 1st server to be completly down. Does anyone know how I would do this. This is the command I'm executing within the script:
remsh $SERVER "shutdown -h -y 0" > /dev/null 2&>1 < /dev/null
However, this command still waits on the 1st server before going to the next.
Thanks,
Scott
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 12:27 PM
09-18-2003 12:27 PM
Re: script writing
You could use :
remsh $SERVER "/sbin/shutdown -h y 0 &"
I don't think you'll get any output directed to your stdout this way so you shouldn't have to redirect it after this.
cheers,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 12:31 PM
09-18-2003 12:31 PM
Re: script writing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2003 12:31 PM
09-18-2003 12:31 PM
Re: script writing
ssh hostname1 "shutdown -ry now" &
ssh hostname2 "shutdown -ry now" &
ssh hostname3 "shutdown -ry now" &
Check the server in question.
If roots home directory is /home/root then you will need to change the command.
ssh hostname1 "cd /; shutdown -ry now" &
ssh hostname2 "cd /; shutdown -ry now" &
ssh hostname3 "cd /; shutdown -ry now" &
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com