Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » SSH Exec output truncated (SSH Exec output truncated)
SSH Exec output truncated [message #54445] Tue, 21 July 2020 13:30 Go to next message
jstip is currently offline  jstip
Messages: 4
Registered: July 2020
Junior Member
I am using SshSession CreateExec to run a command on a remote machine, and capture the output.
I noticed that long outputs are truncated. If I increase CHUNKSIZE in Core/SSH/Core.h, I can get the full output.
Is this the way to do this, or is there another way to get the full output?
Re: SSH Exec output truncated [message #54447 is a reply to message #54445] Tue, 21 July 2020 20:41 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello jstip,

And welcome to U++ forums.

I noticed that long outputs are truncated. If I increase CHUNKSIZE in Core/SSH/Core.h, I can get the full output.


It should be fixed now.
Hopefully the fix will be available in the nightly builds, shortly after the midnight (The change is already reflected in the U++ git mirror though.)
Please check.

Long story short: Your observation is correct. It was "stubbed" that way for the time being (Its base class, SshChannel, is going to be refactored. But I am waiting the next stable point release of libssh2 1.9, where I will upgrade the library too.)

Now it is fixed. Just pass the string and don't worry about the chunk size.

P.s: There is already a ChunkSize method for every class derived from SshChannel, including SshExec. You don't need to modify the code if you want to adjust the chunksize.

If you encounter any errors or have questions let me know.

Best regards,
Oblivion.



[Updated on: Tue, 21 July 2020 21:31]

Report message to a moderator

Re: SSH Exec output truncated [message #54448 is a reply to message #54447] Wed, 22 July 2020 09:43 Go to previous messageGo to next message
jstip is currently offline  jstip
Messages: 4
Registered: July 2020
Junior Member
Hi Oblivion,

That's fast Smile
I understand you want to wait for libssh2, you don't want to do double work. But it seems to be working now with the nightly build.
And indeed, I see the ChunkSize method in the SshChannel class, missed that one.
Thanks a lot!

Regards, Jan
Re: SSH Exec output truncated [message #54449 is a reply to message #54448] Wed, 22 July 2020 10:27 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello Jan,

Quote:
And indeed, I see the ChunkSize method in the SshChannel class, missed that one.


About the chunk size: Keep in mind that it simply represents the maximum chunk size of data that can be transfered in one loop cycle.
Increasing the chunk size "can" (not necessarily) improve the transfer speed and responsiveness (this is especially visible on SShShell sessions or SCP transters). But usually the 64K default value is OK.


Best regards,
Oblivion


[Updated on: Wed, 22 July 2020 12:49]

Report message to a moderator

Re: SSH Exec output truncated [message #54450 is a reply to message #54449] Wed, 22 July 2020 16:02 Go to previous message
jstip is currently offline  jstip
Messages: 4
Registered: July 2020
Junior Member
I understand, I kept the chunk size default now. Optimizing it probably relies on network transport sizes as well.
Thanks again, works for me now.

[Updated on: Wed, 22 July 2020 16:06]

Report message to a moderator

Previous Topic: Set mouse position
Next Topic: Updating GLEW to version 2.2.0 for 2020.2 Release
Goto Forum:
  


Current Time: Fri Mar 29 14:56:34 CET 2024

Total time taken to generate the page: 0.01275 seconds