Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Retrieving a LOT of output from a command...

$
0
0
Experts,

Tis is an interesting one for me. Previously, we saw this discussed in this post, and I will try that as well.

For now, I can say that with the below SS instantiation, I am maxing out at (wildly approximate, based on line length) 50,000 bytes/characters:

Me.ss = Me.Client.CreateShellStream("dumb", 80, 24, 800, 600, 102400)

Each line is ~50characters, and one output I read has over 50,000 such 50 character lines.

I will try what uugan posted as an update now:
 var cmd = client.CreateCommand("show log ");   
            var asynch = cmd.BeginExecute();

            var reader = new StreamReader(cmd.OutputStream);

            while (!asynch.IsCompleted)
            {
                var result = reader.ReadToEnd();
                if (string.IsNullOrEmpty(result))
                    continue;
                Console.Write(result);
            }
            cmd.EndExecute(asynch);
...but I'd also appreciate any insights from those doing this as well, and if you do find a solution, then what DO you set your SS to (102400 in my current setting above)?

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>