Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Network Configuration Manager (NCM) > NCM - Knowledgebase Articles > NCM Script to push a Banner Change takes a while to execute

NCM Script to push a Banner Change takes a while to execute

Created by Bill Corgey, last modified by Bill Corgey on Oct 18, 2016

Views: 1,393 Votes: 2 Revisions: 6

Overview

In short, there are some mechanics of a Banner Command and NCM logic that conflicts and caused a lot of overhead creating slow performance or hangs the application or even the server.  In order to alleviate this pressure, we can add a couple of Macros to the script to temporarily bypass some NCM logic and effectively increase efficiency

Environment

NCM version 6.1 or later

Cause 

When NCM issues a command, it needs to examine each blob that is returned to check if the prompt has been returned to know what the next course of action it should take. In the case of how the banner command is, the entire banner is processed with a few characters at a time.  This creates a delay as NCM has to process the logic that could take 3 seconds or more very frequently

Resolution

  1. In the execute command script, on the line after the conf t command is issued add the macro:
    ${DisablePromptDetection}
  2. After the last deliminator in the banner is written, drop down a line and add the macro :
    ${EnablePromptDetection}

 

Example:

conf t

${DisablePromptDetection}

banner motd ^C

PLEASE DO NOT CHANGE THE HOSTNAME OF THIS DEVICE
OR CHANGE USERNAMES AND PASSWORDS!

^C 

${EnablePromptDetection}

end

 

It is crucial after the ${DisablePromptDetection} Macro is issued one does not neglect to have the ${EnablePromptDetection} back to turn it back on.  

 

To use this option in the config change template the template needs to have this added

string @disablePromptDetection = '${DisablePromptDetection}'
string @enablePromptDetection = '${EnablePromptDetection}'

 

 

then @disablePromptDetection used in the command where one would need to disable the prompt detection.

________________________________________________________

Example:

script ChangeMOTDBannerCiscoIOS (
                                           NCM.Nodes @ContextNode, 
                                           string @MOTDBanner   )
{
string @disablePromptDetection = '${DisablePromptDetection}'
string @enablePromptDetection = '${EnablePromptDetection}' 
  CLI
  {
configure terminal
@disablePromptDetection
no banner motd
banner login C@MOTDBanner C
@enablePromptDetection
end
  }


}

 

____________________________________________________________

 

 

 

Last modified

Tags

Classifications

Public
/*]]>*/