X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_dump.c;h=08fa87cb72130d28847f2a898da823d07ad2188a;hb=dc2cd8c65f9bd9f9892ecf6eefe9f1873bb975ee;hp=316814d349c7f62f4832594815375e7e6e2ebecd;hpb=7f30ee2ae089520606cbb7e38fab9981618771f5;p=rrdtool.git diff --git a/src/rrd_dump.c b/src/rrd_dump.c index 316814d..08fa87c 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** @@ -98,9 +98,17 @@ int rrd_dump_r( out_file = stdout; } + fputs("", out_file); + fputs + ("", + out_file); fputs("", out_file); fputs("", out_file); - fprintf(out_file, "\t %s \n", RRD_VERSION); + if (atoi(rrd.stat_head->version) <= 3) { + fprintf(out_file, "\t %s \n", RRD_VERSION3); + } else { + fprintf(out_file, "\t %s \n", RRD_VERSION); + } fprintf(out_file, "\t %lu \n", rrd.stat_head->pdp_step); #if HAVE_STRFTIME @@ -109,8 +117,8 @@ int rrd_dump_r( #else # error "Need strftime" #endif - fprintf(out_file, "\t %ld \n\n", - rrd.live_head->last_up, somestring); + fprintf(out_file, "\t %lu \n\n", + (unsigned long) rrd.live_head->last_up, somestring); for (i = 0; i < rrd.stat_head->ds_cnt; i++) { fprintf(out_file, "\t\n"); fprintf(out_file, "\t\t %s \n", rrd.ds_def[i].ds_nam); @@ -176,6 +184,7 @@ int rrd_dump_r( fprintf(out_file, "\t\t\n"); switch (cf_conv(rrd.rra_def[i].cf_nam)) { case CF_HWPREDICT: + case CF_MHWPREDICT: fprintf(out_file, "\t\t %0.10e \n", rrd.rra_def[i].par[RRA_hw_alpha].u_val); fprintf(out_file, "\t\t %0.10e \n", @@ -192,6 +201,12 @@ int rrd_dump_r( fprintf(out_file, "\t\t %lu \n", rrd.rra_def[i].par[RRA_seasonal_smooth_idx].u_cnt); + if (atoi(rrd.stat_head->version) >= 4) { + fprintf(out_file, + "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_seasonal_smoothing_window]. + u_val); + } fprintf(out_file, "\t\t %lu \n", rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); @@ -255,6 +270,7 @@ int rrd_dump_r( } switch (cf_conv(rrd.rra_def[i].cf_nam)) { case CF_HWPREDICT: + case CF_MHWPREDICT: value = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_hw_intercept].u_val;