forked from I2P_Developers/i2p.i2p
* Console: Delete corrupt rrd file (ticket #483)
This commit is contained in:
@ -113,13 +113,14 @@ class SummaryListener implements RateSummaryListener {
|
|||||||
String baseName = rs.getName() + "." + period;
|
String baseName = rs.getName() + "." + period;
|
||||||
_name = createName(_context, baseName);
|
_name = createName(_context, baseName);
|
||||||
_eventName = createName(_context, baseName + ".events");
|
_eventName = createName(_context, baseName + ".events");
|
||||||
|
File rrdFile = null;
|
||||||
try {
|
try {
|
||||||
RrdBackendFactory factory = RrdBackendFactory.getFactory(getBackendName());
|
RrdBackendFactory factory = RrdBackendFactory.getFactory(getBackendName());
|
||||||
String rrdDefName;
|
String rrdDefName;
|
||||||
if (_isPersistent) {
|
if (_isPersistent) {
|
||||||
// generate full path for persistent RRD files
|
// generate full path for persistent RRD files
|
||||||
File rrdDir = new SecureFile(_context.getRouterDir(), RRD_DIR);
|
File rrdDir = new SecureFile(_context.getRouterDir(), RRD_DIR);
|
||||||
File rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
|
rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
|
||||||
rrdDefName = rrdFile.getAbsolutePath();
|
rrdDefName = rrdFile.getAbsolutePath();
|
||||||
if (rrdFile.exists()) {
|
if (rrdFile.exists()) {
|
||||||
_db = new RrdDb(rrdDefName, factory);
|
_db = new RrdDb(rrdDefName, factory);
|
||||||
@ -164,6 +165,9 @@ class SummaryListener implements RateSummaryListener {
|
|||||||
_log.error("Error starting RRD for stat " + baseName, oom);
|
_log.error("Error starting RRD for stat " + baseName, oom);
|
||||||
} catch (RrdException re) {
|
} catch (RrdException re) {
|
||||||
_log.error("Error starting RRD for stat " + baseName, re);
|
_log.error("Error starting RRD for stat " + baseName, re);
|
||||||
|
// corrupt file?
|
||||||
|
if (_isPersistent && rrdFile != null)
|
||||||
|
rrdFile.delete();
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
_log.error("Error starting RRD for stat " + baseName, ioe);
|
_log.error("Error starting RRD for stat " + baseName, ioe);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
2011-08-16 zzz
|
2011-08-16 zzz
|
||||||
|
* Console: Tweak logs page CSS
|
||||||
|
* Graphs: Delete corrupt rrd file (ticket #483)
|
||||||
* UPnP: Fix bug causing failure when the PC has multiple interfaces
|
* UPnP: Fix bug causing failure when the PC has multiple interfaces
|
||||||
|
|
||||||
2011-08-06 kytv
|
2011-08-06 kytv
|
||||||
|
Reference in New Issue
Block a user