On Thu Feb 23 02:46:08 2012, OLIVER wrote:
Show quoted text> On Tue Feb 21 17:29:58 2012,
https://openid.umn.edu/ssb wrote:
> > On Tue Feb 21 14:42:54 2012,
https://openid.umn.edu/ssb wrote:
> > > One of the other programmers here heavily uses print / waitfor in
> v2 to
> > > parallelize retrieval of information from our routing and
> switching
> > > infrastructure (~6000 devices).
> > >
> > > Is there any way to get this functionality in v3?
> >
> > A little more detail: he opens a session to each of many devices,
> sends a
> > command using "print" to each of them (up to 50 typically), then
> rolls
> > back around and does a waitfor to retrieve the results.
>
> This functionality is not available. However it's a good suggestion so
> I'll have a think about it
> - I hope not too much effort to implement.
>
> In the meantime, I do suggest your colleague look at the excellent
> Parallel::ForkManager
> module, which might be a good alternative.
>
> regards,
> oliver.
He would have to create around 1500 processes if he were to retrieve
from each device individually. The structure of his programs is such
that this wouldn't be that hard to do, but in terms of efficiency, he's
found that the print / waitfor approach has worked very very well for
sessions to many devices from each of his gathering processes.
Is there any way to create a phrasebook that returns early with a
followup command actually looking for the prompt and gathering the
results, is there? Could we specify a prompt of something crazy like
/^/ or // to get the particular macro (I assume this would have to be a
macro) to return? Would we actually be able to match nothing? I assume
that's what we'd have to do because I assume the newline received after
the command is entered gets gobbled implicitly.