OWFS SF.net project page New OWFS Website! by Paul H Alfille SourceForge.net Logo
OWFS Design
overview
components
naming
cache
arrays
performance

OWFS Features
cache
statistics

OWFS Software
Install instructions
Bootable CD
Filesystem (owfs)
Web Server (owhttpd)
Backend Server (owserver)
Perl bindings (owperl)
Python bindings (owpython)
PHP bindings (owphp)
Tcl bindings (owtcl)
Download
Daily Configured Package
CVS -- newest
CVS Statistics
FAQ
Examples & Usage
1-wire wireless
1-Wire Hardware
OWFS Project

OWFS Statistics

  • Synopsis

    OWFS keeps track of internal data, such as number of 1-wire bus errors, amount of data sent, and time the bus is busy. This data might be useful for monitoring the health of the network, the excess capacity of the bus, or the efficiency of the implementation. You can also ignore the statistics. They are not essential for using the OWFS system.

    All the statistics data is presented in the same form as the rest of the 1-wire bus data: files and directories for OWFS, or web page fields for owhttpd.

  • Structure

    The directory structure (for the filesystem representation) of statistics looks like this:
    |--statistics
    |   |-- bus
    |   |-- cache
    |   |   |-- directory
    |   |   |-- external
    |   |   |-- internal
    |   |   |-- persistent
    |   |   |-- primary
    |   |   `-- secondary
    |   |-- directory
    |   |   |-- bus
    |   |   `-- device
    |   |-- read
    |   |-- threads
    |   |   |-- directory
    |   |   |-- overall
    |   |   |-- read
    |   |   `-- write
    |   `-- write

    The individual entries are:

    bus
    |-- CRC16_errors
    |-- CRC16_tries
    |-- CRC8_errors
    |-- CRC8_tries
    |-- bus_time
    |-- elapsed_time
    |-- locks
    |-- pause_time
    |-- read_timeout
    `-- unlocks
    cache
    |-- additions
    |-- directory
    |   |-- added
    |   |-- deleted
    |   |-- expired
    |   |-- hits
    |   `-- tries
    |-- external
    |   |-- added
    |   |-- deleted
    |   |-- expired
    |   |-- hits
    |   `-- tries
    |-- flips
    |-- internal
    |   |-- added
    |   |-- deleted
    |   |-- expired
    |   |-- hits
    |   `-- tries
    |-- persistent
    |   |-- max
    |   |-- now
    |   |-- num
    |   `-- sum
    |-- primary
    |   |-- max
    |   |-- now
    |   |-- num
    |   `-- sum
    `-- secondary
        |-- max
        |-- now
        |-- num
        `-- sum

    directory
    |-- bus
    |   |-- calls
    |   `-- entries
    |-- device
    |   |-- calls
    |   `-- entries
    `-- maxdepth

    read
    |-- bytes
    |-- cachebytes
    |-- cachesuccess
    |-- calls
    |-- success
    |-- tries.0
    |-- tries.1
    |-- tries.2
    `-- tries.ALL

    threads
    |-- device_slots
    |-- directory
    |   |-- max
    |   |-- now
    |   |-- num
    |   `-- sum
    |-- multithreading
    |-- overall
    |   |-- max
    |   |-- now
    |   |-- num
    |   `-- sum
    |-- read
    |   |-- max
    |   |-- now
    |   |-- num
    |   `-- sum
    `-- write
        |-- max
        |-- now
        |-- num
        `-- sum
    write
    |-- bytes
    |-- calls
    |-- success
    |-- tries.0
    |-- tries.1
    |-- tries.2
    `-- tries.ALL

  • Use

    Example bash shell scripts:
    Note, all these scripts reference from the root mounted owfs directory, and use the external bc command for floating point calculations.

    • CRC error rates
      for x in 8 16
        do echo "CRC${x} error rate %: "
        echo "scale=2 ; `cat statistics/bus/CRC${x}_errors`*100/`cat statistics/bus/CRC${x}_tries`" | bc
      done

    • BUS utilization
      echo "scale=2 ; 100*`cat statistics/bus/bus_time`/`cat statistics/bus/elapsed_time`" | bc

    • BUS locks / second
      echo "scale=3 ; `cat statistics/bus/locks`/`cat statistics/bus/elapsed_time`" | bc

    • Cache hit rate
      echo "scale=2 ; 100*`cat statistics/cache/hits`/`cat statistics/cache/tries`" | bc

    • Directory lengths
      for x in bus device
        do echo "Average length for $x: "
        echo "scale=1 ; `cat
      statistics/directory/$x/entries`/`cat statistics/directory/$x/calls`" | bc
      done

    • Read success rate
      echo "`cat statistics/read/calls` attempted reads"
      echo -n "  Success from cache %"
        echo "scale=2; 100*`cat
      statistics/read/cachesuccess`/`cat statistics/read/calls` | bc
      echo -n "  Success on 1st try %"
        echo "scale=2; 100*(`cat
      statistics/read/tries.0`-`cat statistics/read/tries.1`)/`cat statistics/read/calls` | bc
      echo -n "  Success on 2nd try %"
        echo "scale=2; 100*(`cat
      statistics/read/tries.1`-`cat statistics/read/tries.2`)/`cat statistics/read/calls` | bc
      echo -n "  Success on 3rd try %"
        echo "scale=2; 100*(`cat
      statistics/read/tries.2`-(`cat statistics/read/calls`-`cat statistics/read/success`))/`cat statistics/read/calls` | bc
      echo -n "  Failure %"
        echo "scale=2; 100*(`cat
      statistics/read/calls`-`cat statistics/read/success`)/`cat statistics/read/calls` | bc

    • Write success rate
      echo "`cat statistics/write/calls` attempted writes"
      echo -n "  Success on 1st try %"
        echo "scale=2; 100*(`cat
      statistics/write/tries.0`-`cat statistics/write/tries.1`)/`cat statistics/write/calls` | bc
      echo -n "  Success on 2nd try %"
        echo "scale=2; 100*(`cat
      statistics/write/tries.1`-`cat statistics/write/tries.2`)/`cat statistics/write/calls` | bc
      echo -n "  Success on 3rd try %"
        echo "scale=2; 100*(`cat
      statistics/write/tries.2`-(`cat statistics/write/calls`-`cat statistics/write/success`))/`cat statistics/write/calls` | bc
      echo -n "  Failure %"
        echo "scale=2; 100*(`cat
      statistics/write/calls`-`cat statistics/write/success`)/`cat statistics/write/calls` | bc

    • Thread count average
      echo "scale=3 ; `cat statistics/bus/locks`/`cat statistics/bus/elapsed_time`" | bc
      for x in read write directory overall
        do echo -n "Average thread count ($x): "
        echo "scale=2; `cat
      statistics/thread/$x/sum`/`cat statistics/thread/$x/num`" | bc
      done

    • Threads / second
      for x in read write directory overall
        do echo -n "Threads per second ($x): "
        echo "scale=2; `cat
      statistics/thread/$x/num`/`cat statistics/bus/elapsed_time`" | bc
      done

  • Details
    Heading
    Subheading
    Field
    Explanation
    bus CRC16_errors Errors found in CRC16 check.

    CRC16_tries Calls to CRC16 check. Used for some memory reads and writes to ensure accuracy.

    CRC8_errors Errors in CRC8 calls. (At least one at end of every directory search).

    CRC8_tries Calls to CRC8 check (used extensively in device directory searches).

    bus_time Time the bus has been locked. (Includes pause_time).

    elapsed_time Time the system has been up. (In seconds).

    locks The number of times the 1-wire bus has been "locked" for exclusive use for communication

    pause_time Time (in seconds) the bus has paused in locked state. Usually for powering parasitic chips for temperature conversions.

    read_timeout The number of times the 1-wire bus communication response has been tardy.

    unlocks The number of times the 1-wire bus has been "unlocked". Should be slightly less than or equal to "locks".
    cache
    additions
    Items added to the cache. (Can be the same value, multiple times if it has timed out).

    directory
    external
    internal
    added
    Items added to the cache tables. (Note, this is total successful additions, many will have expired, or overwritten previous entries).

    directory
    Caching of directory entries (devices scanned on the main 1-wire bus or a branch)
    external
    Device properties requested (like temperature or memory contents).
    internal
    Device properties remembered, but no neccessarily displayed (like temperature resolution or voltage source).

    directory
    external
    internal
    deleted
    Items deleted from the cache tables. Total successful deletions, may have been readded.

    directory
    Caching of directory entries (devices scanned on the main 1-wire bus or a branch)
    external
    Device properties requested (like temperature or memory contents).
    internal
    Device properties remembered, but no neccessarily displayed (like temperature resolution or voltage source).

    directory
    external
    internal
    expired
    Items that were found to be too old when attempted to be read. Perhaps the timeout period needs adjusting.

    directory
    Caching of directory entries (devices scanned on the main 1-wire bus or a branch)
    external
    Device properties requested (like temperature or memory contents).
    internal
    Device properties remembered, but no neccessarily displayed (like temperature resolution or voltage source).

    directory
    external
    internal
    hits
    Items successfully retrieved from the cache. This avoided slow 1-wire bus activity.

    directory
    Caching of directory entries (devices scanned on the main 1-wire bus or a branch)
    external
    Device properties requested (like temperature or memory contents).
    internal
    Device properties remembered, but no neccessarily displayed (like temperature resolution or voltage source).

    directory
    external
    internal
    tries
    Attempts at getting data from thbe cache instead of the 1-wire bus.
    directory
    Caching of directory entries (devices scanned on the main 1-wire bus or a branch)
    external
    Device properties requested (like temperature or memory contents).
    internal
    Device properties remembered, but no neccessarily displayed (like temperature resolution or voltage source).

    flips
    Times the entire cache database has expired and been restarted.

    persistent
    primary
    secondary
    max
    Maximum number of items ever in database.
    persistent
    Storage for items that persist, like cumulative counters.
    primary
    Active database, cache items added to this list.
    secondary
    Past database. Used until it times out, then recycled to active.

    persistent
    primary
    secondary
    now
    Current number of items in database.
    persistent
    Storage for items that persist, like cumulative counters.
    primary
    Active database, cache items added to this list.
    secondary
    Past database. Used until it times out, then recycled to active.

    persistent
    primary
    secondary
    num
    Number of cache add  passes (ever) to database.
    persistent
    Storage for items that persist, like cumulative counters.
    primary
    Active database, cache items added to this list.
    secondary
    Past database. Used until it times out, then recycled to active.

    persistent
    primary
    secondary
    sum
    Sum of database size at each pass (for averaging).
    persistent
    Storage for items that persist, like cumulative counters.
    primary
    Active database, cache items added to this list.
    secondary
    Past database. Used until it times out, then recycled to active.
    directory
    bus
    device
    calls
    Calls to list the contents of  directory.
    bus Directory is the root, or a DS2409 branch (main or aux)
    device Directory is within a 1-wire chip, or a stats catagory. Includes subdirectories like page/...

    bus
    device
    entries
    Each element of a directory.
    bus Directory is the root, or a DS2409 branch (main or aux)
    device Directory is within a 1-wire chip, or a stats catagory. Includes subdirectories like page/...

    maxdepth
    Maximum level of  branching found (Each DS2409 level adds one).
    read
    bytes Total bytes read (Includes bytes from 1-wire bus and bytes from in-memory information)/

    cachebytes Bytes read in data cache

    cachesuccess Number of cache read attempts that were successful

    calls Attempts at reading from owfs

    success Successful attempts read from owfs. Includes data, memory and cache successes.

    tries.[0 1 2]
    Attempts to read once, twice or three times. If all three unsuccessful, success not incremented
    threads
    device_slots
    How many device locking slots are available (for simultaneous operation.

    directory
    overall
    read
    write
    max
    maximum number of simultaneous threads directory threads for directory listing
    overall all threads
    read
    threads for reading data
    write
    threads for writing data

    directory
    overall
    read
    write
    now
    current number of simultaneous threads directory threads for directory listing
    overall all threads
    read
    threads for reading data
    write
    threads for writing data

    directory
    overall
    read
    write
    num
    number of threads created threads directory threads for directory listing
    overall all threads
    read
    threads for reading data
    write
    threads for writing data

    directory
    overall
    read
    write
    sum
    number of threads at each new thread (sum/num=average)
    directory threads for directory listing
    overall all threads
    read
    threads for reading data
    write
    threads for writing data

    multithreading
    1 if multithreading operational
    write
    bytes Total bytes written. (Includes bytes to 1-wire bus and bytes to
     in-memory information)/

    calls Attempts at writing to owfs

    success Successful attempts writing to owfs. Includes data and memory.

    tries.[0 1 2]
    Attempts to write once, twice or three times. If all three unsuccessful, success not incremented

© 2003 Paul H. Alfille and The owfs Team
$Id: statistics.html,v 1.9 2004/10/14 01:44:10 alfille Exp $