Mon, Dec 04, 2017 at 01:52:20PM -0500, Gerhard Mourani:
> Hello,
> 
> Sorry for the delay, here the output, thanks.
> 
> EliteStack7024#show system
> 
> System Description: Dell Ethernet Switch
> System Up Time: 60 days, 06h:26m:08s
> System Contact: x...@xxx.xx
> System Name: EliteStack7024
> System Location: xxxxxxxx
> Burned In MAC Address: xxxx.xxxx.xxxx
> System Object ID: 1.3.6.1.4.1.674.10895.3035
> System Model ID: PCT7048
> Machine Type: PowerConnect 7048
> Temperature Sensors:
> 
> Unit     Description       Temperature    Status
>                             (Celsius)
> ----     -----------       -----------    ------
> 1        MAC               31             Good
> 1        PHY               29             Good
> 2        MAC               30             Good
> 2        PHY               28             Good
> 3        MAC               32             Good
> 3        PHY               26             Good
> 
> Fans:
> --More-- or (q)uit
> 
> Unit     Description    Status
> ----     -----------    ------
>  1       Fan 1          OK
>  1       Fan 2          OK
>  1       Fan 3          OK
>  2       Fan 1          OK
>  2       Fan 2          OK
>  2       Fan 3          OK
>  3       Fan 1          OK
>  3       Fan 2          OK
>  3       Fan 3          OK
> 
> Power Supplies:
> 
> Unit  Description    Status     Average     Current          Since
>                                  Power       Power         Date/Time
>                                 (Watts)     (Watts)
> ----  -----------  -----------  ----------  --------  -------------------
> 1     System       OK            1.4        65.2
> 1     Internal     OK           N/A         N/A       10/05/2017 20:18:35
> 1     Redundant    No Power
> 2     System       OK            0.2        67.0
> --More-- or (q)uit
> 2     Internal     OK           N/A         N/A       10/05/2017 20:18:35
> 2     Redundant    No Power
> 3     System       OK            0.7        70.6
> 3     Internal     OK           N/A         N/A       10/05/2017 20:18:23
> 3     Redundant    No Power
> 
> USB Port Power Status:
> ----------------------
> Device Not Present

Does this patch work properly in production?

Index: bin/srancid.in
===================================================================
--- bin/srancid.in      (revision 3734)
+++ bin/srancid.in      (working copy)
@@ -151,6 +151,35 @@
            }
        }
 
+       # filter power rates and tmestamps from 7024 power supply info
+       # Power Supplies:
+       #  
+       # Unit  Description    Status     Average     Current          Since
+       #                                  Power       Power         Date/Time
+       #                                 (Watts)     (Watts)
+       # ----  -----------  -----------  ----------  --------  
-------------------
+       # 1     System       OK            1.4        65.2
+       # 1     Internal     OK           N/A         N/A       10/05/2017 
20:18:35
+       if (/power supplies/i) {
+           ProcessHistory("COMMENTS","keysort","C1",
+               "! Unit\tDescription\tStatus\n");
+           ProcessHistory("COMMENTS","keysort","C1",
+               "! ----\t-----------\t------\n");
+           while (<INPUT>) {
+               s/^\s+\015//g;
+               tr/\015//d;
+               /^(unit\s|--+\s|\s)/i && next;
+               if (/(\d+)\s+(\w+)\s+(\w+(\s\w+)?)\s/) {
+                   if (length($2) >= 8) {
+                       ProcessHistory("COMMENTS","keysort","C1","! 
$1\t$2\t$3\n");
+                   } else {
+                       ProcessHistory("COMMENTS","keysort","C1","! 
$1\t$2\t\t$3\n");
+                   }
+               }
+               /^\s*$/ && last;
+           }
+       }
+
        /system description: (.*)/i &&
            ProcessHistory("COMMENTS","keysort","A1", "!Chassis type: $1\n") &&
            next;

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Reply via email to