Fastest / most reliable way of matching conntrack log entries to PID
Hi,
So I have a tool that uses conntrack (the library, not the tools) to retrieve a log of TCP connection creation/deletion, however it seems that there is no logging of the PID provided.
What's the most efficient way of doing that match ? I could obviously use netstat or /proc and try to do a match, but that seems ugly and prone to race conditions. Should I instead get my log from the auditd infrastructure ? Do they provide the matching PID ?
Thanks,
Hassan