Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: making NET:SSH quiet

by DeadPoet (Scribe)
on Jan 12, 2011 at 18:36 UTC ( #881959=note: print w/ replies, xml ) Need Help??


in reply to Re^3: making NET:SSH quiet
in thread making NET:SSH quiet

I am more than willing to explore...

The topic that I see as most interesting is wrong handling of hung sessions. Thus far, in our 2300+ server environment I have NOT come across a set of SSH options that can account for when a process becomes hung on the remote server, such as rpm, df, bdf, getconf, ioscan, flaky sshd, etc... That is why one may need to kill the process and prevent script lock.

Oh please, provide an example and I will run tests.

Next, I am not knocking the various authors of CPAN Secure Shell modules. These folks have done wonderful work, such as your work. But I did say:

However, many of these modules can be difficult to compile on various platforms...

And, one may not be able to meet the requirements needed to compile. If I remember correctly, each module that I have used ships with ActiveState Perl.

Passwords and Pass Phrases could easily be addressed as the IPC::Open3 call provides STDIN, STDOUT, and STDERR. Synchronization between workers, what are they working on together? Are they working on the same server or different. Once again the %RESULTS shared hash is an example of bringing data back to the parent. However, could server(X) see server(y)'s data and act upon it, yes--the structure is shared. Could one just report on the collective information, as illustrated, yes. It is a concept and I stated adjust as needed.

So now I will add to my original statement and say: Check your local listing and your mileage may vary.

--Poet


Comment on Re^4: making NET:SSH quiet
Re^5: making NET:SSH quiet
by salva (Monsignor) on Jan 13, 2011 at 09:57 UTC
    Thus far, in our 2300+ server environment I have NOT come across a set of SSH options that can account for when a process becomes hung on the remote server, such as rpm, df, bdf, getconf, ioscan, flaky sshd, etc... That is why one may need to kill the process and prevent script lock

    There isn't an easy and general way to handle remote commands hung. Killing the local ssh process is not enough as it may leave the remote processes running.

    IMO, the best approach is to try to identify the pid of the remote process and kill it running kill also via ssh on the remote host (setting ServerAliveInterval and ServerAliveCountMax should be enough to detect hung sessions due to connection errors).

    Passwords and Pass Phrases could easily be addressed as the IPC::Open3 call provides STDIN, STDOUT, and STDERR

    It is not that easy! ssh does not use STDIN/STDOUT for authentication dialogs but /dev/tty. Getting that right is pretty tricky.

    Try to do it while limiting yourself to the modules provided with ActiveState Perl or try to make it work under Windows!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://881959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-10-23 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (128 votes), past polls