General
cancel
Showing results for 
Search instead for 
Did you mean: 

Running a script from single node

Trng
Super Advisor

Running a script from single node

Dear Gurus,

i have a monitoring script which am kept in server1 (hpux 11.23) ,i want to run the script in all 50 Servers(all are hpux servers) FROM SERVER1 .how to impliment it ? pls guide me

rgds
administrator
7 REPLIES
Steven E. Protter
Exalted Contributor

Re: Running a script from single node

Shalom,

I would suggest granting one system password free access so it can run scripts.

http://www.hpux.ws/?p=10

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Suraj K Sankari
Honored Contributor

Re: Running a script from single node

Hi,
Configure without passwd into all the 50 server the scp your script into a perticular location for ex. /tmp/myscript
then take all 50 servers name into a file then run this script

for i in `cat myfile`
do
ssh $i sh /tmp/myscript
done

Suraj
Duncan Edmonstone
Honored Contributor

Re: Running a script from single node

For 50 systems you probably want something more efficient. Why not use the command fanout capabilities of the parallel distributed shell (pdsh). This is part of the DSAU utilities. See this doc here for details:

http://docs.hp.com/en/T2786-90291/ch04s01.html?btnNext=next%A0%BB

As long as you have ssh on the target systems, I'm pretty sure pdsh will work fine.

HTH

Duncan

HTH

Duncan
OldSchool
Honored Contributor

Re: Running a script from single node

i'm not sure, but I think he's asking how he can run a script that is only stored on ServerA, on ServerB-9999.

Not so much the login process, but getting the remote process to read/execute a script that isn't locale????
Emil Velez
Honored Contributor

Re: Running a script from single node


one of the people mentioned DSAU. Version 1.00.19 (the latest verison on 0903) media kit works fine. Earlier versions did not always work correctly.
Trng
Super Advisor

Re: Running a script from single node

Hi All
my requiremnet is ,i have a simple bdf checking script and i have placed it in /tmp/check_bdf .i want to run manually that script in all 50 HPUX Server from a single server .i dont want to manually log in to 50 servers and run the scripts...pls help me

All our users are connecting to this 50 servers using ssh with password.

rgds
trng
administrator
rariasn
Honored Contributor

Re: Running a script from single node

Hi,

List hpux server 'myfile'

for i in `cat myfile`
do
scp -p /tmp/myscript $i:/tmp
ssh $i sh /tmp/myscript
done

rgs