The router is having an issue where we are unable to login to the router using console or mgmt ports. Other components of router is working fine. RSP reload is the only way we can get access to the router.
Since the access to router is disabled we cannot login to the router in order to collect the logs to debug this issue further.
We can use EEM script inorder to collect the logs and save it into a file in harddisk. This EEM script will run every 30 mins and dump the logs into the file. The cron entry can be changed incase we want to run it once every day or some other period.
Logs that the script collects:
show proc devc-vty show proc devc-conaux show log sh processes cpu Show users Show line
event manager environment _cron_entry 30,0 * * * 0-6 <<<<< runs script every 30 mins
event manager directory user policy harddisk:/scripts/