[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]

 

     [snips-users] logstats.pl parse patch - Snips 1.2Beta

I noted that Russel Van Tassell posted a fix earlier.  I applied the
patch and it works pretty well.  I was not really satisfied with
print formatting, so I modified most of the long printing lines
for more width, as well as formatting the reals as "%lf" rather
than "%s".  I know it is cosmetic, but it is nice to see things line
up.

Attachments:    patch, and sample run

Tim Peiffer


                              SNIPS SUMMARY REPORT
                              ====================
                                             From: Sun Dec 30 06:09:45 2001
                                               To: Sat Jan  5 12:19:41 2002
Severity level: Warning
Total Lines processed = 115, Unparseable= 0
All times in d+hh:mm

Per Device Reports
================

            Device         Variable        +--------- Downtime ---------+   Total    Avg.
                                           Total     Max      Avg.    %age  Downs   Value
--------------------------------------------------------------------------------------------
+ns.nts                    named-status    00:36   00:09   00:09  0.40      4      0
+ns1                       named-status    00:27   00:09   00:09  0.30      3      0
+nss.nts                   named-status    01:47   00:09   00:08  1.19     12      0
engineer8-1                WWWport         08:33   07:19   01:13  5.70      7      0
engineer8-2                WWWport         08:24   07:19   01:24  5.60      6      0
engineer8-speed-1          WWWspeed        00:28   00:10   00:09  0.32      3     21
engineer8-speed-2          WWWspeed        00:18   00:09   00:09  0.21      2     29
engineer8-speed-3          WWWspeed        00:28   00:10   00:09  0.32      3     21
jaws-www-speed             WWWspeed        00:47   00:09   00:09  0.53      5     24
localhost                  DataAge         00:00   00:00   00:00  0.00      1      0
nts                        SMTPport        00:45   00:09   00:09  0.51      5      0
rentals-speed              WWWspeed        00:19   00:09   00:09  0.22      2      8
skypoint                   SMTPport        00:20   00:20   00:20  0.22      1      0
tim                        DhcpAvail       00:00   00:00   00:00  0.00      1      0


Total downtime (all devices)=23:19
Average downtime= 01:39

Per Variable Report
===================

      Variable      TotalDown
    --------------------------
WWWport              16:58
named-status         02:50
WWWspeed             02:24
SMTPport             01:05

10 Worst Device Events
====================

Device                      Variable   TotalDown
    ------------------------------------
engineer8-1                WWWport       08:33
engineer8-2                WWWport       08:24
+nss.nts                   named-status  01:47
jaws-www-speed             WWWspeed      00:47
nts                        SMTPport      00:45
+ns.nts                    named-status  00:36
engineer8-speed-3          WWWspeed      00:28
engineer8-speed-1          WWWspeed      00:28
+ns1                       named-status  00:27

 92c92
 <   if ( /^(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+\[([^]]+)\]:\s+SITE|DEVICE\s+(\S+)\s+(?:(\S+)\s+)?VAR\s+(\S+)\s+(\d+).*LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)\s+NOCOP\s+(\S+)/ )
 ---
 >   if ( /^(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+\[([^]]+)\]:\s+(SITE|DEVICE)\s+(\S+)\s+(?:(\S+)\s+)?VAR\s+(\S+)\s+(\d+).*LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)\s+STATE\s+(\S+)/ )
 95c95
 <       $e_loglevel, $e_nocop) = ($1, $2, $3, $4, $5, $6, $7, $8, $9);
 ---
 >       $e_loglevel, $e_nocop) = ($1, $2, $4, $5, $6, $7, $8, $9, $10);

Zyrion Traverse Network Monitoring & Network Management Software