diff --git a/main/views.py b/main/views.py index 6bc5dd3..ea74bdd 100755 --- a/main/views.py +++ b/main/views.py @@ -299,12 +299,11 @@ def get_netstat(): Get ports and applications """ try: - pipe = os.popen("ss -tlnp | awk '{print $4, $5, $6}'") + pipe = os.popen("ss -tnp | grep ESTAB| awk '{print $4, $5}'") data = pipe.read().strip().split('\n') pipe.close() data = [i.split(None, 3) for i in data] - del data[0] except Exception, err: data = str(err) diff --git a/templates/main.html b/templates/main.html index 39264df..d69046a 100644 --- a/templates/main.html +++ b/templates/main.html @@ -291,7 +291,6 @@