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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 9 Aug 2010 02:27:00 +0000 (12:27 +1000)
commit9bfd66812d3f73ae1680777983181a9fb0f31207
tree54877d36f47d28962d4bf653194d2d8cb5a3dd90
parentebed50dc9c231ab43552c52ee9ea928fa4eec068
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