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 > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
New section woofie Post Here to Contact Site Administrators and Moderators 3 10-20-2008 08:55 AM
running script after closing telnet shinjeck SUN Solaris 2 10-29-2007 07:52 AM
Windows section?!? PxT Post Here to Contact Site Administrators and Moderators 4 04-11-2002 09:28 AM
New Section kapilv Post Here to Contact Site Administrators and Moderators 3 10-31-2001 09:57 PM
New section ober5861 Post Here to Contact Site Administrators and Moderators 3 07-25-2001 12:16 PM

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

Join Date: Sep 2008
Posts: 36
Question closing of ssh section through script

Hi

we have a script which establish connection to two other UNIX server through ssh for transfering files

There was no exit command after each ssh connection

the script ends with done

whether this will close all the ssh connection established throgh script which running under cron every 10 min

if we are not using the exit statement how the cron job started ssh will close


is there any way to trace what are ssh section started by cron process

and we can trace at a time how many ssh sections are present which estalished by the script

please help!!!!!!!
  #2 (permalink)  
Old 09-24-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,063
grep for the process name of the script first, then based on the PID of the process, do a ptree PID. It will show the child process and its ids. From there you might be able to determine
  #3 (permalink)  
Old 09-24-2008
GIC1986 GIC1986 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 36
thanks will try....
  #4 (permalink)  
Old 09-24-2008
GIC1986 GIC1986 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 36
cAn please comment on the following that when the scrpt excection ends whether the ssh connections will close or not....
  #5 (permalink)  
Old 09-24-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,063
The best method is for you to use an exit at the end of your script or have a test condition to check for "Live" PIDs. If PID is still existent after operation is completed, use kill -9 PID <- this can be even used WITHIN your script if you wish
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 10: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