Help for this page

Select Code to Download


  1. or download this
    my $key = join '|', "$month.year", $fmt_proto, $fmt_dest_ip, $fmt_dest
    +_port, $fmt_src_ip, $fmt_src_port;
    $mon_log{$key} += $fmt_drp_packets;
    
  2. or download this
    create table stuff (
        proto char(4),
    ...
    load data local infile '/blah/blah.dat' into table stuff
    
    select sum(packets) where src_ip = 1.2.3.4 and .....
    
  3. or download this
    my $current_rec = '';
    my $current_count = 0;
    ...
    
    # now print any hanging rec
    print OUTFILE $current_rec, "\t", $current_count if $rec eq $current_r
    +ec;