Skip to contentSkip to conversation

Fastest / most reliable way of matching conntrack log entries to PID

DISCUSSION Hassan Sultan 1 participant 1 message Jan 13, 2015

lore
Share & tools
lore
#0 lore raw

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