 | 
May 22nd, 2008, 04:08 PM
| | Newbie | | Join Date: May 2008
Posts: 11
| | using shell script connect another machines run the script result shown in web page
i am in critical position please help
we have machines a,b,c,d
in each machine application servers are running
but each machine have 40 application server are running
result of 40 application servers are running or not shown in the web page.
but i am in z machine
when run the script (http://172.30.98.91:/cgi/health.ksh) in web page
Result will show in the web page .
Resultant in web page
Server a machine b machine c machine d machine
--------------------------------------------------------------------------------------------
trowe running running running running
republic running not running running running
universal not running
. ,
.
. ,
.
.
acs running running running running
it very help full greate becaues i am trouble .please help
| 
May 23rd, 2008, 02:19 AM
|  | Expert | | Join Date: Mar 2007 Location: Chennai Age: 29
Posts: 1,159
| |
If u want to connect to another box and run a script then u should use rsh for this.
Provide more details so that people here can help u.
Raghu
| 
May 24th, 2008, 03:58 PM
| | Newbie | | Join Date: May 2008
Posts: 11
| |
we have 4 different machines (unix)
in each machines haveing 40 servers running
and we write the shell script like go to the 4 machines run the script and result will get in to another machine( servers running or not)
Please help i am in critical position
| 
May 25th, 2008, 10:58 PM
|  | Moderator | | Join Date: Aug 2007 Location: Munich
Posts: 284
| |
Hi,
if I understand your needs right, you want to have one script which - is maintained on machine z
- is sent to system a,b,c,d
- is remotely executed there while
- you need the output on machine z.
Try something like - cat check.sh | ssh checkusr@${rmtsys} >${rmtsys}.out 2>${rmtsys}.err
where rmtsys is a variable containing the remote systems name (you could try to use a for() loop). The output of the script is stored in the .out and .err files. If setup right by exchanging keys, the ssh enters [a,b,c,d] without prompting for a password.
Regards,
Bernd
| 
May 28th, 2008, 12:42 PM
| | Newbie | | Join Date: May 2008
Posts: 11
| |
Thanks very much
once check the below code and update it will work or not Quote: |
Originally Posted by docdiesel Hi,
if I understand your needs right, you want to have one script which - is maintained on machine z
- is sent to system a,b,c,d
- is remotely executed there while
- you need the output on machine z.
Try something like - cat check.sh | ssh checkusr@${rmtsys} >${rmtsys}.out 2>${rmtsys}.err
where rmtsys is a variable containing the remote systems name (you could try to use a for() loop). The output of the script is stored in the .out and .err files. If setup right by exchanging keys, the ssh enters [a,b,c,d] without prompting for a password.
Regards,
Bernd | | 
May 28th, 2008, 01:44 PM
| | Newbie | | Join Date: May 2008
Posts: 11
| |
i try below code , is not working (it will going another machine but not running in that machine and out put also not comeing in that machine)
please help help ......................
Regards,
gutpa Quote: |
Originally Posted by gupta24 Thanks very much
once check the below code and update it will work or not | | 
May 29th, 2008, 03:18 PM
|  | Moderator | | Join Date: Aug 2007 Location: Munich
Posts: 284
| |
Hi,
try the following: - echo "test" | ssh youruser@rmtsystem "cat >/tmp/test.txt"
and replace youruser@rmtsystem with appropriate username and servername. This line should ask for youruser's password and afterwards a file /tmp/test.txt on rmtsystem should contain the text "test". Does this work at your site?
Regards,
Bernd
| 
June 3rd, 2008, 06:57 AM
| | Newbie | | Join Date: May 2008
Posts: 11
| |
sorry not working
still in critical please help.................... Quote: |
Originally Posted by docdiesel Hi,
try the following: - echo "test" | ssh youruser@rmtsystem "cat >/tmp/test.txt"
and replace youruser@rmtsystem with appropriate username and servername. This line should ask for youruser's password and afterwards a file /tmp/test.txt on rmtsystem should contain the text "test". Does this work at your site?
Regards,
Bernd | | 
June 6th, 2008, 02:14 PM
|  | Moderator | | Join Date: Aug 2007 Location: Munich
Posts: 284
| |
Hi, Quote: |
Originally Posted by gupta24 sorry not working | is a very detailed answer. What error message did the command display, if any? Btw., are you sure there's ssh software installed on clients and servers?
To enable anybody to help you any further you've got to give more information, especially about your environment (operating system(s), shell(s) used, ...).
Regards,
Bernd
|  |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|