11-23-2016 01:18 PM
Dear all,
i would like to get your expertise related to run a script to check if my LMS application user (ABCD) hang on managed routers and switches. 141.242.202.22 is my LMS server's IP
here is the command to check
MyLABR3#show users | inc ABCD
* 2 vty 0 ABCD idle 12:34:00 141.242.202.22
MyLABR3#
could you please let me know how can i capture "12:34:00" and send it to a csv file?
Thank you very much for your help!
Victor
11-23-2016 06:21 PM
Ironically there is a tool within LMS - netshow - that allows you to archive output of show commands run across multiple devices.
The output is a plain text file but it could be parsed by Excel into a csv relatively easily.
Reference:
http://www.cisco.com/c/en/us/td/docs/net_mgmt/ciscoworks_lan_management_solution/4-2/user/guide/lms_monitor/lms_mnt/mnt-netshow.html
If you want more customization anbd don't want to use LMS, then you could script something together. You might look at the open source netmiko project on Github for some ideas:
https://github.com/ktbyers/netmiko
If you use it, be sure to add "dev ops" to your resume. Your cred will jump +5. :)
02-21-2017 04:20 PM
Thanks a lot Mr. Rhoads !!!!!
02-21-2017 04:25 PM
You're welcome. Please mark your question as answered if it has been.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide