[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where should rrd files generated by a program be stored ?



hi julian,

On Tue, Feb 24, 2004 at 08:50:36PM +0100, Julian Mehnle wrote:
> Regarding storing the graphs in /var/cache, I disagree.  For files in
> /var/cache, the FHS mandates:
> 
> | The application must always be able to recover from manual deletion of
> | these files (generally because of a disk space shortage).
> 
> The problem is that the graphs probably are *not* automatically
> re-generated if they are missing when a user requests them via the web
> server.  So, the graphs would probably best stored in /var/lib, too.

with the example of mailgraph, you *can* safely delete the png images.
if you look at the mail graph statistics page it generates, the images
are output from a cgi script, which re-creates the images on the fly
if they're missing or need to be updated.  

if you want to link to the static images on the web server, i think
what you'd really want to do is rsync them out of there and into your
webserver's document root.  you could even make sure the images were
present and up to date by running wget on the cgi script before copying
them.

i've actually sent a patch to the upstream of mailgraph around a month
ago that gives the ability to generate the from the cmdline/cron and
place them somewhere else, which i think is what you'd really want in
a case where you linked to the static images on the webserver.

so anyway, i think there probably are cases where you are right that
the images shouldn't go in /var/cache, and that this does need to
be a question answered on a package by package basis, but i can
certainly also think of situations where that's exactly where you want
them to be.


	sean

Attachment: signature.asc
Description: Digital signature


Reply to: