Debugging

Debugging

All the owlib programs support various levels of debugging output.

  • owserver
  • owfs
  • owserver
  • owhttpd
  • owperl, owpython, owtcl, owphp

 

Typicical debugging output looks like:

   DEBUG: ow_read.c:(248) return=0
Byte buffer OWQ_parse_output_offset_and_size, length=12
--000: 20 20 20 20 20 20 31 34 2E 37 36 36
   <      14.766>
  DEBUG: ow_read.c:(258) After read is performed (bytes or error 12)
OWQ OneWireQuery structure of /10.67C6697351FF/templow
    OneWireQuery size=12 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=12
--000: 20 20 20 20 20 20 31 34 2E 37 36 36
   <      14.766>
    Cleanup = 0007    OneWireQuery I=12 U=12 F=5.92879E-323 Y=12 D=Wed Dec 31 19:00:12 1969

--- OneWireQuery done
  DEBUG: ow_read.c:(221) /10.67C6697351FF/templow returns 12
  DEBUG: ow_read.c:(98) /10.67C6697351FF/templow return 12
  DEBUG: ow_parsename.c:(62) /10.67C6697351FF/templow
  DEBUG: ow_parsename.c:(62) /10.67C6697351FF/templow
   CALL: ow_parsename.c:(99) path=[/10.67C6697351FF/type]
  DEBUG: ow_cache.c:(913) Looking for device 10 67 C6 69 73 51 FF 8D
  DEBUG: ow_cache.c:(1069) Search in cache sn 10 67 C6 69 73 51 FF 8D pointer=0x7fc6f965650c index=0 size=4
  DEBUG: ow_cache.c:(1085) Value found in cache. Remaining life: 106 seconds.

In general messages are 1 per line. E.g:

  • DEBUG:
    (or CALL:, etc -- message level where DEFAULT is least and DEBUG most)
  • ow_read.c: (221)
    file and line of the source code that generated the message.
  • Message text

 

All the debugging putput is controlled by command line parameters:

 

In addition to this information, two more levels of messages can be generated by specially compiled versions:

  • ./configure --enable_owtraffic
    Show data sent and recieved by the bus master
  • ./configure --enable_owmalloc
    Show all memory allocation and release to post-process for memory leaks.