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?
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
Cisco prime could do it too if you have that ., you can build custom reports and output collections from devices using its reporting tools
This is what they want me to run and dump to file 3 times a day for 3 days:
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
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
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?