Blog Viewer

Scripting How-To: Use the 'direct-access' feature with a commit script

By Erdem posted 08-07-2015 18:11

  

Use the 'direct-access' Feature with a Commit Script

 

For the execution of a commit script, mgd passes the complete candidate configuration as input to the cscript utility. In case of a scaled configuration scenario, when the configuration is huge and it occupies  a lot of memory, the whole configuration can be passed as input to cscript. 
 
To overcome passing the whole configuration, use the 'direct-access' feature.
 
If you enable the 'direct-access' feature, while executing a commit script, mgd does not pass the candidate configuration to cscript. Instead, cscript directly accesses the configuration by accessing the configuration database.
 
This reduces the memory consumption of the cscript process during execution of commit scripts. 
 
Use the following knob to enable this feature:
 
1
[edit system scripts commit direct-access]

 

NOTE: This feature makes execution of the commit script a bit slow, so use it consciously.

 

 


#ScriptingHow-To
#commitscript
#direct-access
#How-To

Permalink