This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NCM - Capture Flash Free Space from Catalyst Switches

Apologies if this is already posted somewhere as I couldn't find specifically what I'm looking for. 

I'm working with several hundreds of varying Cisco Catalyst switches. What we are trying to do is automate a firmware upgrade process using a custom config change template. Currently there is logic to perform a file copy via an ftp server based on the switch model of the node, which is working great. The problem I'm running into is determining a way to view the existing free space in flash, and have the script do something else based on that value. Ideally, i'd like to capture that info as a variable, and if there's enough free space on flash to continue to copy over the file, and if there isn't enough free space to do something else. 

I understand that there's already a built in Firmware Upgrade operation built in, but it doesn't meet our needs at this time.I also understand that some of this might not be possible since the scripting references data that NCM already has prior to runtime. I've gone as far as redirecting commands to a text file in flash, trying to read the data and do something with that, but haven't gotten any real success there. The nodes themselves do not seem to be capturing this data either with the pollers we are using, so if there's a way to capture it that way that would be a good step forward. 

Any help in this would be greatly appreciated. Thanks!