| Server IP : 82.208.35.60 / Your IP : 216.73.217.116 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/sysutils/backuppc/files/ |
Upload File : |
--- bin/BackupPC.orig 2011-04-25 07:31:54.000000000 +0400
+++ bin/BackupPC 2013-02-17 16:51:18.000000000 +0400
@@ -1198,6 +1198,47 @@
$Info{"${p}FileRepMax"},
$Info{"${p}FileLinkMax"}, $Info{"${p}DirCnt"});
}
+
+ #
+ # RRDTool Graphing stuff
+ #
+ if ( -x "$BinDir/rrdtool" ) {
+ my $date = time() + (24 * 3600);
+ if ( ! -f "$LogDir/pool.rrd" ) {
+ system("$BinDir/rrdtool create $LogDir/pool.rrd"
+ . " --step 86400"
+ . " DS:ckb:GAUGE:172800:0:U"
+ . " DS:tps:GAUGE:172800:0:U"
+ . " RRA:AVERAGE:0.5:1:1400"
+ );
+ }
+
+ #
+ # Generate size totals prior to poolng and compression
+ #
+ my $sizeTot;
+ foreach my $host ( sort(keys(%{$bpc->HostInfoRead()})) ) {
+ my @Backups = $bpc->BackupInfoRead($host);
+ for ( my $i = 0 ; $i < @Backups ; $i++ ) {
+ $sizeTot += $Backups[$i]{size};
+ }
+ }
+
+ $sizeTot = $sizeTot / 1024;
+
+ system("$BinDir/rrdtool update $LogDir/pool.rrd"
+ . " $date:"
+ . ( $Info{"cpoolKb"} + $Info{"poolKb"} )
+ . ":$sizeTot"
+ );
+
+ printf(LOG "%sRRD Data: %s:%f:%f\n",
+ $bpc->timeStamp,
+ $date,
+ $Info{"cpoolKb"} + $Info{"poolKb"},
+ $sizeTot);
+ }
+
}
} else {
$CmdJob = "";