how to clear HUGE logs?

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
walteroa
Posts: 2
Joined: Mon Jan 21, 2013 6:43 pm

how to clear HUGE logs?

Post by walteroa » Mon Jan 21, 2013 7:20 pm

CONTEXT:
I have some problems with corrupt JEPG images (comming from foscam cammeras). As far as I read, there are some tweaks we can do compiling zoneminder with turbo-jpeg libs (and eliminating the lines who creadte this warning)..

ISSUE:
Until I can find a solution on compiling ZM with turbo-jpeg, in the meantime, I need to clean/delete a HUGE entry log generated by this message: "Corrupt JPEG data: 1 extraneous bytes before marker 0xd9"

QUESTION:
Does anybody know how to clean the ZM log?
(which is HUGE now, at least until I get the permanent fix on the turbo-jpeg lib)

thx.

joeshmoe
Posts: 2
Joined: Sat Jul 25, 2015 11:05 pm

Re: how to clear HUGE logs?

Post by joeshmoe » Sat Jul 25, 2015 11:08 pm

I'd also like to know how to clear the logs. Thought I'd resurrect this thread rather than start a new one with the same question.

Linwood
Posts: 75
Joined: Thu Jun 25, 2015 6:40 pm

Re: how to clear HUGE logs?

Post by Linwood » Sun Jul 26, 2015 3:05 am

If you want to empty the entire zoneminder log file (THE WHOLE THING AND IT WILL BE GONE AND YOU CAN'T GET IT BACK) quickly:

mysql -uroot -ppassword zm
truncate table Logs;
quit

It gets rid of the WHOLE LOG. Do it only if you are sure. But it's real quick.

Periodic database optimization will clean up the space it contained later. Or should.

Note: This is the DATABASE copy of the log. the syslog or other filesystem copies would be handled in the file system.

joeshmoe
Posts: 2
Joined: Sat Jul 25, 2015 11:05 pm

Re: how to clear HUGE logs?

Post by joeshmoe » Sun Jul 26, 2015 4:32 pm

Thanks. Take care.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests