Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a network problem on my MacOS that i need to troubleshoot. I know that TCP socket has internal timeout that will close connection if remote party is not responding (but no graceful disconnect either). Is it any command/tool i can use to check exact value of this timeout(s)?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can see all system-set tcp values with

$ sysctl net.inet.tcp

Interpreted from tcp_var.h, tcp_subr.c, and tcp_timer.c:

  • net.inet.tcp.keepidle = keepalive idle timer
  • net.inet.tcp.keepintvl = interval to send keepalives
  • net.inet.tcp.keepinit = timeout for establishing syn
  • net.inet.tcp.mssdflt = Default TCP Maximum Segment Size
  • net.inet.tcp.v6mssdflt = Default TCP Maximum Segment Size for IPv6
  • net.inet.tcp.minmss = Minmum TCP Maximum Segment Size
  • net.inet.tcp.minmssoverload = Number of TCP Segments per Second allowed to be under the MINMSS Size
  • net.inet.tcp.rfc1323 = Enable rfc1323 (high performance TCP) extensions
  • net.inet.tcp.rfc1644 = Enable rfc1644 (TTCP) extensions
  • net.inet.tcp.do_tcpdrain = Enable tcp_drain routine for extra help when low on mbufs
  • net.inet.tcp.pcbcount = Number of active PCBs
  • net.inet.tcp.icmp_may_rst = Certain ICMP unreachable messages may abort connections in SYN_SENT
  • net.inet.tcp.strict_rfc1948 = Determines if RFC1948 is followed exactly
  • net.inet.tcp.isn_reseed_interval = Seconds between reseeding of ISN secret
  • net.inet.tcp.background_io_enabled = Background IO Enabled
  • net.inet.tcp.rtt_min = min rtt value allowed
  • net.inet.tcp.randomize_ports = Randomize TCP port numbers
  • net.inet.tcp.tcbhashsize = Size of TCP control-block hashtable
  • net.inet.tcp.msl = Maximum segment lifetime
  • net.inet.tcp.always_keepalive = Assume SO_KEEPALIVE on all TCP connections
  • net.inet.tcp.broken_peer_syn_rxmit_thres = Number of retransmitted SYNs before TCP disables rfc1323 and rfc1644 during the rest of attempts
  • net.inet.tcp.pmtud_blackhole_detection = Path MTU Discovery Black Hole Detection
  • net.inet.tcp.pmtud_blackhole_mss = Path MTU Discovery Black Hole Detection lowered MSS

I believe by default 8 keepalives will be sent before the connection is closed if SO_KEEPALIVE is set. Times are in milliseconds.

share|improve this answer

I'm not sure if this is what you're looking for, but you can check the keep-alive value with:

$ netstat -o
share|improve this answer
1  
netstat doesn't accept the '-o' option for me in Mac OS X 10.6.6 –  fuzzyTew May 31 '11 at 11:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.