X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_dump.c;h=d8aa83aa58d869ed6cac08bb35026a1558fc9331;hb=a6d79528b4812e8eb3927dba3cdd42e6ca51b287;hp=4145eaa976981cbcc0632c7b011057c9c5d1fffd;hpb=734468bcc23497c7eba0deba87c92aa219fd46d1;p=rrdtool.git diff --git a/src/rrd_dump.c b/src/rrd_dump.c index 4145eaa..d8aa83a 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.17 Copyright by Tobi Oetiker, 1997-2006 + * RRDtool 1.2.22 Copyright by Tobi Oetiker, 1997-2007 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** @@ -115,39 +115,39 @@ rrd_dump_r(const char *filename, char *outname) fprintf(out_file, "\t %ld \n\n", rrd.live_head->last_up,somestring); for(i=0;ids_cnt;i++){ - fprintf(out_file, "\t\n"); - fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].ds_nam); - fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].dst); - if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) { - fprintf(out_file, "\t\t %lu \n",rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); - if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_min_val].u_val); - } - if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_max_val].u_val); - } - } else { /* DST_CDEF */ - char *str; - rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),rrd.ds_def,&str); - fprintf(out_file, "\t\t %s \n", str); - free(str); - } - fprintf(out_file, "\n\t\t\n"); - fprintf(out_file, "\t\t %s \n",rrd.pdp_prep[i].last_ds); - if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.pdp_prep[i].scratch[PDP_val].u_val); - } - fprintf(out_file, "\t\t %lu \n", - rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt); + fprintf(out_file, "\t\n"); + fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].ds_nam); + fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].dst); + if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) { + fprintf(out_file, "\t\t %lu \n",rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); + if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)){ + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_min_val].u_val); + } + if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)){ + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_max_val].u_val); + } + } else { /* DST_CDEF */ + char *str=NULL; + rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),rrd.ds_def,&str); + fprintf(out_file, "\t\t %s \n", str); + free(str); + } + fprintf(out_file, "\n\t\t\n"); + fprintf(out_file, "\t\t %s \n",rrd.pdp_prep[i].last_ds); + if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)){ + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n",rrd.pdp_prep[i].scratch[PDP_val].u_val); + } + fprintf(out_file, "\t\t %lu \n", + rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt); - fprintf(out_file, "\t\n\n"); - } + fprintf(out_file, "\t\n\n"); + } fputs("", out_file);