Update agent.py

Fix for TCP metrics (established, closed, timewait) collection.