@@ -0,0 +1,489 @@
+import psutil%0Afrom subprocess import call%0Afor pid in psutil.pids():%0A%09p = psutil.Process(pid)%0A%09if p.connections():%0A%09%09for con in p.connections():%0A%09%09%09if con.status == psutil.CONN_LISTEN:%0A%09%09%09%09call(%5B%22nsenter%22, %22-t%22, str(pid), %22-n%22, %22java%22, %22-jar%22, %22/opt/cisco/packet_dumper/packet-dumper-0.0.1-SNAPSHOT.jar%22, %22--kafka.bootstrap-servers=test-machine.il.nds.com:80%22, %22--spring.profiles.active=kafka,vm%22, %22--kafkaConnector.logMode=true%22, %22--pcap.devicePrefix=eth%22%5D)%0A%09%09%09%09#print (pid, p.name(), con)

add support to run dumper on all processes that have a connection in LISTEN state