Print this page
11547 Want connstat(1M) command to display per-connection TCP statistics
Portions contributed by: Cody Peter Mello <cody.mello@joyent.com>
Portions contributed by: Ahmed G <ahmedg@delphix.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
        
*** 18,28 ****
   *
   * CDDL HEADER END
   *
   * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
   */
! /* Copyright (c) 1990 Mentat Inc. */
  
  #ifndef _INET_MIB2_H
  #define _INET_MIB2_H
  
  #include <netinet/in.h> /* For in6_addr_t */
--- 18,31 ----
   *
   * CDDL HEADER END
   *
   * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
   */
! /*
!  * Copyright (c) 1990 Mentat Inc.
!  * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
!  */
  
  #ifndef _INET_MIB2_H
  #define _INET_MIB2_H
  
  #include <netinet/in.h> /* For in6_addr_t */
*** 1352,1375 ****
                  /* remote ip addr for this connection   { tcpConnEntry 4 } */
          IpAddress       tcpConnRemAddress;
                  /* remote port for this connection      { tcpConnEntry 5 } */
          int             tcpConnRemPort;         /* In host byte order */
          struct tcpConnEntryInfo_s {
                          /* seq # of next segment to send */
                  Gauge           ce_snxt;
                                  /* seq # of of last segment unacknowledged */
                  Gauge           ce_suna;
!                                 /* currect send window size */
                  Gauge           ce_swnd;
                                  /* seq # of next expected segment */
                  Gauge           ce_rnxt;
                                  /* seq # of last ack'd segment */
                  Gauge           ce_rack;
!                                 /* currenct receive window size */
                  Gauge           ce_rwnd;
                                          /* current rto (retransmit timeout) */
                  Gauge           ce_rto;
                                          /* current max segment size */
                  Gauge           ce_mss;
                                  /* actual internal state */
                  int             ce_state;
          }               tcpConnEntryInfo;
--- 1355,1399 ----
                  /* remote ip addr for this connection   { tcpConnEntry 4 } */
          IpAddress       tcpConnRemAddress;
                  /* remote port for this connection      { tcpConnEntry 5 } */
          int             tcpConnRemPort;         /* In host byte order */
          struct tcpConnEntryInfo_s {
+                 Counter64       ce_in_data_inorder_bytes;
+                 Counter64       ce_in_data_inorder_segs;
+                 Counter64       ce_in_data_unorder_bytes;
+                 Counter64       ce_in_data_unorder_segs;
+                 Counter64       ce_in_zwnd_probes;
+ 
+                 Counter64       ce_out_data_bytes;
+                 Counter64       ce_out_data_segs;
+                 Counter64       ce_out_retrans_bytes;
+                 Counter64       ce_out_retrans_segs;
+                 Counter64       ce_out_zwnd_probes;
+                 Counter64       ce_rtt_sum;
+ 
                                  /* seq # of next segment to send */
                  Gauge           ce_snxt;
                                  /* seq # of of last segment unacknowledged */
                  Gauge           ce_suna;
!                                 /* current send window size */
                  Gauge           ce_swnd;
+                                 /* current congestion window size */
+                 Gauge           ce_cwnd;
                                  /* seq # of next expected segment */
                  Gauge           ce_rnxt;
                                  /* seq # of last ack'd segment */
                  Gauge           ce_rack;
!                                 /* # of unsent bytes in the xmit queue */
!                 Gauge           ce_unsent;
!                                 /* current receive window size */
                  Gauge           ce_rwnd;
+                                 /* round-trip time smoothed average (us) */
+                 Gauge           ce_rtt_sa;
                                  /* current rto (retransmit timeout) */
                  Gauge           ce_rto;
+                                 /* round-trip time count */
+                 Gauge           ce_rtt_cnt;
                                  /* current max segment size */
                  Gauge           ce_mss;
                                  /* actual internal state */
                  int             ce_state;
          }               tcpConnEntryInfo;
*** 1406,1435 ****
          int             tcp6ConnRemPort;
          /* interface index or zero              { ipv6TcpConnEntry 5 } */
          DeviceIndex     tcp6ConnIfIndex;
          /* state of tcp6 connection             { ipv6TcpConnEntry 6 } RW */
          int             tcp6ConnState;
!         struct tcp6ConnEntryInfo_s {
!                         /* seq # of next segment to send */
!                 Gauge           ce_snxt;
!                                 /* seq # of of last segment unacknowledged */
!                 Gauge           ce_suna;
!                                 /* currect send window size */
!                 Gauge           ce_swnd;
!                                 /* seq # of next expected segment */
!                 Gauge           ce_rnxt;
!                                 /* seq # of last ack'd segment */
!                 Gauge           ce_rack;
!                                 /* currenct receive window size */
!                 Gauge           ce_rwnd;
!                                         /* current rto (retransmit timeout) */
!                 Gauge           ce_rto;
!                                         /* current max segment size */
!                 Gauge           ce_mss;
!                                 /* actual internal state */
!                 int             ce_state;
!         }               tcp6ConnEntryInfo;
  
          /* pid of the processes that created this connection */
          uint32_t        tcp6ConnCreationProcess;
          /* system uptime when the connection was created */
          uint64_t        tcp6ConnCreationTime;
--- 1430,1440 ----
          int             tcp6ConnRemPort;
          /* interface index or zero              { ipv6TcpConnEntry 5 } */
          DeviceIndex     tcp6ConnIfIndex;
          /* state of tcp6 connection             { ipv6TcpConnEntry 6 } RW */
          int             tcp6ConnState;
!         struct tcpConnEntryInfo_s tcp6ConnEntryInfo;
  
          /* pid of the processes that created this connection */
          uint32_t        tcp6ConnCreationProcess;
          /* system uptime when the connection was created */
          uint64_t        tcp6ConnCreationTime;