09-11-2019 02:23 AM
Hello,
Cisco are asking me to run some commands on a Nexus switch 3 times a day and for a few days. There are about 10 show and run bash commands I need to run manually.
Is there a tool I can schedule all this and dump to a file?
Thanks
09-11-2019 03:31 AM - edited 09-11-2019 03:33 AM
Hi
Cisco Nexus supports EEM you could run the standard commands and dump them to bootflash , or send them to yourself by email either , not sure you may have tweak script get it for bash though
This is just an example would run every 6 hours dump results toi flash depending on comamds in text file , you may need to tweak it
event manager applet Collect_Results
event timer watchdog time 21600
action 1.0 cli command "enable"
action 2.0 cli command "show logging | append bootflash:Results"
action 2.5 cli command"show run | append bootflash:Results"
action 3.0 syslog priority notifications msg " Running_Config_Backup_Complete"
check this too for email and working examples , you could build your own script for it
https://www.ciscozine.com/send-email-from-your-router-using-eem/
Cisco prime could do it too if you have that ., you can build custom reports and output collections from devices using its reporting tools
09-12-2019 01:29 AM
Thanks,
This is what they want me to run and dump to file 3 times a day for 3 days:
show clock
show system resources
show system internal memory-status
show system internal kernel meminfo
show system internal memory-alerts-log
show system internal flash
run bash sudo cat /proc/slabinfo
b)
show virtual-service list
show virtual-service detail
run bash sudo pstree -Aap 1
run bash sudo lsof
run bash sudo cat /proc/mounts
run bash sudo cat /cgroup/1/services/vdc_1_guestshell+/memory.limit_in_bytes
run bash sudo cat /cgroup/1/services/vdc_1_guestshell+/memory.usage_in_bytes
guestshell run sudo df -h
c)
run bash sudo ls -trlh /bootflash/
run bash sudo ls -trlh /mnt/pss
run bash sudo ls -trlh /bootflash/virt_strg_pool_bf_vdc_1/_rootfs.guestshell+
Do you think this is possible?
09-12-2019 02:47 AM
09-12-2019 04:23 AM
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