diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-02-01 09:41:09 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-02-01 09:41:09 +0100 |
commit | eef5ca2e53e2c56aeae86029a3efbda6731a895c (patch) | |
tree | 130c464f7325d5269298262c97853c989080a8a9 /etc | |
parent | 41dfef338f87734930eb2bea25450057e22d237a (diff) | |
download | pfsense-eef5ca2e53e2c56aeae86029a3efbda6731a895c.zip pfsense-eef5ca2e53e2c56aeae86029a3efbda6731a895c.tar.gz |
Simplify the updaterrd.sh to reduce the amount of pfctl calls
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/rrd.inc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 7ff761f..6914b2e 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -298,10 +298,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= "\n"; $rrdupdatesh .= "# polling traffic for interface $ifname $realif IPv4/IPv6 counters \n"; $rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$traffic N:\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Pass|Out4\/Pass/ {printf \$6 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Block|Out4\/Block/ {printf \$6 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In6\/Pass|Out6\/Pass/ {printf \$6 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In6\/Block|Out6\/Block/ {printf \$6 \":\"}'|sed -e 's/.\$//'`\n"; + $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Pass|Out4\/Pass|In6\/Pass|Out6\/Pass|In4\/Block|Out4\/Block|In6\/Block|Out6\/Block/ {printf \$6 \":\"}'|sed -e 's/.\$//'`\n"; /* PACKETS, set up the rrd file */ if (!file_exists("$rrddbpath$ifname$packets")) { @@ -330,10 +327,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= "\n"; $rrdupdatesh .= "# polling packets for interface $ifname $realif \n"; $rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$packets N:\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Pass|Out4\/Pass/ {printf \$4 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Block|Out4\/Block/ {printf \$4 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In6\/Pass|Out6\/Pass/ {printf \$4 \":\"}'`\\\n"; - $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In6\/Block|Out6\/Block/ {printf \$4 \":\"}'|sed -e 's/.\$//'`\n"; + $rrdupdatesh .= "`$pfctl -vvsI -i {$realif} | awk '/In4\/Pass|Out4\/Pass|In6\/Pass|Out6\/Pass|In4\/Block|Out4\/Block|In6\/Block|Out6\/Block/ {printf \$4 \":\"}'|sed -e 's/.\$//'`\n"; /* WIRELESS, set up the rrd file */ if($config['interfaces'][$ifname]['wireless']['mode'] == "bss") { |