0

I'm wondering if there's any way to find the tcp so_sndbuf of an actively running process (such as apache or nginx). I know that tcp_wmem sets the default value, but I'm not sure if the server programs I'm working with set their own.

My purpose for this is that I'm trying to set the Initial Window (IW) (see this link for why) for tcp connections. I looked at this paper from google, and they recommend changing your tcp_wmem default value to MSS*IW. I'm worried, however, that programs might be setting their own so_sndbuf instead of using tcp_wmem, so I want to double check.

I'm using linux kernel 2.6.18-194.26.1.el5 (CentOS).

1 Answer 1

2

I don't know about interrogating a currently running process, but you may be able to answer your question by running a program under the control of strace, the system call trace utility. For example:

# strace -f -e trace=setsockopt /path/to/program

This will yield output like this:

setsockopt(3, SOL_SOCKET, SO_SNDBUF, [98304], 4) = 0

You could also use the magic of function interposition to override the setsockopt() functional call (and, for example, print out the value associated with the SO_SNDBUF option), but this is probably not worth the effort.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .