[squid-users] Local port number logging woes

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Jan 21 18:00:47 UTC 2015


Hi,

I'm using cascaded/hierarchical Squid instances, one per machine. To get
the ability to correlate access.log entries between instances, I have
extended the default squid log format by %>p and %<lp .
For correlation, I use the following two sets of information:
The parent proxy uses "URL", "timestamp", "client source port".
The child proxy uses "URL", "timestamp", "local port number of the last
server or peer connection".
Even with some slight timing variations due to caching/lookups/network,
the child proxy local port number of the last peer connection and the
parent proxy client source port help tremendously matching those entries
against each other.

This works great except for one oddity: Quite a few Squid log entries of
the child proxy have "0" as local port number of the last server or peer
connection. I have absolutely no idea why that would be the case. AFAICS
cached entries have "-" as local port number and that's fine because it
means there was no associated parent proxy connection.

Am I doing something wrong? Are there any cases where the log format
code %<lp would legitimately yield 0?

Regards,
Carl-Daniel


More information about the squid-users mailing list