Page 1 of 1
OZW_Log.txt
Posted: Wednesday 03 February 2016 9:52
by valdoison
Hello
it seems that the OZW_Log.txt file is reset only during a reboot of DOMTICZ.
Can we reset this file manually or via a script?
Re: OZW_Log.txt
Posted: Wednesday 03 February 2016 10:28
by stlaha2007
Hi,
What do you mean by reboot. Stop/Start/Restart only Domoticz or complete reboot of RPi or other device?
In case of complete hardware reboot, try a restarting Domoticz only. If that also "recycles" OpenZWave log, search the forum for logrotate.
A few and i wrote working samples to rotate (reduce/compress/recycle) domoticz logfile.
Grtz,
Stephan
Re: OZW_Log.txt
Posted: Friday 05 February 2016 11:54
by valdoison
Hello,
I just want to know if I can, safely, empty the file manually.
Re: OZW_Log.txt
Posted: Friday 05 February 2016 13:29
by nayr
yes you can, if you have Z-Wave debug enabled disable it for a much smaller file.
Re: OZW_Log.txt
Posted: Friday 05 February 2016 13:34
by Egregius
you can empty it safely with this:
truncate -s 0 OZW__Log.txt
I have /var/log in tmpfs and OZW_Log.txt, ozwcp.poll.XXXXXX.xml and ozwcp.topo.XXXXXX hardlinked there. Saves quite some writes to the SD.
Re: OZW_Log.txt
Posted: Sunday 07 February 2016 12:00
by valdoison
I did a test.
If I empty the file, manually without restart Domoticz, it remains empty and is not incremented by the errors as normally.
it seems that the only solution is to restart Domoticz.
I have not found if there is a "Logrotate" associated with that file.
Re: OZW_Log.txt
Posted: Sunday 07 February 2016 18:44
by valdoison
As soon as you touch it, even a single line, the file is blocked and recorded more errors.
I have to restart Domoticz.
Re: OZW_Log.txt
Posted: Sunday 07 February 2016 19:02
by nayr
try sending a SIGHUP signal to domoticz instead of a hard restart.. thats how my logrotate scripts force domoticz to start a new file.
Re: OZW_Log.txt
Posted: Monday 08 February 2016 8:19
by valdoison
I do not know how to do it.
I comprises the use. How to make this call in a shell script run by cron or if the file exceeds 5000 lines for example.
What files are then revived?
I'd rather be alone OZW_Log.txt revived.
Re: OZW_Log.txt
Posted: Monday 08 February 2016 17:25
by nayr
Re: OZW_Log.txt
Posted: Monday 08 February 2016 19:31
by gizmocuz
i think this will only work for the domoticz log file
Valdoison:
You are probably debugging something with OZW, otherwise you did not enable it to log.
When your done, just turn off debugging
Re: OZW_Log.txt
Posted: Monday 08 February 2016 21:50
by Egregius
Just tried it again with "truncate -s 0 OZW__Log.txt"
File is emptied and starts filling automatically without any other action.