Description

This article discusses the expected behaviour when commits are seen in the system log due to the execution of SLAX scripts configured on a Juniper device. These scripts are designed to run in response to specific events, such as reboots, and are expected to result in commits.

Symptoms

Steps to Reproduce:

  1. Configure SLAX scripts for event-driven actions (e.g., reboot or error recovery).
  2. Ensure the event scripts are linked to specific events like system reboots or health checks.
  3. After the device reboots or the specified event occurs, check the system commit history.

Example of Expected Commit Logs:

Router1> show system commit
0  2025-01-21 11:50:14 UTC by net via junoscript
  SLAX-SCRIPT

 

This commit log entry indicates that the event-driven SLAX script was triggered to commit.

Solution

Explanation:

  • SLAX Script Execution: The router is configured with SLAX scripts that execute in response to system events. The show system commit command logs these actions.

    Example configuration of SLAX scripts:

    OP Scripts:
    system{
      scripts {
        op {
            file traf_shift.slax;
            file mpls.slax;
       }
      }
    }
    
    AND Event Scripts:
    
        event-options {
            event-script {
                file snmputility.slax;
                file traf_shift_chassis_rpd_crash.slax;
            }
        }
    
    
  • Commit Log Verification:After the router is rebooted, the script soft_shift_chassis_rpd_crash.slax is triggered:
    Jan 21 11:50:13 Router1 cscript: %DAEMON-4: traf_shift_chassis_rpd_crash.slax triggered due to Router rebooted after a normal shutdown.
    

    This matches the expected behaviour, confirming that the SLAX script executed successfully and caused the commit.

Conclusion:
The appearance of commits related to SLAX scripts in the show system commit output indicates that the scripts are functioning as designed, responding to events like system reboots, process restarts or health checks. This is expected behaviour and is a result of the scripts being configured to execute during specific system conditions.

 

Modification History

2025-02-02 : Article Created

Related Information

https://www.juniper.net/documentation/us/en/software/junos/automation-scripting/topics/concept/junos-script-automation-slax-overview.html