The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Link type between working machine and server machine palash2k UNIX for Dummies Questions & Answers 1 05-22-2008 06:43 AM
Execute command from terminal on remote machine Ranu Shell Programming and Scripting 0 10-09-2007 04:13 AM
how to execute a script on remote machine balireddy_77 Shell Programming and Scripting 4 09-27-2006 07:45 PM
how to execute C code in linux machine rajan_ka1 Shell Programming and Scripting 3 06-29-2006 05:26 AM
Executing Script of a different user on Same Machine yeheyaansari Shell Programming and Scripting 5 04-07-2005 02:03 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-11-2008
harneetmakol harneetmakol is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 1
Question How to execute a script hosted on a machine from a different machine

Hi everyone

I intend to trigger a script from one machine say mc1 that actually excutes on different machine say mc2 and redirect the logs to that machine mc2.

I tried to use nohup <nfs location of machine >/script.sh > <nfs location of machine >/script.log 2>&1 &

nfs location of machine = /wlsuite/dir1/dir2 which is located on one machine (mc2)

And the location from where I 'm excuting the script is /wlsuite/dir1/dir3 on a diferent machine (mc1).

But after execution of the script when i give fuser /wlsuite/dir1/dir2/* from mc2 ,it doesnot show any any information on process being executed.

while on giving fuser /wlsuite/dir1/dir2/* from mc1 it shows the info which i dont want.i want the info to be available in the host machine itself and not in the location from where the script was triggered.

Can anyone help me out to figure a possible solution?
  #2 (permalink)  
Old 08-11-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
Better use ssh. Setup keys etc, execute the script from mc1 at mc2 like
Code:
mc1#     ssh mc2 "/path/to/your/script.sh >> /logs/script.out"
  #3 (permalink)  
Old 08-11-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Code:
ssh remotehost 'commands to execute go here'
There are a number of possible twists but this should be enough to get you started. Search the forums if you get more trouble; there are plenty of threads on this topic.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:22 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0