From: Richards, K. <Kei...@Co...> - 2002-08-16 14:21:03
|
Hi, I'd like to maintain a number of simultaneous ssh connections from one host to maybe 300 others. I've been looking at using Perl Expect for this, and it's been working well for small numbers of connections. This script: #!/usr/local/bin/perl -w use Expect; @exps = (); for $i (1 .. 300) { print "$i\n"; my $exp = new Expect; $exp->log_stdout(0); $exp->spawn("ssh gend51"); my $match = $exp->expect(30, "gend51> "); push(@exps, $exp); } falls over when it hits 251, with the error: Cannot open pipe: Illegal seek at /usr/local/lib/perl5/site_perl/5.6.0/Expect.pm line 105. I guess this is something to do with limited file descriptors, but I've upped my fd limit (as reported by ulimit -n and limit descriptors) to 1024, and no change. I'm on Solaris 8, perl 5.6.0, Expect 1.15, 2GB RAM, 8GB swap. Any thoughts about how to avoid the above problem? Many thanks, Keith. ********************************************************************** This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LON...@co...> immediately that you have received it and then destroy the copy in your possession. Commerzbank AG is regulated by the FSA for the conduct of investment business in the UK. ********************************************************************** |