home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!ukma!gatech!concert!sas!mozart.unx.sas.com!bultman
- From: bultman@sonny.unx.sas.com (David Bultman)
- Subject: need help with remsh looping UNIX
- Originator: bultman@sonny.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <C1Kn61.B1p@unx.sas.com>
- Date: Thu, 28 Jan 1993 16:01:12 GMT
- Nntp-Posting-Host: sonny.unx.sas.com
- Organization: SAS Institute Inc.
- Keywords: UNIX remsh infinite loop
- Lines: 22
-
-
- I have a Perl program that surveys the available servers on
- our LAN and by doing a remsh uptime determines which server
- has the lowest load average. I use that server to run the
- next job on my job queue. Sometimes the remsh $server uptime hangs.
- Is there a way to timeout with Perl? Here's what I have.
-
- foreach (@stack) {
- $server = $_;
- chop($server);
- $rc = `remsh $server -n uptime`; <- could hang here
- # Check to see if this is the lowest
- # and save if yes.
- }
-
-
-
-
- --
- David Bultman, bultman@unx.sas.com SAS Institute, Inc.
- Core Research and Development SAS Campus Dr, Cary, NC
- (919) 677-8000 x6875 27513-2414 USA
-