[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owfs-developers
Subject:    [Owfs-developers] statistics and errors: discrepancy?
From:       Mark Richards <mark.richards () massmicro ! com>
Date:       2011-10-06 17:39:48
Message-ID: 4E8DE7E4.9070503 () massmicro ! com
[Download RAW message or body]

I wrote a little script that provides a list of connected interfaces and 
some statistics (below if anyone wants to play).  My interest was to 
monitor errors at the interface level which might tell whether there's a 
problem on a particular one wire master or network.

Data comes from the following:

(bus.[n] = each interface)
      In my setup
                             /mnt/1-wire/bus.0 = the tcp interface (owfs 
to owserver)
                             /mnt/1-wire/bus.0/bus.0 = ttyS2
                             /mnt/1-wire/bus.0/bus.1 = ttyS4
                             /mnt/1-wire/bus.0/bus.2 = ttyS3

I get various statistics for each interface (bus.[n]) from:
***/mnt/1-wire/bus.0/bus.[n]/interface/statistics*

Interesting results below.  It seems that both of the ttyUSB interfaces 
(USB to serial adapters on both to a One Wire serial master) indicate 
errors.  I assume that     
/mnt/1-wire/bus.0/bus.[n]/interface/statistics/errors are the total 
error count.  Yet  
/mnt/1-wire/bus.0/bus.[n]/interface/statistics/select_errors returns a 
value > errors.

Which makes me wonder if ./errors is a total, or indicating something 
different...

Also, what is a select_error?  Can't find docs for the statistics 
directory...

/m


Script:

#!/bin/bash
# get error list for each bus
# must be in root bus (bus.0) of interface
cd /mnt/1-wire/bus.0
BUSES=` ls -1d bus.*`
echo "BUSES=$BUSES"

for direc in $BUSES ; do
         cd /mnt/1-wire/bus.0/$direc

         DEVNAME=`cat interface/settings/name`
         DEVADDR=`cat interface/settings/address`
         DEVVERS=`cat interface/settings/version`
         cd interface/statistics

         ERRCLOSE=`cat close_errors`
         ERRDETECT=`cat detect_errors`
         TMELAPSED=`cat elapsed_time`
         ERRORS=`cat errors`
         ERRWRITE=`cat write_errors`
         ERROPEN=`cat open_errors`
         ERRPROG=`cat program_errors`
         ERRPULLUP=`cat pullup_errors`
         ERRREAD=`cat read_errors`
         ERRRECONN=`cat reconnect_errors`
         ERRSEARCHP1=`cat search_errors/error_pass_1`
         ERRSEARCHP2=`cat search_errors/error_pass_2`
         ERRSEARCHP3=`cat search_errors/error_pass_3`
         ERRSELECT=`cat select_errors`

         ERRSTATUS=`cat status_errors`

         LOCKS=`cat locks`
         OVERDRVTRY=`cat overdrive/attempts`
         OVERDRVFAIL=`cat overdrive/failures`
         NRRECONN=`cat reconnects`
         MRRESETS=`cat resets`
         SHORTS=`cat shorts`
         TIMEOUTS=`cat timeouts`
         UNLOCKS=`cat unlocks`
         BTIME=`cat bus_time`
         NRERRRESET=`cat reset_errors`


         echo "Device $DEVNAME at $DEVADDR Version $DEVVERS"
         echo "[$ERRORS] Errors"
         echo " [$ERRWRITE] Write Errors"
         echo " [$ERRDETECT] Detect Errors"
         echo " [$ERROPEN] Open Errors"
         echo " [$ERRREAD] Read Errors"
         echo " [$ERRPOROG] Programming Errors"
         echo " [$ERRPULLUP] Pullup Errors"
         echo " [$ERRRECONN] Re-connect Errors"
         echo " Search Errors PASS 1:[$ERRSEARCHP1]      PASS 
2:[$ERRSEARCHP2]   PASS 3:[$ERRSEARCHP3] "
         echo " [$ERRSELECT] Select errors"
         echo " [$ERRSTATUS] Status errors"
         echo " [$NRERRRESET] Resets"
         echo " [$LOCKS] Locks"
         echo " Overdrive status - Attempts:[$OVERDRVTRY] 
Failures:[$OVERDRVFAIL]"
         echo " [$NRRECONN] Re-connects"
         echo " [$MRRESETS] Resets"
         echo " [$SHORTS] Shorts"
         echo " [$TIMEOUTS] Timeouts"
         echo " [$UNLOCKS] Unlocks"
         echo " [$BTIME] Total bus time"
         echo "---------------"

done


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic