Improved Netstat

Improved Netstat


Improved Netstat is a netstat + whois that I wrote to replace the native Linux's netstat as it better fits my needs. It works on Linux's native installations and besides showing all the current IPv4 connections, it shows some extra information that can't be obtained using Linux's netstat.

My whois implementation checks "" through sockets, and its queries return Autonomous System information as BGP prefixes and AS names, so I can identify to which company that remote host belongs.

All the AS information is written / cached to disk through _pickle (Python 3.5 implementation of cPickle), so new queries looking for information previously obtained does not spend time unnecessarily.

The queries to check for AS information are executed through multiprocessing to save time once they're required, and all the necessary IPs to be checked are evenly divided through separate lists taking in consideration an optimize number of simultaneous threads to be used.