From: <RGi...@a1...> - 2002-01-10 16:30:30
|
> I've got Expect 1.12 on an AIX 4.3.3 system, trying to figure out > how best > to use it to ssh to some other system overseas, run a command on that > oversea system that produces a lot of output (1.5 million lines, > 136 MB > total), collect and process that output on my system. Ugh, and there is no other way to do that? Is it really an interactive application? How about just doing a ssh command and capture the output? Or having the remote system dump that data to a disk and then transfer that with scp? > When I ssh to the remote system and run the command manually, the 1.5 > million lines scrolls past my screen in 46 minutes (that's 32,000 > lines/minute). But when I use Expect to login, run the command > and capture the output, it takes forever! That's no wonder. Expect keeps a buffer for matching, and if you do not set max_match, this buffer will not truncate lest there is a match. Even if you match each line, there is still a lot of overhead, Expect reading in chunks of text and doing matches on them, copying around things etc. IMHO your best bet is to change the approach to the problem, see my suggestions above. Maybe if you can explain in more depth what you are trying to do and the background and limitations you are trying to overcome? Roland -- RGi...@cp... |