Python implementation of netstat features
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

netstat Rewritten In Python

Welcome to netmatt — a simple netstat -p |grep LISTEN replacement in Python

What Are The Files?

From oldest/worst to newest/best:

    • just reformats netstat output (requires root)
    • reads network state and matching commands from /proc/[pid]/fd/* directly (requires root)
    • matches network state to commands by reading /proc/pid_inode_map created by kernel module in directory pid_inode_map
    • uses /proc/pid_inode_map if exists; otherwise falls back to iterating /proc/[pid]/fd/*
    • it's the unification of and
  • pid_inode_map
    • Linux kernel module to create proc file /proc/pid_inode_map so non-root users can get a listing of which processes own which IP:Port combinations

What's the deetz?

Full writeup is over at