[CentOS] Data consumption (external connections only)

Sun Feb 26 22:18:11 UTC 2012
John R Pierce <pierce at hogranch.com>

On 02/26/12 12:34 PM, John R Pierce wrote:
> use some iptables rules to select the specific traffic you want to
> monitor, and view the packet and byte counts via iptables -L -vn

to expand on this, I'd probably write a perl or python script that ran 
the iptables -vnL command, and parses the output, and store the values 
in a file or sql database along with a timestamp.   If all your iptables 
sampling rules are in the INPUT table, you can restrict the output with 
`iptables -vnL INPUT`...   this script could feed the data to cacti or 
another rrdtool/mrtg style monitoring system.

.

-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast