[patch][4.0.0alpha3] BackupPC_rrdUpdate lies about successful update
Alexander Moisseev <[email protected]> Mon, 09 Dec 2013 11:25:04 +0400
| Newsgroups | gmane.comp.sysutils.backup.backuppc.devel |
|---|---|
| Message-ID | <[email protected]> |
BackupPC_rrdUpdate reports successful update even though update failed.
2013-12-09 09:22:45 Running BackupPC_rrdUpdate (pid=1029)
2013-12-09 09:22:45 admin-1 : ERROR: /var/log/BackupPC/poolUsage.rrd: illegal attempt to update using time 1386633600 when last update time is 1386633600 (minimum one second step)
2013-12-09 09:22:45 admin-1 : 2013-12-09 09:22:45 RRD updated: date 1386633600; cpoolKb 0.000000; total 128744.500000; poolKb 0.000000; pool4Kb 0.000000; cpool4Kb 4632.000000
2013-12-09 09:22:47 Finished admin-1 (BackupPC_rrdUpdate)
--- ./BackupPC_rrdUpdate.orig<->2013-12-04 01:10:56.000000000 +0400
+++ ./BackupPC_rrdUpdate<------>2013-12-09 10:51:33.000000000 +0400
@@ -109,7 +109,7 @@
}
$sizeTot = $sizeTot / 1024;
.
- print $bpc->cmdSystemOrEval(
+ if ( $err = $bpc->cmdSystemOrEval(
[
$Conf{RrdToolPath},
"update", $RRDFile,
@@ -119,13 +119,17 @@
. $Info{"poolKb"} . ":"
. $Info{"pool4Kb"} . ":"
. $Info{"cpool4Kb"}
- ]);
- printf("%sRRD updated:"
+ ]) ) {
+ print "$err";
+ }
+ else {
+ printf("%sRRD updated:"
. " date %s; cpoolKb %f; total %f;"
. " poolKb %f; pool4Kb %f; cpool4Kb %f\n",
$bpc->timeStamp,
$NowRnd1, $Info{"cpoolKb"}, $sizeTot,
$Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"});
+ }
}
.
#
--
Alexander
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-devel mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/