Index: /branches/rel_apv_10_7/usr/click/bin/backend/sys_tool.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/bin/backend/sys_tool.c	(revision 39157)
+++ /branches/rel_apv_10_7/usr/click/bin/backend/sys_tool.c	(working copy)
@@ -8184,6 +8184,10 @@
 	show_statistics_slb_all_kern();
 	segment_all_show_slb();
 
+	/* TCP */
+	printf("\n<<<< TCP Statistics >>>>\n\n");
+	tcp_statistic("");
+
 	printf("\n<<<< Health Check Status>>>>\n\n");
 	show_health_server("");
 
Index: /branches/rel_apv_10_7/usr/src/sys/click/app/slb/slb_vs_policy_kern.c
===================================================================
--- /branches/rel_apv_10_7/usr/src/sys/click/app/slb/slb_vs_policy_kern.c	(revision 39157)
+++ /branches/rel_apv_10_7/usr/src/sys/click/app/slb/slb_vs_policy_kern.c	(working copy)
@@ -1414,6 +1414,53 @@
 	return 0;
 }
 
+static __inline
+void atcp_conn_fail_statistics_add(struct tcpstat *tcpstat_p1, struct tcpstat *tcpstat_p2)
+{
+    tcpstat_p1->tcps_portallocfail += tcpstat_p2->tcps_portallocfail;
+    tcpstat_p1->tcps_syndrop_oursinuse += tcpstat_p2->tcps_syndrop_oursinuse;
+    tcpstat_p1->tcps_syndrop_maxconnection += tcpstat_p2->tcps_syndrop_maxconnection;
+    tcpstat_p1->tcps_syndrop_getmss += tcpstat_p2->tcps_syndrop_getmss;
+    tcpstat_p1->tcps_syndrop_badmss += tcpstat_p2->tcps_syndrop_badmss;
+    tcpstat_p1->tcps_syndrop_eroute += tcpstat_p2->tcps_syndrop_eroute;
+    tcpstat_p1->tcps_synroutebsd += tcpstat_p2->tcps_synroutebsd;
+    tcpstat_p1->tcps_synreset += tcpstat_p2->tcps_synreset;
+    tcpstat_p1->tcps_conn_conflict += tcpstat_p2->tcps_conn_conflict;
+    tcpstat_p1->tcps_conn_pcb_insert_fail += tcpstat_p2->tcps_conn_pcb_insert_fail;
+    tcpstat_p1->tcps_conn_openport_fail += tcpstat_p2->tcps_conn_openport_fail;
+    tcpstat_p1->tcps_conncore_sendsyn_fail += tcpstat_p2->tcps_conncore_sendsyn_fail;
+    return;
+}
+
+static __inline
+void print_tcp_conn_fail_statistics(void *pcb)
+{
+    struct tcpstat total_tcpstat;
+    int j;
+
+    bzero(&total_tcpstat, sizeof(total_tcpstat));
+    for (j = 0; j < atcp_nthreads; j++) {
+        atcp_conn_fail_statistics_add(&total_tcpstat, atcp_adapter_array[j]->atcp_clicktcpstat);
+    }
+
+    SLB_PRINTF((pcb, "Global Failed Connection Statistics:\n"));
+    SLB_PRINTF((pcb, "\t %ju port allocation failures\n", total_tcpstat.tcps_portallocfail));
+    SLB_PRINTF((pcb, "\t drop %ju synd by ours in use\n", total_tcpstat.tcps_syndrop_oursinuse));
+    SLB_PRINTF((pcb, "\t drop %ju syns by over max connection\n", total_tcpstat.tcps_syndrop_maxconnection));
+    SLB_PRINTF((pcb, "\t drop %ju syns by get mss error\n", total_tcpstat.tcps_syndrop_getmss));
+    SLB_PRINTF((pcb, "\t drop %ju syns by bad mss size\n", total_tcpstat.tcps_syndrop_badmss));
+    SLB_PRINTF((pcb, "\t drop %ju syns by eroute error\n", total_tcpstat.tcps_syndrop_eroute));
+    SLB_PRINTF((pcb, "\t route %ju syns to system stack\n", total_tcpstat.tcps_synroutebsd));
+
+    SLB_PRINTF((pcb, "\t %ju syns was reset\n", total_tcpstat.tcps_synreset));
+    SLB_PRINTF((pcb, "\t %ju connection confilicts\n", total_tcpstat.tcps_conn_conflict));
+    SLB_PRINTF((pcb, "\t %ju connection failures for connection table full\n", total_tcpstat.tcps_conn_pcb_insert_fail));
+    SLB_PRINTF((pcb, "\t %ju connection failures for fail to open local port\n", total_tcpstat.tcps_conn_openport_fail));
+    SLB_PRINTF((pcb, "\t %ju connection failures for fail to send syn\n", total_tcpstat.tcps_conncore_sendsyn_fail));
+
+    return;
+}
+
 ca_errcode_t
 show_tcp_statistics_vs_kern(void *pcb, char *name)
 {
@@ -1472,9 +1519,12 @@
         return ERR_SLBN_OK;     
     }
 
-	if (strlen(name) == 0) {
-		return ERR_SLBN_OK;/* don't need to handle it */
-	}
+    /* this is for global syndrop stats same as in antetstat -p tcp */
+    print_tcp_conn_fail_statistics(pcb);
+
+    if (strlen(name) == 0) {
+        return ERR_SLBN_OK;/* don't need to handle it */
+    }
 	
     vs_p = slb_vs_find_name(name);
     if ((vs_p == NULL) ||
