Optimise 61.nfstickle to write the tickles more efficiently.
authorMartin Schwenke <martin@meltin.net>
Mon, 26 Jul 2010 06:22:59 +0000 (16:22 +1000)
committerMartin Schwenke <martin@meltin.net>
Mon, 26 Jul 2010 06:22:59 +0000 (16:22 +1000)
commit53e6b9d1ba379ae27433871d1741c894cd71ccc1
tree640b178c93fa72a6981d1108c9fbdad5ba638fda
parenta476a56da2219c1047081032595c045f65f8ad3f
Optimise 61.nfstickle to write the tickles more efficiently.

Currently the file for each IP address is reopened to append the
details of each source socket.

This optimisation puts all the logic into awk, including the matching
of output lines from netstat.  The source sockets for each for each
destination IP are written into an array entry and then each array
entry is written to the corresponding file in a single operation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/61.nfstickle