Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Display Commit Script Output

You can use Junos OS CLI commands to monitor and troubleshoot commit scripts. Table 1 summarizes some common commands. For information about commit script trace files, see Trace Commit Script Processing on Devices Running Junos OS and Trace Script Processing on Devices Running Junos OS Evolved.

Table 1: Commit Script Configuration and Operational Mode Commands

Task

Command

Configuration Mode Commands

Display errors and warnings generated by commit scripts.

commit or commit check

Display detailed information about the commit operation and commit script execution.

commit | display detail

Display the underlying Extensible Markup Language (XML) data.

commit | display xml

Display the postinheritance contents of the configuration database. This view includes transient changes, but does not include changes made in configuration groups.

show | display commit-scripts

Display the postinheritance contents of the configuration database. This view excludes transient changes.

show | display commit-scripts no-transients

Display the postinheritance configuration in XML format. Each commit script receives this configuration format as input.

Viewing the configuration in XML format can be helpful when you are writing XML Path Language (XPath) expressions and configuration element tags.

show | display commit-scripts view

Display the postinheritance configuration in XML format, but exclude transient changes.

show | display commit-scripts view | display commit-scripts no-transients

Display all configuration groups data, including script-generated changes to the groups.

show groups | display commit-scripts

Display a particular configuration group, including script-generated changes to the group.

show groups group-name | display commit-scripts

Operational Mode Commands (Junos OS)

Display logging data associated with all commit script processing.

show log cscript.log

Display processing for only the most recent commit operation.

show log cscript.log | last

Display processing for script errors.

show log cscript.log | match error

Display processing for a particular script.

show log cscript.log | match filename

Operational Mode Commands (Junos OS Evolved)

Display trace data for all script processing, including commit scripts.

show trace application cscript

Display trace data for all script processing but only display the timestamp and message.

show trace application cscript terset