Discussion:
[rancid] GSR 12k - sho diag / missing subslot spa info
Elliott, Andrew
2007-06-26 19:51:39 UTC
Permalink
Hello,

I have been recently asked that my router backups include the SUBSLOT
line from 'sho diag' on the 12k's.

Here is an example (trimmed for brevity) of the output I want rancid to
parse:

SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-

SPA Information:
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty

SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit Ethernet Shared Port
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-

This is a new card type that we have recently begun deploying, and
currently all that is backed up is the main SPA IC information, not the
info on the "SUBSLOT" or "SPA -> subslot" lines.

It is possible I am using a version of rancid that needs to be upgraded
and/or patched.

## $Id: rancid.in,v 1.172 2004/03/14 16:57:05 heas Exp $

Any advice would be greatly appreciated.


-andrew
john heasley
2007-06-27 18:41:42 UTC
Permalink
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups include the SUBSLOT
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the output I want rancid to
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit Ethernet Shared Port
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun deploying, and
currently all that is backed up is the main SPA IC information, not the
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have GSRs anymore.
Post by Elliott, Andrew
It is possible I am using a version of rancid that needs to be upgraded
and/or patched.
possibly. 'show inventory' has been added and that ought to include this
information...if cisco has gotten around to adding it to this platform
yet.
Elliott, Andrew
2007-06-27 20:50:58 UTC
Permalink
Post by Elliott, Andrew
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups include
the SUBSLOT
Post by Elliott, Andrew
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the output I
want rancid to
Post by Elliott, Andrew
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit Ethernet Shared Port
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun deploying, and
currently all that is backed up is the main SPA IC
information, not the
Post by Elliott, Andrew
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have GSRs anymore.
CHR1.NYC-NY#sho diag 1

SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
MAIN: type 149, 00-0000-00 rev A0
Deviation: D090170
HW config: 0x20 SW key: 00-00-00
PCA: 00-00000-00 rev A0 ver 4
Design Release 1.0 S/N SAD000000M0
MBUS: Embedded Agent
Test hist: 0x00 RMA#: 00-00-00 RMA hist: 0x00
DIAG: Test count: 0x00000000 Test results: 0x00000000
FRU: Linecard/Module: 12000-SIP-601=
Processor Memory: MEM-LC5-2048=(Non-Replaceable)
Packet Memory: MEM-LC5-PKT-256=(Non-Replaceable)
L3 Engine: 5 - ISE 10 Gbps
MBUS Agent Software version 2.51 (RAM) (ROM version is 3.50)
ROM Monitor version 17.1
Fabric Downloader version used 4.1 (ROM version is 4.1)
Primary clock is CSC 1
Board is analyzed
Board State is Line Card Enabled (IOS RUN )
Insertion time: 00:22:52 (2w4d ago)
Processor Memory size: 2147483648 bytes
TX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
RX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
0 crashes since restart

SPA Information:
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
CHR1.NYC-NY#
Post by Elliott, Andrew
Post by Elliott, Andrew
It is possible I am using a version of rancid that needs to
be upgraded
Post by Elliott, Andrew
and/or patched.
possibly. 'show inventory' has been added and that ought to
include this
information...if cisco has gotten around to adding it to this platform
yet.
Looks like this might be the best way to go.
Yuval Ben Ari
2008-03-02 14:12:43 UTC
Permalink
I am also having the same problem, and I am also interested to have the S/N
of the SPA
Indeed "show inventory" seems the best way to do it.
has anyone added "show inventory" parser yet?
otherwise I can try to add it and post here.

Yuval
Post by Elliott, Andrew
Post by Elliott, Andrew
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups include
the SUBSLOT
Post by Elliott, Andrew
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the output I
want rancid to
Post by Elliott, Andrew
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit Ethernet Shared Port
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun deploying, and
currently all that is backed up is the main SPA IC
information, not the
Post by Elliott, Andrew
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have GSRs anymore.
CHR1.NYC-NY#sho diag 1
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
MAIN: type 149, 00-0000-00 rev A0
Deviation: D090170
HW config: 0x20 SW key: 00-00-00
PCA: 00-00000-00 rev A0 ver 4
Design Release 1.0 S/N SAD000000M0
MBUS: Embedded Agent
Test hist: 0x00 RMA#: 00-00-00 RMA hist: 0x00
DIAG: Test count: 0x00000000 Test results: 0x00000000
FRU: Linecard/Module: 12000-SIP-601=
Processor Memory: MEM-LC5-2048=(Non-Replaceable)
Packet Memory: MEM-LC5-PKT-256=(Non-Replaceable)
L3 Engine: 5 - ISE 10 Gbps
MBUS Agent Software version 2.51 (RAM) (ROM version is 3.50)
ROM Monitor version 17.1
Fabric Downloader version used 4.1 (ROM version is 4.1)
Primary clock is CSC 1
Board is analyzed
Board State is Line Card Enabled (IOS RUN )
Insertion time: 00:22:52 (2w4d ago)
Processor Memory size: 2147483648 bytes
TX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
RX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
0 crashes since restart
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
CHR1.NYC-NY#
Post by Elliott, Andrew
Post by Elliott, Andrew
It is possible I am using a version of rancid that needs to
be upgraded
Post by Elliott, Andrew
and/or patched.
possibly. 'show inventory' has been added and that ought to
include this
information...if cisco has gotten around to adding it to this platform
yet.
Elliott, Andrew
2008-03-03 05:16:18 UTC
Permalink
# This routine parses "show inventory".
sub ShowInventory {
print STDERR " In ShowInventory: $_" if ($debug);

while (<INPUT>) {
tr/\015//d;
return if (/^\s*\^$/);
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(-1) if (/command authorization failed/i);
# the pager can not be disabled per-session on the PIX
if (/^(<-+ More -+>)/) {
my($len) = length($1);
s/^$1\s{$len}//;
}

if (/^(NAME: "[^"]*",) (DESCR: "[^"]+")/) {
ProcessHistory("INVENTORY","","", sprintf("!%-30s %s\n", $1,
$2));
next;
}
# split PID/VID/SN line
if (/^PID: (\S*)\s*, VID: (\S*)\s*, SN: (\S*)\s*$/) {
my($entries) = "";
$entries .= "!PID: $1\n" if ($1);
$entries .= "!VID: $2\n" if ($2);
$entries .= "!SN: $3\n" if ($3);
ProcessHistory("INVENTORY","","", "$entries");
next;
}
ProcessHistory("INVENTORY","","","!$_");
}
ProcessHistory("INVENTORY","","","!\n");

return(0);
}

And add this to your command table:

@commandtable = (
{'show inventory raw' => 'ShowInventory'},


---
Andrew Elliott
XO Communications
desk: 989.758.6987
cell: 989.213.5794






________________________________

From: Yuval Ben Ari [mailto:***@gmail.com]
Sent: Sunday, March 02, 2008 9:13 AM
To: Elliott, Andrew
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Re: GSR 12k - sho diag / missing subslot
spa info


I am also having the same problem, and I am also interested to
have the S/N of the SPA
Indeed "show inventory" seems the best way to do it.
has anyone added "show inventory" parser yet?
otherwise I can try to add it and post here.

Yuval


On Wed, Jun 27, 2007 at 10:50 PM, Elliott, Andrew
Post by Elliott, Andrew
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups
include
Post by Elliott, Andrew
the SUBSLOT
Post by Elliott, Andrew
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the
output I
Post by Elliott, Andrew
want rancid to
Post by Elliott, Andrew
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status
is ok
Post by Elliott, Andrew
Post by Elliott, Andrew
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit
Ethernet Shared Port
Post by Elliott, Andrew
Post by Elliott, Andrew
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun
deploying, and
Post by Elliott, Andrew
Post by Elliott, Andrew
currently all that is backed up is the main SPA IC
information, not the
Post by Elliott, Andrew
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have
GSRs anymore.
CHR1.NYC-NY#sho diag 1


SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)

MAIN: type 149, 00-0000-00 rev A0
Deviation: D090170
HW config: 0x20 SW key: 00-00-00
PCA: 00-00000-00 rev A0 ver 4
Design Release 1.0 S/N SAD000000M0
MBUS: Embedded Agent
Test hist: 0x00 RMA#: 00-00-00 RMA hist:
0x00
DIAG: Test count: 0x00000000 Test results:
0x00000000
FRU: Linecard/Module: 12000-SIP-601=
Processor Memory: MEM-LC5-2048=(Non-Replaceable)
Packet Memory: MEM-LC5-PKT-256=(Non-Replaceable)
L3 Engine: 5 - ISE 10 Gbps
MBUS Agent Software version 2.51 (RAM) (ROM version is
3.50)
ROM Monitor version 17.1
Fabric Downloader version used 4.1 (ROM version is 4.1)
Primary clock is CSC 1
Board is analyzed
Board State is Line Card Enabled (IOS RUN )
Insertion time: 00:22:52 (2w4d ago)
Processor Memory size: 2147483648 bytes
TX Packet Memory size: 268435456 bytes, Packet Memory
pagesize: 32768
bytes
RX Packet Memory size: 268435456 bytes, Packet Memory
pagesize: 32768
bytes
0 crashes since restart


SPA Information:
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty

