Python Forum
How to get specific output on interface? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: How to get specific output on interface? (/thread-15018.html)



How to get specific output on interface? - searching1 - Dec-30-2018

Hi, I'm currently working on a project and I want to get specific output for the show interface on cisco device?

Ex.
lab-sw01#sh int f0/0 | i rate
Queueing strategy: fifo
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec

For this output I only want to get the input and output rate?

Thanks


RE: How to get specific output on interface? - Larz60+ - Dec-30-2018

Sounds like this question should be directed to a Cisco forum, perhaps: https://hardforum.com/threads/cisco-lab.1409412/


RE: How to get specific output on interface? - searching1 - Dec-31-2018

@Larz60+, I'm referring to python script..

Though I already found the answer.... They put the interface output from cisco to a specific variable the use regex to match specific string.


RE: How to get specific output on interface? - Larz60+ - Dec-31-2018

OK, please post code so we can help.