timeout | Defines the timeout period in seconds. |
Regular script: no time limit default.xsf: 500 seconds autoexec.xsf: 500 seconds
This command configures the maximum run time for all scripts, including default.xsf and autoexec.xsf, which are described in Software Upgrade and Boot Options in the ExtremeXOS 22.4 User Guide. If no timeout period is configured, regular scripts do not timeout, and the default.xsf and autoexec.xsf scripts time out after 500 seconds.
If a script does not finish running in the configured time, command execution stops and an error message is logged. If the timer expires while a command is executing, the command execution continues and all following commands are not executed.
If the timer command is executed inside a script, the timer is reset. If the command is issued more than once inside a script the last timer command executed resets the timer. The timer is valid only for that session. The use of nested scripts does not extend the execution period. When the parent script reaches the timeout value, the parent script and all nested scripts terminate.
To configure a different timeout value for autoexec.xsf or default.xsf, the configure cli script timeout command should be the first command in the script.
When a script timeout value is configured, the following variables are created: $CLI.SCRIPT_TIMEOUT and $CLI.SCRIPT_TIME_REMAINING. If no timeout value is configured for a session, the variables are not created.
You can use the $CLI.SCRIPT_TIMEOUT variable to adjust the timeout value. The $CLI.SCRIPT_TIME_REMAINING variable returns the time remaining. When a timeout value is configured, the variable values are as follows:
The following example configures the switch to terminate a script after 120 seconds:
configure cli script timeout 120
This command was first available in ExtremeXOS 12.4.
This command is available on the Summit X450-G2, X460-G2, X670-G2, X770, and ExtremeSwitching X440-G2, X620, X690, X870 series switches.