CHR1.NYC-NY#
Post by Elliott, Andrew
Post by Elliott, Andrew
It is possible I am using a version of rancid that
needs to
Post by Elliott, Andrew
be upgraded
Post by Elliott, Andrew
and/or patched.
possibly. 'show inventory' has been added and that
ought to
Post by Elliott, Andrew
include this
information...if cisco has gotten around to adding it
to this platform
Post by Elliott, Andrew
yet.
Looks like this might be the best way to go.
Yuval Ben Ari
2008-03-03 17:57:18 UTC
Permalink
thanks!, I will try it
Post by Elliott, Andrew
# This routine parses "show inventory".
sub ShowInventory {
print STDERR " In ShowInventory: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
return if (/^\s*\^$/);
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(-1) if (/command authorization failed/i);
# the pager can not be disabled per-session on the PIX
if (/^(<-+ More -+>)/) {
my($len) = length($1);
s/^$1\s{$len}//;
}
if (/^(NAME: "[^"]*",) (DESCR: "[^"]+")/) {
ProcessHistory("INVENTORY","","", sprintf("!%-30s %s\n", $1,
$2));
next;
}
# split PID/VID/SN line
if (/^PID: (\S*)\s*, VID: (\S*)\s*, SN: (\S*)\s*$/) {
my($entries) = "";
$entries .= "!PID: $1\n" if ($1);
$entries .= "!VID: $2\n" if ($2);
$entries .= "!SN: $3\n" if ($3);
ProcessHistory("INVENTORY","","", "$entries");
next;
}
ProcessHistory("INVENTORY","","","!$_");
}
ProcessHistory("INVENTORY","","","!\n");
return(0);
}
@commandtable = (
{'show inventory raw' => 'ShowInventory'},
---
Andrew Elliott
XO Communications
desk: 989.758.6987
cell: 989.213.5794
________________________________
Sent: Sunday, March 02, 2008 9:13 AM
To: Elliott, Andrew
Subject: Re: [rancid] Re: GSR 12k - sho diag / missing subslot
spa info
I am also having the same problem, and I am also interested to
have the S/N of the SPA
Indeed "show inventory" seems the best way to do it.
has anyone added "show inventory" parser yet?
otherwise I can try to add it and post here.
Yuval
On Wed, Jun 27, 2007 at 10:50 PM, Elliott, Andrew
Post by Elliott, Andrew
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups
include
Post by Elliott, Andrew
the SUBSLOT
Post by Elliott, Andrew
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the
output I
Post by Elliott, Andrew
want rancid to
Post by Elliott, Andrew
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status
is ok
Post by Elliott, Andrew
Post by Elliott, Andrew
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit
Ethernet Shared Port
Post by Elliott, Andrew
Post by Elliott, Andrew
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun
deploying, and
Post by Elliott, Andrew
Post by Elliott, Andrew
currently all that is backed up is the main SPA IC
information, not the
Post by Elliott, Andrew
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have
GSRs anymore.
CHR1.NYC-NY#sho diag 1
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
MAIN: type 149, 00-0000-00 rev A0
Deviation: D090170
HW config: 0x20 SW key: 00-00-00
PCA: 00-00000-00 rev A0 ver 4
Design Release 1.0 S/N SAD000000M0
MBUS: Embedded Agent
Test hist: 0x00 RMA#: 00-00-00 RMA hist: 0x00
0x00000000
FRU: Linecard/Module: 12000-SIP-601=
Processor Memory: MEM-LC5-2048=(Non-Replaceable)
Packet Memory: MEM-LC5-PKT-256=(Non-Replaceable)
L3 Engine: 5 - ISE 10 Gbps
MBUS Agent Software version 2.51 (RAM) (ROM version is 3.50)
ROM Monitor version 17.1
Fabric Downloader version used 4.1 (ROM version is 4.1)
Primary clock is CSC 1
Board is analyzed
Board State is Line Card Enabled (IOS RUN )
Insertion time: 00:22:52 (2w4d ago)
Processor Memory size: 2147483648 bytes
TX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
RX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
0 crashes since restart
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
CHR1.NYC-NY#
Post by Elliott, Andrew
Post by Elliott, Andrew
It is possible I am using a version of rancid that
needs to
Post by Elliott, Andrew
be upgraded
Post by Elliott, Andrew
and/or patched.
possibly. 'show inventory' has been added and that
ought to
Post by Elliott, Andrew
include this
information...if cisco has gotten around to adding it
to this platform
Post by Elliott, Andrew
yet.
Yuval Ben Ari
2008-04-06 11:14:48 UTC
Permalink
it works ok but it's a bit messy and will be hard to parse (I parse the
PID/SN from there)
any idea why we need the "raw" keyword? without it I still seem to have all
the info I need.
also I noticed that a 4GE-SFP-LC= linecard appears as PID: 800-22811-06
instead of the part name.
any idea if it's a bug?
Post by Yuval Ben Ari
thanks!, I will try it
Post by Elliott, Andrew
# This routine parses "show inventory".
sub ShowInventory {
print STDERR " In ShowInventory: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
return if (/^\s*\^$/);
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(-1) if (/command authorization failed/i);
# the pager can not be disabled per-session on the PIX
if (/^(<-+ More -+>)/) {
my($len) = length($1);
s/^$1\s{$len}//;
}
if (/^(NAME: "[^"]*",) (DESCR: "[^"]+")/) {
ProcessHistory("INVENTORY","","", sprintf("!%-30s %s\n", $1,
$2));
next;
}
# split PID/VID/SN line
if (/^PID: (\S*)\s*, VID: (\S*)\s*, SN: (\S*)\s*$/) {
my($entries) = "";
$entries .= "!PID: $1\n" if ($1);
$entries .= "!VID: $2\n" if ($2);
$entries .= "!SN: $3\n" if ($3);
ProcessHistory("INVENTORY","","", "$entries");
next;
}
ProcessHistory("INVENTORY","","","!$_");
}
ProcessHistory("INVENTORY","","","!\n");
return(0);
}
@commandtable = (
{'show inventory raw' => 'ShowInventory'},
---
Andrew Elliott
XO Communications
desk: 989.758.6987
cell: 989.213.5794
________________________________
Sent: Sunday, March 02, 2008 9:13 AM
To: Elliott, Andrew
Subject: Re: [rancid] Re: GSR 12k - sho diag / missing subslot
spa info
I am also having the same problem, and I am also interested to
have the S/N of the SPA
Indeed "show inventory" seems the best way to do it.
has anyone added "show inventory" parser yet?
otherwise I can try to add it and post here.
Yuval
On Wed, Jun 27, 2007 at 10:50 PM, Elliott, Andrew
Post by Elliott, Andrew
Post by Elliott, Andrew
Hello,
I have been recently asked that my router backups
include
Post by Elliott, Andrew
the SUBSLOT
Post by Elliott, Andrew
line from 'sho diag' on the 12k's.
Here is an example (trimmed for brevity) of the
output I
Post by Elliott, Andrew
want rancid to
Post by Elliott, Andrew
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
-snip-
subslot 1/0: SPA-10X1GE-V2 (0x508), status
is ok
Post by Elliott, Andrew
Post by Elliott, Andrew
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
SUBSLOT 1/0 (SPA-10X1GE-V2): 10-port Gigabit
Ethernet Shared Port
Post by Elliott, Andrew
Post by Elliott, Andrew
Adapter
Product Identifier (PID) : SPA-10X1GE-V2
-snip-
This is a new card type that we have recently begun
deploying, and
Post by Elliott, Andrew
Post by Elliott, Andrew
currently all that is backed up is the main SPA IC
information, not the
Post by Elliott, Andrew
info on the "SUBSLOT" or "SPA -> subslot" lines.
I'd need to have the complete output; I don't have
GSRs anymore.
CHR1.NYC-NY#sho diag 1
SLOT 1 (RP/LC 1 ): Modular SPA Interface Card (10G)
MAIN: type 149, 00-0000-00 rev A0
Deviation: D090170
HW config: 0x20 SW key: 00-00-00
PCA: 00-00000-00 rev A0 ver 4
Design Release 1.0 S/N SAD000000M0
MBUS: Embedded Agent
Test hist: 0x00 RMA#: 00-00-00 RMA hist: 0x00
DIAG: Test count: 0x00000000 Test results: 0x00000000
FRU: Linecard/Module: 12000-SIP-601=
Processor Memory: MEM-LC5-2048=(Non-Replaceable)
Packet Memory: MEM-LC5-PKT-256=(Non-Replaceable)
L3 Engine: 5 - ISE 10 Gbps
MBUS Agent Software version 2.51 (RAM) (ROM version is 3.50)
ROM Monitor version 17.1
Fabric Downloader version used 4.1 (ROM version is 4.1)
Primary clock is CSC 1
Board is analyzed
Board State is Line Card Enabled (IOS RUN )
Insertion time: 00:22:52 (2w4d ago)
Processor Memory size: 2147483648 bytes
TX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
RX Packet Memory size: 268435456 bytes, Packet Memory pagesize: 32768
bytes
0 crashes since restart
subslot 1/0: SPA-10X1GE-V2 (0x508), status is ok
subslot 1/1: Empty
subslot 1/2: Empty
subslot 1/3: Empty
CHR1.NYC-NY#
Post by Elliott, Andrew
Post by Elliott, Andrew
It is possible I am using a version of rancid that
needs to
Post by Elliott, Andrew
be upgraded
Post by Elliott, Andrew
and/or patched.
possibly. 'show inventory' has been added and that
ought to
Post by Elliott, Andrew
include this
information...if cisco has gotten around to adding it
to this platform
Post by Elliott, Andrew
yet.
Loading...