cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
519
Views
0
Helpful
3
Replies

how to run a script on LMS server and get output to a csv file

Victor Lin
Level 1
Level 1

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

3 Replies 3

Marvin Rhoads
Hall of Fame
Hall of Fame

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. :)

Thanks a lot Mr. Rhoads !!!!!

You're welcome. Please mark your question as answered if it has been.