Revision 1005d4bf
Added by Seth Mos over 13 years ago
etc/inc/upgrade_config.inc | ||
---|---|---|
1979 | 1979 |
mwexec("$rrdtool tune {$rrddbpath}{$database} -r roundtrip:delay 2>&1"); |
1980 | 1980 |
|
1981 | 1981 |
dump_rrd_to_xml("{$rrddbpath}/{$database}", "{$g['tmp_path']}/{$xmldump}"); |
1982 |
$rrdoldxml = file_get_contents("{$g['tmp_path']}/{$xmldump}"); |
|
1983 |
$rrdold = xml2array($rrdoldxml, 1, "tag"); |
|
1982 |
$rrdold = xml2array(file_get_contents("{$g['tmp_path']}/{$xmldump}"), 1, "tag"); |
|
1984 | 1983 |
$rrdold = $rrdold['rrd']; |
1985 | 1984 |
|
1986 | 1985 |
$i = 0; |
... | ... | |
1998 | 1997 |
file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", $rrdxml); |
1999 | 1998 |
mwexec("$rrdtool restore -f {$g['tmp_path']}/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1"); |
2000 | 1999 |
|
2000 |
unset($rrdold); |
|
2001 |
unset($rrdxmlarray); |
|
2001 | 2002 |
} |
2002 | 2003 |
/* let apinger recreate required files */ |
2003 | 2004 |
setup_gateways_monitor(); |
... | ... | |
2036 | 2037 |
/* create temporary xml from new RRD */ |
2037 | 2038 |
dump_rrd_to_xml("{$g['tmp_path']}/{$databasetmp}", "{$g['tmp_path']}/{$xmldumptmp}"); |
2038 | 2039 |
|
2039 |
$rrdoldxml = file_get_contents("{$g['tmp_path']}/{$xmldump}"); |
|
2040 |
$rrdold = xml2array($rrdoldxml, 1, "tag"); |
|
2040 |
$rrdold = xml2array(file_get_contents("{$g['tmp_path']}/{$xmldump}"), 1, "tag"); |
|
2041 | 2041 |
$rrdold = $rrdold['rrd']; |
2042 | 2042 |
|
2043 |
$rrdnewxml = file_get_contents("{$g['tmp_path']}/{$xmldumptmp}"); |
|
2044 |
$rrdnew = xml2array($rrdnewxml, 1, "tag"); |
|
2043 |
$rrdnew = xml2array(file_get_contents("{$g['tmp_path']}/{$xmldumptmp}"), 1, "tag"); |
|
2045 | 2044 |
$rrdnew = $rrdnew['rrd']; |
2046 | 2045 |
|
2047 | 2046 |
/* remove any MAX RRA's. Not needed for traffic. */ |
... | ... | |
2058 | 2057 |
file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", $rrdxml); |
2059 | 2058 |
mwexec("$rrdtool restore -f {$g['tmp_path']}/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1"); |
2060 | 2059 |
|
2060 |
unset($rrdold); |
|
2061 |
unset($rrdnew); |
|
2062 |
unset($rrdxmlarray); |
|
2061 | 2063 |
} |
2062 | 2064 |
enable_rrd_graphing(); |
2063 | 2065 |
/* Let's save the RRD graphs after we run enable RRD graphing */ |
Also available in: Unified diff
Add the OOM memory restructuring fix from Ticket #1758 into mainline for nanoBSD upgrades.