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>
Fri, 30 Jul 2010 06:50:18 +0000 (16:50 +1000)
commit6549e9b01538998d51a5f72bfc569776d232b024
tree7ef49c56c983aa991bae80568ae850a2280cd82f
parentb2362cc7773bb08c7dfdaf2c87d4b59460686659
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