Hi!
I've finally managed to shrink my growing livestatus db. The old data was
indeed flushed with the command Gerhard gave me, but the db also needed to
be flushed, because the disk space was still claimed. The query "VACUUM" did
that. I had my livestatus.db go from 140 MB to 25 MB (and it stills work :-p
). A little cron will do nicely.
sqlite3 /usr/local/shinken/var/livestatus.db "delete from logs where
time < strftime('%s', 'now') - 3600*24*7"
sqlite3 /usr/local/shinken/var/livestatus.db "VACUUM"
Thanks !
Denis
2011/5/20 Denis GERMAIN <dt.germ...@gmail.com>
> I tried to apply your patch, but it's difficult to see a difference. Pages
> still take quite a long time to display (between 10 et 15 seconds), and as
> it's not constant, I can't tell if it's better or not.
>
> And for the cleanup of the livestatus.db, there is also little difference
> in the filesize, even though the query did work, as there are now nearly no
> entries when I type the "select count(*)" query
>
> Denis
>
>
> 2011/5/19 Denis GERMAIN <dt.germ...@gmail.com>
>
>> Yeah, I had guessed, but I was not in a hurry :-p
>>
>> Thanks!
>>
>> Denis
>>
>> 2011/5/19 Gerhard Lausser <gerhard.laus...@consol.de>
>>
>>> Hi,
>>>
>>> > And for the livestatus.db, I have tried your command to count the
>>> entries
>>> and it gave me. A cleaning up in cron might be a good idea, like you said
>>> :-p
>>> > sqlite3 /usr/local/shinken/var/livestatus.db "select count(*) from logs
>>> where time < strftime('%s', 'now') - 3600*24*7"
>>> > 483973
>>> I'm an idiot. This statement I sent you counts the log entries older than
>>> a
>>> week. To delete the old entries it must be:
>>> "delete from logs where ....."
>>>
>>> Gerhard
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What Every C/C++ and Fortran developer Should Know!
>>> Read this article and learn how Intel has extended the reach of its
>>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> developers boost performance applications - including clusters.
>>> http://p.sf.net/sfu/intel-dev2devmay
>>> _______________________________________________
>>> Shinken-devel mailing list
>>> Shinken-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/shinken-devel
>>>
>>
>>
>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel