2 # reads stats and uptime for ip-filter for mrtg
3 # ron@rosie.18james.com, 2 Jan 2000
5 my $firewall = "IP Filter v3.3.3";
6 my($in_pkts,$out_pkts) = (0,0);
8 open(FW
, "/sbin/ipfstat -hi|") || die "cannot open ipfstat -hi\n";
10 $in_pkts += $1 if (/^(\d+)\s+pass\s+in\s+quick.*group\s+1\d0/);
13 open(FW
, "/sbin/ipfstat -ho|") || die "cannot open ipfstat -ho\n";
15 $out_pkts += $1 if (/^(\d+)\s+pass\s+out\s+quick.*group\s+1\d0/);
19 my $uptime = `/usr/bin/uptime`;
20 $uptime =~ /^\s+(\d{1,2}:\d{2}..)\s+up\s+(\d+)\s+(......),/;