cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
435
Views
2
Helpful
2
Replies

EEM script| BOOTFLASH| @cisco ASR1001-X

Ansh 1
Level 1
Level 1

I have to track and monitor BOOTFLASH for which i need total free flash space for the entire flash memory device as a whole, instead of  each partition's free space.

Is there any EEM script for the above ?

Device: Cisco IOS XE Software, Version 17.09.04a

2 Replies 2

Hello @Ansh 1 ,

You can use the command dir boot flash: | include bytes to get the free and total amount of space on the boot flash filesystem.

router#dir bootflash: | include bytes
2885718016 bytes total (329277440 bytes free)

You can include this command in your EEM script which will be dependant on what kind of monitoring and alerting you want from your script.

Hope this helps.

Regards, LG
*** Please Rate All Helpful Responses ***

Hello,

adding to @liviu.gheorghe suggestions, you can use a script such as the one below, which would run every day at midnight and send an email to you with the output of that command"

event manager environment _email_to your-to-mail@domain.com
event manager environment _email_server your.mail.server
event manager environment _email_from your-from-mail@domain.com

event manager applet send_boot_flash_info
event timer cron name daily cron-entry "0 0 * * *"
action 1.0 cli command "enable"
action 1.1 cli command "dir boot flash: | include bytes"
action 1.2 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$_event_pub_time: Bootflash Info" body "$_cli_result"