Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help on parsing the show platform diag output #48

Closed
Rashmi-Nuviso opened this issue Nov 29, 2016 · 1 comment
Closed

Need help on parsing the show platform diag output #48

Rashmi-Nuviso opened this issue Nov 29, 2016 · 1 comment

Comments

@Rashmi-Nuviso
Copy link

Rashmi-Nuviso commented Nov 29, 2016

Need help on parsing this output 

raw output of the command show platform diag 

Chassis type: CSR1000V

Slot: R0, CSR1000V
  Running state               : ok, active
  Internal state              : online
  Internal operational state  : ok
  Physical insert detect time : 00:00:35 (4d16h ago)
  Software declared up time   : 00:00:35 (4d16h ago)

Slot: F0, CSR1000V
  Running state               : ok, active
  Internal state              : online
  Internal operational state  : ok
  Physical insert detect time : 00:00:35 (4d16h ago)
  Software declared up time   : 00:00:59 (4d16h ago)
  Hardware ready signal time  : 00:00:51 (4d16h ago)
  Packet ready signal time    : 00:01:06 (4d16h ago)

i have gave  my try to parse this out put 

TextFsm template for the above show platform diag output 

Value Ct (.*)
Value Slotno ((.*)[A-Z]\d+(.*))
Value rs (.+)
Value is (.+)
Value ios (.+)
Value pidt (.*)


Value sdut (.*)
Value hrst (.*)
Value prst (.*)

Start
  ^Chassis type: ${Ct}.* -> Continue.Record
  ^Slot: ${Slotno}\, -> Next.Record
  ^.*Running state\s+\:${rs}
  ^.*Internal state\s+\:${is}
  ^.*Internal operational state\s+\:${ios}
  ^.*Physical insert detect time\s+${pidt}
  ^.*Software declared up time\s+${sdut}
  ^.*Hardware ready signal time\s+${hrst}
  ^.*Packet ready signal time\s+${prst} -> Continue.Record

i want the table header to be 

Running state  Internal state Internal operational state Physical insert detect time Software declared up time Hardware ready signal time Packet ready signal time
and the respective values in the next row

Note  :  
the slot and the respective e details varies here as mentioned in the raw output .

show_platform-diag.txt

@itdependsnetworks
Copy link
Contributor

Should be able to close based on: #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants