Revision history for MonitoringT2TrafficWithIptraf
Revision [3734]
Last edited on 2016-05-30 22:49:37 by StephanJ [Replaces old-style internal links with new pipe-split links.]Additions:
<<Traffic stats for 66.244.95.20 available [[gopher://pongonova.org/1/tier2_stats | here]].<<::c::
1. Download a copy of ##iptraf## [[http://iptraf.seul.org/ | here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
1. Download a copy of ##iptraf## [[http://iptraf.seul.org/ | here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
Deletions:
1. Download a copy of ##iptraf## [[http://iptraf.seul.org/ here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
Revision [2561]
Edited on 2011-08-05 16:55:32 by StephanJ [Replaces old-style internal links with new pipe-split links.]Additions:
my $ip = "ns2.ns.stejau.de";
my $date;
my $filename;
$date = "today";
$filename = "/var/log/iptraf/tcp_udp_services-eth0.log";
else
$date = $ARGV[0];
$filename = $filename_prefix.$date.$filename_suffix;
if(!-f $filename)
die "What!? How i am supposed to read a nonexistent file? FOOL!\n";
open(my $file, "<", $filename) or die "Can't open $filename for reading!";
while(<$file>)
my $throughput;
my $line = <$file>;
$line = <$file>;
close($file);
my @vals = (1E3, 5*1E3, 1E4, 5*1E4, 1E5, 5*1E5, 1E6, 5*1E6, 1E7,
######################################################################ÂÂ#
# each interval.
return(join( "\n", reverse( @Rows ), sprintf("%".$leftMargin."s", '') . ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . sprintf("%".$leftMargin."s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n",'', '12am','2am','4am','6am','8am','10am','12pm','2pm','4pm','6pm','8pm','10pm'), ' ' x ($periods/3) . "Network traffic for $ip Date:" . $date, "\n"));
$exp == 3 && do{ return $m."K"; };
$exp == 6 && do{ return $m."M"; };
my $date;
my $filename;
$date = "today";
$filename = "/var/log/iptraf/tcp_udp_services-eth0.log";
else
$date = $ARGV[0];
$filename = $filename_prefix.$date.$filename_suffix;
if(!-f $filename)
die "What!? How i am supposed to read a nonexistent file? FOOL!\n";
open(my $file, "<", $filename) or die "Can't open $filename for reading!";
while(<$file>)
my $throughput;
my $line = <$file>;
$line = <$file>;
close($file);
my @vals = (1E3, 5*1E3, 1E4, 5*1E4, 1E5, 5*1E5, 1E6, 5*1E6, 1E7,
######################################################################ÂÂ#
# each interval.
return(join( "\n", reverse( @Rows ), sprintf("%".$leftMargin."s", '') . ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . sprintf("%".$leftMargin."s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n",'', '12am','2am','4am','6am','8am','10am','12pm','2pm','4pm','6pm','8pm','10pm'), ' ' x ($periods/3) . "Network traffic for $ip Date:" . $date, "\n"));
$exp == 3 && do{ return $m."K"; };
$exp == 6 && do{ return $m."M"; };
Deletions:
die;
}
my $date = $ARGV[0];
my $filename = $filename_prefix.$date.$filename_suffix;
open(IN, "<$filename") or die "Can't open $filename for reading!";
while(<IN>)
my $throughput;
my $line = <IN>;
$line = <IN>;
}
my @vals = (1E3, 5*1E3, 1E4, 5*1E4, 1E5, 5*1E5, 1E6, 5*1E6, 1E7,
######################################################################Â#
# each interval.
return(join( "\n", reverse( @Rows ), sprintf("%".$leftMargin."s", '') . ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . sprintf("%".$leftMargin."s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n",'', '12am','2am','4am','6am','8am','10am','12pm','2pm','4pm','6pm','8pm','10pm'), ' ' x ($periods/3) . "Network traffic for 66.244.95.20 Date:" . $date, "\n"));
use POSIX;
$exp == 3 && do{ return $m."K"; };
$exp == 6 && do{ return $m."M"; };
use POSIX;
Additions:
my $filename_prefix = "/var/log/iptraf/archives/tcp_udp_services-eth0-";
my $minValue = 0.1;
my $leftMargin = 11;
while(defined($line) && $line !~ /TCP\/UDP service monitor stopped/)
my $res = $count =~ /^.*?([\d\.]+)\s+kbits\/s/;
$throughput += $1 if($res);
$val = $minValue if($val <= 0);
# Label every other row and include legend for Y-axis
if($Row > 0 && $Row < $height && ($Row % ($height/2) == 0))
$Rows[$Row] = sprintf("%-".$leftMargin."s%" . ($indent - 1) ."s ", 'kbits/s', &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
elsif($Row % 2)
$Rows[$Row] = sprintf("%".$leftMargin."s%" . ($indent - 1) ."s ", '', &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
$Rows[$Row] = sprintf("%".$leftMargin."s%" . ($indent - 1) ."s ", '', &genPrefix(pow(10, $Row/2) * $factor)) . '_' x $periods;
substr($Rows[$Row], $Period + $leftMargin + $indent, 1) = '|';
return(join( "\n", reverse( @Rows ), sprintf("%".$leftMargin."s", '') . ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . sprintf("%".$leftMargin."s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n",'', '12am','2am','4am','6am','8am','10am','12pm','2pm','4pm','6pm','8pm','10pm'), ' ' x ($periods/3) . "Network traffic for 66.244.95.20 Date:" . $date, "\n"));
my $minValue = 0.1;
my $leftMargin = 11;
while(defined($line) && $line !~ /TCP\/UDP service monitor stopped/)
my $res = $count =~ /^.*?([\d\.]+)\s+kbits\/s/;
$throughput += $1 if($res);
$val = $minValue if($val <= 0);
# Label every other row and include legend for Y-axis
if($Row > 0 && $Row < $height && ($Row % ($height/2) == 0))
$Rows[$Row] = sprintf("%-".$leftMargin."s%" . ($indent - 1) ."s ", 'kbits/s', &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
elsif($Row % 2)
$Rows[$Row] = sprintf("%".$leftMargin."s%" . ($indent - 1) ."s ", '', &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
$Rows[$Row] = sprintf("%".$leftMargin."s%" . ($indent - 1) ."s ", '', &genPrefix(pow(10, $Row/2) * $factor)) . '_' x $periods;
substr($Rows[$Row], $Period + $leftMargin + $indent, 1) = '|';
return(join( "\n", reverse( @Rows ), sprintf("%".$leftMargin."s", '') . ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . sprintf("%".$leftMargin."s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n",'', '12am','2am','4am','6am','8am','10am','12pm','2pm','4pm','6pm','8pm','10pm'), ' ' x ($periods/3) . "Network traffic for 66.244.95.20 Date:" . $date, "\n"));
Deletions:
while($line !~ /TCP\/UDP service monitor stopped/)
$count =~ /.*?([\d\.]+)\s+kbits\/s/;
$throughput += $1;
$val = 1 if($val <= 0);
# Label Every Other Row
if($Row % 2)
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . '_' x $periods;
substr($Rows[$Row], $Period + $indent, 1) = '|';
return(join( "\n", reverse( @Rows ), ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . '12am 2am 4am 6am 8am 10am 12pm 2pm 4pm 6pm 8pm 10pm')."\n");
No Differences
Additions:
<<Traffic stats for 66.244.95.20 available [[gopher://pongonova.org/1/tier2_stats here]].<<::c::
Additions:
1. Download a copy of ##iptraf## [[http://iptraf.seul.org/ here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
2. Copy the following code into a new file. Be sure to make it executable, and check the ## #! /usr/bin/perl ## line as your perl interpreter might be installed in a different place.
3. Set up a cronjob to run iptraf on 15-minute intervals. (I also added another cronjob to archive each day's log to make it easier to parse.) You should not have to change the logfile names, but if you do, you'll need to modify the perl script above.
4. Run the perl script against your archived logs:
2. Copy the following code into a new file. Be sure to make it executable, and check the ## #! /usr/bin/perl ## line as your perl interpreter might be installed in a different place.
3. Set up a cronjob to run iptraf on 15-minute intervals. (I also added another cronjob to archive each day's log to make it easier to parse.) You should not have to change the logfile names, but if you do, you'll need to modify the perl script above.
4. Run the perl script against your archived logs:
Deletions:
~2) Copy the following code into a new file. Be sure to make it executable, and check the ## #! /usr/bin/perl ## line as your perl interpreter might be installed in a different place.
~3) Set up a cronjob to run iptraf on 15-minute intervals. (I also added another cronjob to archive each day's log to make it easier to parse.) You should not have to change the logfile names, but if you do, you'll need to modify the perl script above.
~4) Run the perl script against your archived logs:
Additions:
The topmost bar is //greater than or equal to// the row value, but //less than// the next row value. This made more sense to me due to the lack of details that's available on an ASCII-based graph.
===How to implement===
<<These instructions are for a *nix-based system<<::c::
~1) Download a copy of ##iptraf## [[http://iptraf.seul.org/ here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
~2) Copy the following code into a new file. Be sure to make it executable, and check the ## #! /usr/bin/perl ## line as your perl interpreter might be installed in a different place.
%%(perl)
#!/usr/bin/perl
#
# parseDailyIptrafLogs.pl - Parse daily iptraf logs starting from
# 00:00 and ending 23:59 and plot on a semilog graph. This
# script is compatible with logs generated by the following
# invocation:
#
# /usr/local/bin/iptraf -s eth0 -t 1 -B
#
# Credits: Thanks to an "anonymous monk" and NateTut for a
# starting point: http://www.perlmonks.org/?node_id=336907
#
# This software is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Author: Brian Koontz <brian@opennicproject.org>
#
#####################################################################
use strict;
use warnings;
use POSIX;
### Globals ###
my $filename_prefix = "tcp_udp_services-eth0-";
my $filename_suffix = ".log";
my $interval = 15;
# Graphing parameters...probably best to test first before
# modifying!
my $MAX = 9;
my $height = 14;
my $indent = 7;
my $periods = 96;
# Scaling factor (i.e., 1000 starts scale at 1K)
my $factor = 1;
### End globals ###
if($#ARGV < 0)
{
print "Usage: parseDailyIptrafLogs.pl 20110701\n";
die;
}
my $date = $ARGV[0];
my $filename = $filename_prefix.$date.$filename_suffix;
open(IN, "<$filename") or die "Can't open $filename for reading!";
# Populate possibly sparse array with indices calculated as
# follows:
#
# $idx = hour * 60 + min
my @kbps;
while(<IN>)
{
if(!/^.*\s+(\d+:\d+:\d+)\s+.*TCP\/UDP service monitor started/)
{
next;
}
else
{
my $ts = $1;
my($hour, $min, $sec) = split(/:/, $ts);
my $throughput;
my $line = <IN>;
while($line !~ /TCP\/UDP service monitor stopped/)
{
if($line =~ /^(UDP\/53|TCP\/53)(.*)/)
{
my($count, $dummy) = split(/;/, $2);
$count =~ /.*?([\d\.]+)\s+kbits\/s/;
$throughput += $1;
}
$line = <IN>;
next;
}
$kbps[$hour*60+$min] = $throughput;
$throughput = 0;
}
}
=pod
# Dump it all!
for(my $i=0; $i<=24*60+59; ++$i)
{
print $kbps[$i]." " if(defined($kbps[$i]));
}
=cut
# More useful: Cull the data every $interval, create a new array
# and pass it to the graphing routine
my @data;
for(my $i=0; $i<=24*60+59; ++$i)
{
if($i%$interval == 0)
{
if(defined($kbps[$i]))
{
$data[$i/$interval] = $kbps[$i];
}
else
{
$data[$i/$interval] = 0;
}
}
}
=pod
my @data;
my $Element = 0;
my $count = $height/$periods;
my @vals = (1E3, 5*1E3, 1E4, 5*1E4, 1E5, 5*1E5, 1E6, 5*1E6, 1E7,
5*1E7, 1E8, 5*1E8, 1E9, 5*1E9, 1E10);
while($Element < $periods)
{
$data[$Element] = $vals[$Element%15];
$Element++;
}
=cut
=pod
while($Element < $periods)
{
# $data[$Element] = $Element;
$data[$Element] = pow(10, (rand($MAX)));
$Element++;
}
=cut
print(ASCII_SemiLogGraph($height, $indent, $periods, @data));
######################################################################Â#
# Divide 24 hours into intervals of $period minutes. Pass in an
# array of $period elements that represents some parameter for
# each interval.
sub ASCII_SemiLogGraph
{
my ($height, $indent, $periods, @data) = @_;
# Check for zeroes
foreach my $val(@data)
{
$val = 1 if($val <= 0);
}
my $HighestValue = 0;
my @Rows = ();
#
# Find the Top Value
#
for my $Period (0 .. $periods - 1)
{
$HighestValue = $HighestValue > ($data[$Period]) ? $HighestValue : $data[$Period];
}
#
# Calculate Scale
#
#
#my $Scale = &yCoord($HighestValue) > $height ? ( &yCoord($HighestValue) / $height ) : 1;
#
# Do Each Row
#
for(my $Row=0; $Row<=$height; ++$Row)
{
#
# Label Every Other Row
#
if($Row % 2)
{
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
}
else
{
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . '_' x $periods;
}
for my $Period (0 .. $periods - 1)
{
#
# Determine
if (&yCoord($data[$Period]) >= $Row)
{
substr($Rows[$Row], $Period + $indent, 1) = '|';
}
}
}
return(join( "\n", reverse( @Rows ), ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . '12am 2am 4am 6am 8am 10am 12pm 2pm 4pm 6pm 8pm 10pm')."\n");
} # end sub graph
# Return SI prefixed string for $val (mantissa < $factor)
sub genPrefix
{
use POSIX;
my ($val) = @_;
my $m = $val;
my $exp = 0;
while($m >= 1000)
{
$m /= 1000;
$exp += 3;
}
$m = floor($m);
$m = 1 if($m <= 0);
SWITCH: {
$exp == 0 && do{ return "$m"; };
$exp == 3 && do{ return $m."K"; };
$exp == 6 && do{ return $m."M"; };
$exp == 9 && do{ return $m."G"; };
}
}
# Return y-coord
sub yCoord
{
use POSIX;
my ($val) = @_;
my $ret = floor(log10($val/$factor) * 2);
return $ret;
}
%%
~3) Set up a cronjob to run iptraf on 15-minute intervals. (I also added another cronjob to archive each day's log to make it easier to parse.) You should not have to change the logfile names, but if you do, you'll need to modify the perl script above.
%%
# Run iptraf logs every 15 minutes for 1 minute
*/15 * * * * /usr/local/bin/iptraf -s eth0 -t 1 -B
# Copy iptraf log each day
58 23 * * * /bin/mv /var/log/iptraf/tcp_udp_services-eth0.log /var/log/iptraf/archives/tcp_udp_services-eth0-`/bin/date +\%Y\%m\%d`.log
%%
~4) Run the perl script against your archived logs:
%%
parseDailyIptrafLogs 20110701
%%
===How to implement===
<<These instructions are for a *nix-based system<<::c::
~1) Download a copy of ##iptraf## [[http://iptraf.seul.org/ here]], compile and install (or use your favorite package manager to install it). ''Note that ##iptraf## hasn't been updated in several years, so it seems to have some troubles compiling on "modern" *nix systems. If you are trying to compile this and you get "redefined" errors, e-mail me and I'll tell you what I had to do to get this to work.''
~2) Copy the following code into a new file. Be sure to make it executable, and check the ## #! /usr/bin/perl ## line as your perl interpreter might be installed in a different place.
%%(perl)
#!/usr/bin/perl
#
# parseDailyIptrafLogs.pl - Parse daily iptraf logs starting from
# 00:00 and ending 23:59 and plot on a semilog graph. This
# script is compatible with logs generated by the following
# invocation:
#
# /usr/local/bin/iptraf -s eth0 -t 1 -B
#
# Credits: Thanks to an "anonymous monk" and NateTut for a
# starting point: http://www.perlmonks.org/?node_id=336907
#
# This software is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Author: Brian Koontz <brian@opennicproject.org>
#
#####################################################################
use strict;
use warnings;
use POSIX;
### Globals ###
my $filename_prefix = "tcp_udp_services-eth0-";
my $filename_suffix = ".log";
my $interval = 15;
# Graphing parameters...probably best to test first before
# modifying!
my $MAX = 9;
my $height = 14;
my $indent = 7;
my $periods = 96;
# Scaling factor (i.e., 1000 starts scale at 1K)
my $factor = 1;
### End globals ###
if($#ARGV < 0)
{
print "Usage: parseDailyIptrafLogs.pl 20110701\n";
die;
}
my $date = $ARGV[0];
my $filename = $filename_prefix.$date.$filename_suffix;
open(IN, "<$filename") or die "Can't open $filename for reading!";
# Populate possibly sparse array with indices calculated as
# follows:
#
# $idx = hour * 60 + min
my @kbps;
while(<IN>)
{
if(!/^.*\s+(\d+:\d+:\d+)\s+.*TCP\/UDP service monitor started/)
{
next;
}
else
{
my $ts = $1;
my($hour, $min, $sec) = split(/:/, $ts);
my $throughput;
my $line = <IN>;
while($line !~ /TCP\/UDP service monitor stopped/)
{
if($line =~ /^(UDP\/53|TCP\/53)(.*)/)
{
my($count, $dummy) = split(/;/, $2);
$count =~ /.*?([\d\.]+)\s+kbits\/s/;
$throughput += $1;
}
$line = <IN>;
next;
}
$kbps[$hour*60+$min] = $throughput;
$throughput = 0;
}
}
=pod
# Dump it all!
for(my $i=0; $i<=24*60+59; ++$i)
{
print $kbps[$i]." " if(defined($kbps[$i]));
}
=cut
# More useful: Cull the data every $interval, create a new array
# and pass it to the graphing routine
my @data;
for(my $i=0; $i<=24*60+59; ++$i)
{
if($i%$interval == 0)
{
if(defined($kbps[$i]))
{
$data[$i/$interval] = $kbps[$i];
}
else
{
$data[$i/$interval] = 0;
}
}
}
=pod
my @data;
my $Element = 0;
my $count = $height/$periods;
my @vals = (1E3, 5*1E3, 1E4, 5*1E4, 1E5, 5*1E5, 1E6, 5*1E6, 1E7,
5*1E7, 1E8, 5*1E8, 1E9, 5*1E9, 1E10);
while($Element < $periods)
{
$data[$Element] = $vals[$Element%15];
$Element++;
}
=cut
=pod
while($Element < $periods)
{
# $data[$Element] = $Element;
$data[$Element] = pow(10, (rand($MAX)));
$Element++;
}
=cut
print(ASCII_SemiLogGraph($height, $indent, $periods, @data));
######################################################################Â#
# Divide 24 hours into intervals of $period minutes. Pass in an
# array of $period elements that represents some parameter for
# each interval.
sub ASCII_SemiLogGraph
{
my ($height, $indent, $periods, @data) = @_;
# Check for zeroes
foreach my $val(@data)
{
$val = 1 if($val <= 0);
}
my $HighestValue = 0;
my @Rows = ();
#
# Find the Top Value
#
for my $Period (0 .. $periods - 1)
{
$HighestValue = $HighestValue > ($data[$Period]) ? $HighestValue : $data[$Period];
}
#
# Calculate Scale
#
#
#my $Scale = &yCoord($HighestValue) > $height ? ( &yCoord($HighestValue) / $height ) : 1;
#
# Do Each Row
#
for(my $Row=0; $Row<=$height; ++$Row)
{
#
# Label Every Other Row
#
if($Row % 2)
{
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . ' ' x $periods;
}
else
{
$Rows[$Row] = sprintf("%" . ($indent - 1) ."s ", &genPrefix(pow(10, $Row/2) * $factor)) . '_' x $periods;
}
for my $Period (0 .. $periods - 1)
{
#
# Determine
if (&yCoord($data[$Period]) >= $Row)
{
substr($Rows[$Row], $Period + $indent, 1) = '|';
}
}
}
return(join( "\n", reverse( @Rows ), ' Time: ' . '|^^^' x ( $periods / 4 ), ' ' x $indent . '12am 2am 4am 6am 8am 10am 12pm 2pm 4pm 6pm 8pm 10pm')."\n");
} # end sub graph
# Return SI prefixed string for $val (mantissa < $factor)
sub genPrefix
{
use POSIX;
my ($val) = @_;
my $m = $val;
my $exp = 0;
while($m >= 1000)
{
$m /= 1000;
$exp += 3;
}
$m = floor($m);
$m = 1 if($m <= 0);
SWITCH: {
$exp == 0 && do{ return "$m"; };
$exp == 3 && do{ return $m."K"; };
$exp == 6 && do{ return $m."M"; };
$exp == 9 && do{ return $m."G"; };
}
}
# Return y-coord
sub yCoord
{
use POSIX;
my ($val) = @_;
my $ret = floor(log10($val/$factor) * 2);
return $ret;
}
%%
~3) Set up a cronjob to run iptraf on 15-minute intervals. (I also added another cronjob to archive each day's log to make it easier to parse.) You should not have to change the logfile names, but if you do, you'll need to modify the perl script above.
%%
# Run iptraf logs every 15 minutes for 1 minute
*/15 * * * * /usr/local/bin/iptraf -s eth0 -t 1 -B
# Copy iptraf log each day
58 23 * * * /bin/mv /var/log/iptraf/tcp_udp_services-eth0.log /var/log/iptraf/archives/tcp_udp_services-eth0-`/bin/date +\%Y\%m\%d`.log
%%
~4) Run the perl script against your archived logs:
%%
parseDailyIptrafLogs 20110701
%%
Additions:
{{image url="http://wiki.opennic.glue/MonitoringT2TrafficWithIptraf/files.xml?action=download&file=iptraf_graph.png"}}
Deletions:
Additions:
{{img url="http://wiki.opennic.glue/MonitoringT2TrafficWithIptraf/files.xml?action=download&file=iptraf_graph.png"}}
No Differences