[rancid] Re: jerancid show version parsing

Mack, David A (Dave) dmack at verizon.com
Fri May 15 21:46:24 UTC 2009


John,
	Hello! I applied the patch and did a manual run, but no joy!

Here is cli output:

Juniper Edge Routing Switch E320
Copyright (c) 1999-2008 Juniper Networks, Inc.  All rights reserved.
System Release: e320_9-0-1p0-7-3.rel
        Version: 9.0.1 patch-0.7.3 [BuildId 10622]   (March 8, 2009
21:10)
System running for: 353 days, 2 hours, 34 minutes, 40 seconds
        (since TUE MAY 27 2008 18:15:29 UTC)

slot  state    type    admin  spare   running release     slot uptime  
---- -------- ------- ------- ----- -------------------- --------------
0    standby  LM-10   enabled spare e320_9-0-1p0-7-3.rel      ---      
1     online  LM-4    enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:35m:50s
2      ---      ---     ---    ---          ---               ---      
3     online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:21m:33s
4      ---      ---     ---    ---          ---               ---      
5     online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:21m:09s
6    standby  SRP-320 enabled  ---  e320_9-0-1p0-7-3.rel      ---      
6     online  SFM-320 enabled  ---          ---          16d15h:52m:43s
7     online  SRP-320 enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:52m:51s
7     online  SFM-320 enabled  ---          ---          16d15h:52m:31s
8     online  SFM-320 enabled  ---          ---          16d15h:52m:36s
9     online  SFM-320 enabled  ---          ---          16d15h:52m:24s
10    online  SFM-320 enabled  ---          ---          16d15h:52m:27s
11    online  LM-10   enabled spare e320_9-0-1p0-7-3.rel 10d11h:57m:24s
12    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:14m:22s
13    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:13m:30s
14    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:30m:01s
15    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel 16d15h:18m:24s
16   inactive LM-10   enabled  ---  e320_9-0-1p0-7-3.rel      ---      

and here is the jerancid output:

!RANCID-CONTENT-TYPE: Juniper_ERX
!
!Chassis type: E320 - a Juniper Edge Routing Switch E320
!
!System Release: e320_9-0-1p0-7-3.rel
!System Version: 9.0.1 patch-0.7.3 [BuildId 10622]   (March 8, 2009
21:10)
!
! slot  state    type    admin  spare   running release    
! ---- -------- ------- ------- ----- --------------------
! 1     online  LM-4    enabled  ---  e320_9-0-1p0-7-3.rel
! 3     online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel
! 5     online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel
! 6     online  SFM-320 enabled  ---          ---         
! 7     online  SRP-320 enabled  ---  e320_9-0-1p0-7-3.rel
! 7     online  SFM-320 enabled  ---          ---         
! 8     online  SFM-320 enabled  ---          ---         
! 9     online  SFM-320 enabled  ---          ---         
! 10    online  SFM-320 enabled  ---          ---         
! 12    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel
! 13    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel
! 14    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel
! 15    online  LM-10   enabled  ---  e320_9-0-1p0-7-3.rel

Thanks!
Dave

______________________________________________________________
David A. Mack                               (703) 391-7787 (W)
CCIE #6963 (SP and R&S) JNCIE-M #399 CISSP  (703) 431-7617 (C)
email:  dmack at verizon.com
______________________________________________________________
"We are now the knights who say... Ping!"
 

> -----Original Message-----
> From: john heasley [mailto:heas at shrubbery.net] 
> Sent: Friday, May 15, 2009 4:30 PM
> To: Mack, David A (Dave)
> Cc: rancid-discuss at shrubbery.net
> Subject: Re: [rancid] jerancid show version parsing
> 
> Fri, May 15, 2009 at 10:32:06AM -0400, Mack, David A (Dave):
> > From the output above you can see that the parsed output is missing 
> > slots 0, 11 and 16. We need to capture those slots as well. 
> As a side 
> > note, the slot uptime is actually useful to us as well. I am not 
> > really very good with PERL, can someone help with this 
> missing output?
> > 
> 
> I think that this patch will fix the missing slots.  Please confirm.
> 
> 
> Index: jerancid.in
> ===================================================================
> RCS file: /home/rancid/.CVS/rancid/bin/jerancid.in,v
> retrieving revision 1.47
> diff -d -u -r1.47 jerancid.in
> --- jerancid.in	4 Mar 2009 19:11:55 -0000	1.47
> +++ jerancid.in	15 May 2009 20:15:53 -0000
> @@ -193,7 +193,7 @@
>  	}
>  	/^(--.*) --+$/ && $slots &&
>  		ProcessHistory("COMMENTS","keysort","B2", "! 
> $1\n") && next;
> -	if (/^(\d+ +\S+ +(\S+).*) \S+$/ && $slots) {
> +	if (/^(\d+\s+\S+\s+(\S+).*) \S+$/ && $slots) {
>  	    my($line) = $1;
>  	    if ($2 != /--+/) {
>  		ProcessHistory("COMMENTS","keysort","B3", "! $line\n");
> 
> 


More information about the Rancid-discuss mailing list