Ssh output buffer getting cut off

I am running net-ssh(1.0.10) and ruby 1.8.2 (2004-12-25) [i386-mswin32]

When I execute the following:

session.process.open3("/usr/bin/netstat -pn") do
|input,output,error|
puts “#{output.read}”
end

The output is cutoff. Logging into the system and running the command
/usr/bin/netstat -pn | wc -c the command outputs 10219 bytes

When substite “ls -last” for “…/netstat -pn” I get all of the output
Checking the amount of data returned by running: ls -last | wc -c the
command outputs 6799 bytes.

My assumption is that there is default buffer size that I have exceeded
or
the buffer is waiting to be flushed and the process ends before this
happens
or there is something in my output that causes the buffer be flushed
prematurely.

Does anyone have any suggestions on how I might overcome this problem.

Thank you
raymond

On 1/14/07, Jacob, Raymond A Jr [email protected] wrote:

/usr/bin/netstat -pn | wc -c the command outputs 10219 bytes
prematurely.

Does anyone have any suggestions on how I might overcome this problem.

Long time ago somebody had similar problem with ssh truncating data. I
don’t remeber whether it was on ruby-talk, ruby-core or mongrel-users,
nor how did he solve it. I remember it involved scp. So try looking
for scp in the archives.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs