rrdtool performs as expected:<br>
<br>
-bash-2.05b$ /usr/local/rrdtool-1.2.10/bin/rrdtool create /foo.rrd DS:sec:GAUGE:600:0:U RRA:AVERAGE:0.5:1:576<br>
ERROR: creating '/foo.rrd': Permission denied<br>
<br>
Thanks,<br>
Larry Barber<br>
<br><br><div><span class="gmail_quote">On 6/9/06, <b class="gmail_sendername">Henrik Stoerner</b> <<a href="mailto:henrik@hswn.dk">henrik@hswn.dk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Jun 09, 2006 at 05:01:55PM -0500, Larry Barber wrote:<br>> No joy, it is still crashing, stack trace:<br><br>Does rrdtool work for you? Try running<br>   rrdtool create /foo.rrd DS:sec:GAUGE:600:0:U RRA:AVERAGE:
0.5:1:576<br>Assuming you're not root, this should print out the message<br>   ERROR: creating '/foo.rrd': Permission denied<br><br>> I was looking at your patch, and it doesn't look to me like that new lines<br>> are doing the same thing as the old:
<br>><br>> -     strcat(filedir, "/"); strcat(filedir, fn);<br>> +     snprintf(filedir, sizeof(filedir)-1, "%s/%s/%s", rrddir, hostname, fn);<br>> +     filedir[sizeof(filedir)-1] = '\0';<br>
>       creparams[1] = filedir; /* Icky */<br>><br>> It looks like the original line creates something like "filedir/fn"<br>> while the new lines create something like "filedir/hostname/fn". Is
<br>> this right?<br><br>It is. In the old version, "filedir" contained the rrd top-level<br>directory + the hostname, e.g. "/hobbit/rrd/myhost", and then it<br>added an extra "/" and the rrd filename.
<br><br>The new version just uses snprintf() to output the top-level<br>directory + the hostname-directory + the rrd filename in one go.<br><br>        sprintf(filedir, "%s/%s", rrddir, hostname);<br>        if (stat(filedir, &st) == -1) {
<br>                ...<br>        }<br>        snprintf(filedir, sizeof(filedir)-1, "%s/%s/%s", rrddir, hostname, fn);<br>        filedir[sizeof(filedir)-1] = '\0';<br><br><br>Regards,<br>Henrik<br><br><br>To unsubscribe from the hobbit list, send an e-mail to
<br><a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br><br><br></blockquote></div><br>