OZW_Log.txt

For Z-Wave related questions in Domoticz

Moderator: leecollings

Post Reply
valdoison
Posts: 21
Joined: Monday 03 March 2014 18:33
Target OS: Linux
Domoticz version: beta
Contact:

OZW_Log.txt

Post 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?
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: OZW_Log.txt

Post 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
valdoison
Posts: 21
Joined: Monday 03 March 2014 18:33
Target OS: Linux
Domoticz version: beta
Contact:

Re: OZW_Log.txt

Post by valdoison »

Hello,
I just want to know if I can, safely, empty the file manually.
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: OZW_Log.txt

Post by nayr »

yes you can, if you have Z-Wave debug enabled disable it for a much smaller file.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: OZW_Log.txt

Post 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.
Last edited by Egregius on Monday 08 February 2016 21:49, edited 1 time in total.
valdoison
Posts: 21
Joined: Monday 03 March 2014 18:33
Target OS: Linux
Domoticz version: beta
Contact:

Re: OZW_Log.txt

Post 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.
valdoison
Posts: 21
Joined: Monday 03 March 2014 18:33
Target OS: Linux
Domoticz version: beta
Contact:

Re: OZW_Log.txt

Post 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.
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: OZW_Log.txt

Post 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.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
valdoison
Posts: 21
Joined: Monday 03 March 2014 18:33
Target OS: Linux
Domoticz version: beta
Contact:

Re: OZW_Log.txt

Post 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.
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: OZW_Log.txt

Post by nayr »

Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
User avatar
gizmocuz
Posts: 2499
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: OZW_Log.txt

Post 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
Quality outlives Quantity!
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: OZW_Log.txt

Post by Egregius »

Just tried it again with "truncate -s 0 OZW__Log.txt"
File is emptied and starts filling automatically without any other action.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest