Browse Source

v1.4.2: TIME_WAIT and CLOSE_WAIT removed from listen and established question.

Peter Siegrist 1 year ago
parent
commit
cb6b016436
1 changed files with 4 additions and 4 deletions
  1. 4 4
      sinetstat

+ 4 - 4
sinetstat

@@ -28,7 +28,7 @@ import argparse
 
 
 
-VERSION = '1.4.1'
+VERSION = '1.4.2'
 
 PROC_TCP4 = "/proc/net/tcp"
 PROC_UDP4 = "/proc/net/udp"
@@ -196,7 +196,7 @@ def netstat_tcp4():
         state = TCP_STATE[line_array[3]]
         if state != 'LISTEN' and o_listen == True:
             continue
-        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' ) and o_estab == True:
+        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' or state == 'TIME_WAIT' or state == 'CLOSE_WAIT' ) and o_estab == True:
             continue
             
         try:
@@ -252,7 +252,7 @@ def netstat_tcp6():
         state = TCP_STATE[line_array[3]]
         if state != 'LISTEN' and o_listen == True:
             continue
-        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' ) and o_estab == True:
+        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' or state == 'TIME_WAIT' or state == 'CLOSE_WAIT' ) and o_estab == True:
             continue
             
         try:
@@ -309,7 +309,7 @@ def netstat_tcp4in6():
         state = TCP_STATE[line_array[3]]
         if state != 'LISTEN' and o_listen == True:
             continue
-        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' ) and o_estab == True:
+        if ( state == 'LISTEN' or state == 'SYN_SENT' or state == 'SYN_RECV' or state == 'TIME_WAIT' or state == 'CLOSE_WAIT' ) and o_estab == True:
             continue
                 
         try: