Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of message like "adding 98304 to 32768 in channel 0" in log #25

Open
sirkonst opened this issue Nov 15, 2013 · 3 comments
Open

A lot of message like "adding 98304 to 32768 in channel 0" in log #25

sirkonst opened this issue Nov 15, 2013 · 3 comments
Labels

Comments

@sirkonst
Copy link
Contributor

I run swftp-sftp and try to upload 100 MB file by FileZilla. In log I see few message:

[SSHService ssh-connection on SwiftSSHServerTransport,63,18.3.26.5] adding 65793 to 65279 in channel 0
[SSHService ssh-connection on SwiftSSHServerTransport,63,18.3.26.5] adding 82016 to 49056 in channel 0
[SSHService ssh-connection on SwiftSSHServerTransport,63,18.3.26.5] adding 98304 to 32768 in channel 0

A few message is ok, as I see. But! If I upload several files in parallel, I get many-many-many message in log until uploads to finish. It's not ok, as I see.

@sirkonst
Copy link
Contributor Author

UPD: problem too and for upload one file.

@sudorandom
Copy link
Contributor

I made a logger that filters out most of the verbose stuff but still gives you the important bits like what top-level commands a client is running and when clients connect/disconnect.

If you're running with twistd:

twistd -n --logger=swftp.logging.StdOutObserver
twistd --logger=swftp.logging.LOG_USER
twistd --logger=swftp.logging.LOG_LOCAL0
twistd --logger=swftp.logging.LOG_LOCAL1

If you're running it with the swftp-ftp command it uses StdOutObserver automatically.

However...

This is the line at fault: http://twistedmatrix.com/trac/browser/tags/releases/twisted-13.1.0/twisted/conch/ssh/connection.py#L454 Parts of twisted are fairly verbose (including conch) and it lacks the same kind of filtering ability that you can do with the built-in python logging. I had SSHConnection overwritten exclusively to override adjustWindow() in order to squelch these message. If you think using the log observers above don't work for you then I'll change it back.

@sirkonst
Copy link
Contributor Author

How I see adjustWindow() calls from SSHConnection. ssh_CHANNEL_DATA http://twistedmatrix.com/trac/browser/tags/releases/twisted-13.1.0/twisted/conch/ssh/connection.py#L237 It may be possible to change some default values for channel like localWindowSize or similar to avoid calling adjustWindow()...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants