mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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
This commit is contained in:
parent
e0c7109d86
commit
2bba9aefc2
@ -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>
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user