diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-05-29 10:45:46 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-05-29 10:48:12 -0300 |
commit | 2bba9aefc21a4e173af3626fb5d08516e35ee47a (patch) | |
tree | 648e9378e24a80354dfaef3cc1e67da7e4d0326e | |
parent | e0c7109d869b6fbcd05d38cb3d30afa75acb724a (diff) | |
download | pfsense-2bba9aefc21a4e173af3626fb5d08516e35ee47a.zip pfsense-2bba9aefc21a4e173af3626fb5d08516e35ee47a.tar.gz |
Fixes #2979
. Change max value for traffic and packets graphs to 20GigE
. Bump config version to 9.6
. Write a config upgrade function to tune current rrd files to the new
max value
-rw-r--r-- | conf.default/config.xml | 2 | ||||
-rw-r--r-- | etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | etc/inc/rrd.inc | 6 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 27 |
4 files changed, 32 insertions, 5 deletions
diff --git a/conf.default/config.xml b/conf.default/config.xml index 3db62e4..fe622fe 100644 --- a/conf.default/config.xml +++ b/conf.default/config.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- pfSense default system configuration --> <pfsense> - <version>9.5</version> + <version>9.6</version> <lastchange></lastchange> <theme>pfsense_ng</theme> <sysctl> diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 8c9696d..84139f8 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -71,7 +71,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "9.5", + "latest_config" => "9.6", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index d92b9b1..ef6b3eb 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -261,9 +261,9 @@ function enable_rrd_graphing() { $vpnvalid = $rrdvpninterval * 2; $captiveportalvalid = $rrdcaptiveportalinterval * 2; - /* Asume GigE for now */ - $downstream = 125000000; - $upstream = 125000000; + /* Assume 2*10GigE for now */ + $downstream = 2500000000; + $upstream = 2500000000; /* read the shaper config */ read_altq_config(); diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index c17deee..da45129 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -3086,4 +3086,31 @@ function upgrade_094_to_095() { $config['interfaces'][$iface]['track6-prefix-id'] = 0; } +function upgrade_095_to_096() { + global $config, $g; + + $names = array("inpass", "outpass", "inblock", "outblock", + "inpass6", "outpass6", "inblock6", "outblock6"); + $rrddbpath = "/var/db/rrd"; + $rrdtool = "/usr/local/bin/rrdtool"; + + /* Assume 2*10GigE for now */ + $stream = 2500000000; + + /* build a list of traffic and packets databases */ + $databases = return_dir_as_array($rrddbpath, '/-(traffic|packets)\.rrd$/'); + rsort($databases); + foreach($databases as $database) { + if ($g['booting']) + echo "Update RRD database {$database}.\n"; + + $cmd = "{$rrdtool} tune {$rrddbpath}/{$database}"; + foreach ($names as $name) + $cmd .= " -a {$name}:{$stream}"; + mwexec("{$cmd} 2>&1"); + + } + enable_rrd_graphing(); +} + ?> |