Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
fw.pl
Package: mrtg-2.13.2.zip [view]
Upload User: shbosideng
Upload Date: 2013-05-04
Package Size: 1555k
Code Size: 1k
Category:
SNMP
Development Platform:
C/C++
- #!/usr/local/bin/perl
- # reads stats and uptime from ip-filter for mrtg
- # ron@rosie.18james.com, 2 Jan 2000
- my $firewall = "IP Filter v3.3.3";
- my($in_pkts,$out_pkts) = (0,0);
- open(FW, "/sbin/ipfstat -hio|") || die "cannot open ipfstatn";
- while (<FW>) {
- $in_pkts += $1 if (/^(d+)s+passs+ins+quick.*groups+1d0/);
- $out_pkts += $1 if (/^(d+)s+passs+outs+quick.*groups+1d0/);
- }
- print "$in_pktsn",
- "$out_pktsn";
- my $uptime = `/usr/bin/uptime`;
- $uptime =~ /^s+(d{1,2}:d{2}..)s+ups+(d+)s+(......),/;
- print "$2 $3n",
- "$firewalln";