summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6396ef1)
-B<rrdtool> B<dump> I<filename.rrd> E<gt> I<filename.xml>
+B<rrdtool> B<dump> S<[B<--no-header>|B<-n>]> I<filename.rrd> E<gt> I<filename.xml>
-B<rrdtool> B<dump> I<filename.rrd> I<filename.xml>
+B<rrdtool> B<dump> S<[B<--no-header>|B<-n>]> I<filename.rrd> I<filename.xml>
=over 8
=item I<filename.rrd>
=over 8
=item I<filename.rrd>
The (optional) filename that you want to write the XML output to.
If not specified, the XML will be printed to stdout.
The (optional) filename that you want to write the XML output to.
If not specified, the XML will be printed to stdout.
+=item S<[B<--no-header>|B<-n>]>
+
+In rrdtool 1.3, the dump function started producing correct xml-headers.
+Unfortunately the rrdtool restore function from the 1.2 series can not
+handle these headers. With this option you can supress the creatinon of
+the xml headers.
+
fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
fputs
("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n",
fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
fputs
("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n",
- if ((argc - optind) < 2) {
+ if ((argc - optind) < 1 || (argc - optind) > 2) {
rrd_set_error("usage rrdtool %s [--no-header|-n] "
"file.rrd [file.xml]", argv[0]);
return (-1);
}
rrd_set_error("usage rrdtool %s [--no-header|-n] "
"file.rrd [file.xml]", argv[0]);
return (-1);
}
- if (argc == 3) {
- rc = rrd_dump_opt_r(argv[1], argv[2],opt_noheader);
+ if ((argc - optind) == 2) {
+ rc = rrd_dump_opt_r(argv[optind], argv[optind+1],opt_noheader);
- rc = rrd_dump_opt_r(argv[1], NULL,opt_noheader);
+ rc = rrd_dump_opt_r(argv[optind], NULL,opt_noheader);