Automation

last person joined: 8 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  How to get interface-flapped value in seconds?

    Posted 02-11-2013 07:56

    Hi,

     

    I am trying to get interface-flapped value in seconds. When I use <get-interface-information>  I can refer to ./interface-flapped which will give me the results in Days&hours

     

    when i display the xml format for show interfaces ( show interfaces | display xml ) I see that the last flapped value is tracked in seconds:

    <interface-flapped junos:seconds="273880">2013-02-08 01:48:40 EST (3d 04:04 ago)</interface-flapped>

    In my slax script how could I retrieve the "junos:seconds"  instead of the full date/day&hours?

     

    Thanks

    David

     



  • 2.  RE: How to get interface-flapped value in seconds?
    Best Answer

    Posted 02-11-2013 08:42

    Found the answer:

     

    ./interface-flapped/@junos:seconds

     

    will return interface flapped time in seconds!

     

     

    ./interface-flapped  output:

    2013-02-08 01:48:40 EST (3d 04:50 ago)

     

    ./interface-flapped/@junos:seconds output:

    276603

     

    Thanks

    David