mod_rrdtool should init db if file is empty
for purpose of setting initial permissions from rpm package, there's such file installed to system:
-rw-r----- 1 lighttpd stats 0 2008-10-07 13:14 /var/lib/lighttpd/lighttpd.rrd
lighty won't run
rrdtool create on this file, so the file stays empty. and when
rrdtool graph is ran such error is output
ERROR: reading the cookie off /var/lib/lighttpd/lighttpd.rrd failed
suggestion: make lighttpd run
rrdtool create when .rrd file is empty (
st.st_size == 0).
tested and it would work:
# ls -l lighttpd.rrd -rw-r----- 1 lighttpd stats 0 2008-10-07 13:14 lighttpd.rrd # > lighttpd.rrd # rrdtool create lighttpd.rrd --step 60 DS:InOctets:ABSOLUTE:600:U:U DS:OutOctets:ABSOLUTE:600:U:U DS:Requests:ABSOLUTE:600:U:U RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 # ls -l lighttpd.rrd -rw-r----- 1 lighttpd stats 212040 2008-10-07 13:16 lighttpd.rrd
Updated by stbuehler over 12 years ago
I don't see why there should be an empty file. Either create it with rrdtool or give lighty write permissions to the directory? (/var/lib/lighttpd looks like it should be writable by lighty)
And the next one probably wants "rrdtool create" for size == 2 ("\r\n") too...
Updated by glen over 12 years ago
reason: i want lighttpd:stats being ownership. if lighttpd creates the file, it would be lighttpd:lighttpd.
0 byte file with lighttpd:stats cames from rpm package as rpm install is run as root, which has possibility to change ownership, which lighttpd doesn't.
Also available in: Atom