|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
rsh to several servers in script doesnt work
HEy EveryOne,
I'm not really a "Scripter" Im a mere admin looking to MAke mY job Easier. We have about 15 Servers in our system. We have to log onto each server 5 times daily and run 2 simple commands; mount and df. Its really simple. I want to incorporate these silly commands into a script so we dont have to log on to each machine individually....then possibly create a cron job. Here's what i'm trying to do.... #!/bin/ksh # # rsh server1 echo you are now on server1 df -k sleep 3 mount -p sleep 3 exit rsh server2 echo you are now on server2 df -k sleep 3 mount -p sleep 3 exit and so on and so forth.... But what happens is - Ill run the script and it will rsh to the server but it wont execute the commands until i type exit from the server i Remote Shelled into. I dont know what to do from here. I came here because i heard this is the forum where all the really smart people hang out. Can a really smart person help me out? Thanks! Appreciate your help. ![]() |
|
#2
|
|||
|
|||
|
IF you are trying to manage with multiple servers then the control must be there with the executing server only.
server -----> server1 -----> servern So simply as, rsh server1 "df -k;mount -p" It will give results there without login into the system. REgards Muthu |
|
#3
|
|||
|
|||
|
Thanks Muthu! I'll let you know how it works....
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > rsh to several servers in script doesnt work |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|