Re: [rrd-users] RRD File Not Being Created (linux, RRDTool 1-1.3.1, rrdlib, c++)
On Tue, Jul 29, 2008 at 05:10:12PM -0700, Robert Easton wrote: I fixed the problem. After looking at rrd_tool.c I realised that it was including the first parameter of create. So, I placed create in to the first array position for opts and it worked. Sorry for troubling you all. Hi. Oh and BTW you should NULL terminate your array. So long, Andreas. -- Dipl.-Ing. Andreas Maus science+computing ag System Administration Hagellocher Weg 73 tel.: +49 7071 9457 671 72070 Tuebingen, Germany fax: +49 7071 9457 411 www.science-computing.de pgp3zeeqpJdb9.pgp Description: PGP signature ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
[rrd-users] RRD File Not Being Created (linux, RRDTool 1-1.3.1, rrdlib, c++)
Hi, When I call rrd_create in my program it returns 0 and there is no error set (rrd_get_error()). Yet the rrd files are not created. I have checked folder permissions and they are fine. I have run the rrdtool create command from command line, using the same parameters and that works fine. Also, I had to move the DS parameter to the last position in the array. When I had it before the RRA parameters rrd_get_error() returned that there was not a data source declared. That is strange also. So, why is my c++ app not creating any files and why did I have to move the DS to the last array position? This code snippet shows what I am doing: char start_time_s[50]; long start_time; int ret; start_time = (long)time (NULL); sprintf (start_time_s, %ld, start_time); char *opts[] = { _rrd_file_path, --start, start_time_s, --step, 60, RRA:AVERAGE:0.5:1:10080, RRA:MIN:0.5:1:10080, RRA:MAX:0.5:1:10080, RRA:LAST:0.5:1:10800, RRA:AVERAGE:0.5:60:4464, RRA:MIN:0.5:60:4464, RRA:MAX:0.5:60:4464, RRA:LAST:0.5:60:4464, RRA:AVERAGE:0.5:1440:365, RRA:MIN:0.5:1440:365, RRA:MAX:0.5:1440:365, RRA:LAST:0.5:1440:365, DS:sensor:GAUGE:120:U:U }; ret = rrd_create( 18, opts); if (ret == -1) stdout rrd_get_error(); Cheers, Mark -- View this message in context: http://www.nabble.com/RRD-File-Not-Being-Created-%28linux%2C-RRDTool-1-1.3.1%2C-rrdlib%2C-c%2B%2B%29-tp18723481p18723481.html Sent from the RRDTool - User mailing list archive at Nabble.com. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
[rrd-users] RRD File Not Being Created (linux, RRDTool 1-1.3.1, rrdlib, c++)
Hi, When I call rrd_create in my program it returns 0 and there is no error set (rrd_get_error()). Yet the rrd files are not created. I have checked folder permissions and they are fine. I have run the rrdtool create command from command line, using the same parameters and that works fine. Also, I had to move the DS parameter to the last position in the array. When I had it before the RRA parameters rrd_get_error() returned that there was not a data source declared. That is strange also. So, why is my c++ app not creating any files and why did I have to move the DS to the last array position? This code snippet shows what I am doing: char start_time_s[50]; long start_time; int ret; start_time = (long)time (NULL); sprintf (start_time_s, %ld, start_time); char *opts[] = { _rrd_file_path, --start, start_time_s, --step, 60, RRA:AVERAGE:0.5:1:10080, RRA:MIN:0.5:1:10080, RRA:MAX:0.5:1:10080, RRA:LAST:0.5:1:10800, RRA:AVERAGE:0.5:60:4464, RRA:MIN:0.5:60:4464, RRA:MAX:0.5:60:4464, RRA:LAST:0.5:60:4464, RRA:AVERAGE:0.5:1440:365, RRA:MIN:0.5:1440:365, RRA:MAX:0.5:1440:365, RRA:LAST:0.5:1440:365, DS:sensor:GAUGE:120:U:U }; ret = rrd_create( 18, opts); if (ret == -1) stdout rrd_get_error(); Cheers, Mark Easton (BSc) Mobile/Embedded Linux Developer Email: [EMAIL PROTECTED] Phone: +64 7 578 7895 Mobile: +64 27 5757 409 ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD File Not Being Created (linux, RRDTool 1-1.3.1, rrdlib, c++)
I fixed the problem. After looking at rrd_tool.c I realised that it was including the first parameter of create. So, I placed create in to the first array position for opts and it worked. Sorry for troubling you all. Mark Robert Easton wrote: Hi, When I call rrd_create in my program it returns 0 and there is no error set (rrd_get_error()). Yet the rrd files are not created. I have checked folder permissions and they are fine. I have run the rrdtool create command from command line, using the same parameters and that works fine. Also, I had to move the DS parameter to the last position in the array. When I had it before the RRA parameters rrd_get_error() returned that there was not a data source declared. That is strange also. So, why is my c++ app not creating any files and why did I have to move the DS to the last array position? This code snippet shows what I am doing: char start_time_s[50]; long start_time; int ret; start_time = (long)time (NULL); sprintf (start_time_s, %ld, start_time); char *opts[] = { _rrd_file_path, --start, start_time_s, --step, 60, RRA:AVERAGE:0.5:1:10080, RRA:MIN:0.5:1:10080, RRA:MAX:0.5:1:10080, RRA:LAST:0.5:1:10800, RRA:AVERAGE:0.5:60:4464, RRA:MIN:0.5:60:4464, RRA:MAX:0.5:60:4464, RRA:LAST:0.5:60:4464, RRA:AVERAGE:0.5:1440:365, RRA:MIN:0.5:1440:365, RRA:MAX:0.5:1440:365, RRA:LAST:0.5:1440:365, DS:sensor:GAUGE:120:U:U }; ret = rrd_create( 18, opts); if (ret == -1) stdout rrd_get_error(); Cheers, Mark -- View this message in context: http://www.nabble.com/RRD-File-Not-Being-Created-%28linux%2C-RRDTool-1-1.3.1%2C-rrdlib%2C-c%2B%2B%29-tp18723481p18723730.html Sent from the RRDTool - User mailing list archive at Nabble.com. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users