[rrd-users] Re: rrd question

Tobias Oetiker oetiker at ee.ethz.ch
Tue Nov 9 15:45:23 MET 1999


Today you sent me mail regarding RE: [rrd-users] Re: rrd question:

*> It seems that our compiling system on Silicon Graphics is somewhat bizar.
*> fwrite() does not work when the filedescriptor seeked back, bad fileno.
*> I made the following kludge, not nice I know, but it works in rrd_update.c:
*> 
*> 
*> #ifndef GERTJAN
*> offs=ftell(rrd_file);
*> fclose(rrd_file);
*> if ((rrd_file=fopen(argv[optind], "r+")) == NULL)
*> {       fprintf(stderr, "error: unable to open file %s\n", argv[optind]);
*>         return -1;
*> }
*> if (fseek(rrd_file, offs, SEEK_SET) != 0)
*> {       fprintf(stderr, "error: unable to fseek to offset %ld\n", offs);
*>         return -1;
*> }
*> #endif
*>  
*> if(fwrite(&(rrd.cdp_prep[iii].scratch[CDP_val].u_val),
*>                                         sizeof(rrd_value_t),1,rrd_file) !=
*> 1){
*>                                 rrd_set_error("writing rrd");
*>                                 break;
*>                             }
*>                             rra_current += sizeof(rrd_value_t);
*>                             wrote_to_file = 1;

aargh ... could it be that this is a bug of irix which could be ammended by
a patch ?

if you can provide a small programm which demonstrates the bug I will
include it in the configure script and activate the fix when necessary ...

cheers
tobi
*> 
*> > -----Original Message-----
*> > From:	Tobias Oetiker [SMTP:oetiker at ee.ethz.ch]
*> > Sent:	Monday, November 08, 1999 6:50 PM
*> > To:	Vinkesteijn, Gertjan
*> > Cc:	RRD User Mailing List
*> > Subject:	[rrd-users] Re: rrd question
*> > 
*> > Today you sent me mail regarding rrd question:
*> > 
*> > *> Dear friends,
*> > *> 
*> > *> I have the follwing problem, we got the error message:
*> > *> 	ERROR: writing rrd
*> > *> when the rrd database is filled up
*> > *> it will not accept any input no more
*> > *> 
*> > *> I created the database as follows:
*> > *> 	rrdtool create test.rrd --step 300 \
*> > *> 	DS:testf:GAUGE:1200:U:U \
*> > *> 	RRA:AVERAGE:0.5:1:12
*> > *> I enter with the update command, every 5 minutes a value, but after one
*> > hour
*> > *> it is over and out
*> > *> 
*> > *> can anybody help me in telling me what I do wrong?
*> > 
*> > could it be that you don't have write permission to the rrd? RRDs do NOT
*> > fill up ...
*> > 
*> > cheers
*> > tobi
*> > *> 
*> > *> ________
*> > *> Gertjan Vinkesteijn
*> > Interedge
*> > *> mailto:g.j.vinkesteijn at interedge.nl		Printerweg 48
*> > *> tel:	033 4509957						3821
*> > AD
*> > *> Amersfoort
*> > *> 
*> > *> 
*> > 
*> > -- 
*> >  ______    __   _
*> > /_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
*> >  / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
*> > /_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker
*> > 
*> > --
*> > * To unsubscribe from the rrd-users mailing list, send a message with the
*> >   subject: unsubscribe to rrd-users-request at list.ee.ethz.ch
*> > 
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list