> I'd rather like to have this information to be gathered at runtime within > the kernel, where one could read out the current hash occupation via /proc > or some ioctl.
OK, that's what I wanted to hear :-) Actually, the interesting statistics for a hash are not that large, and all aggregate: - bucket occupation: number of used buckets, vs. number of all buckets - average chain length over all buckets - average chain length over the used buckets - counting of a classification of the chain lengths: - number of 0-entry buckets - number of 1-entry buckets - number of 2-entry buckets - number of 4-entry buckets - number of 8-entry buckets - number of 16-entry buckets - number of more-than-16-entry buckets That's 10 values, and will at most double when I think more about it. I propose to gather these stats on the fly, and simply printk() them at a chosen interval: echo 300 >/proc/net/ip_conntrack_showstat would generate one printk() every 300 seconds. Echoing 0 would disable the statistics gathering altogether. I think I can hack this up, today. Having the flu must be good for something... later Patrick