Script control commands

script-control

Syntax

script-control

Context

config>system

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

Commands in this context configure the script and script parameters.

script

Syntax

script script-name [owner script-owner]

no script

Context

config>system>script-control>script-policy

config>system>script-control

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command is used to configure a script to be run.

The no form of this command removes the script.

Default

no script

Parameters

script-name

Specifies the name of the script, up to 32 characters.

script-owner

Specifies the name of the script owner, up to 32 characters.

The owner is an arbitrary name and not necessarily a user name. Commands in the scripts are not authorized against the owner.

Default

‟TiMOS CLI”

location

Syntax

location file-url

no location

Context

config>system>script-control>script

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command is used to identify the location of a script to be scheduled.

The no form of this command removes the location.

Default

no location

Parameters

file-url

Specifies the location to search for scripts.

Values

file-url — local-url | remote-url

local-url — [cflash-id/] [file-path]

255 chars maximum, including cflash-id directory length 99 characters maximum each

remote url — [{ftp:// | tftp://}| login:password@remote-location/][file- path]

255 characters maximum

directory length 99 characters maximum each

remote-location — [hostname | ipv4-address | ipv6-address]

  • ipv4-address — a.b.c.d
  • ipv6-address — x:x:x:x:x:x:x:x[-interface]
  • x:x:x:x:x:x:d.d.d.d[-interface]
  • x — 0 to FFFF (hexadecimal)
  • d — 0 to 255 (decimal)
  • interface — 32 characters maximum, for link local addresses

cflash-id — cf1:

usb-flash-id — uf1:

script-policy

Syntax

[no] script-policy policy-name [owner policy-owner]

Context

config>system>script-control

config>system>cron>schedule

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

Commands in this context configure script policy parameters for a script.

Parameters

policy-name

Specifies the name of the policy, up to 32 characters.

policy-owner

Specifies the name of the policy owner, up to 32 characters.

The owner is an arbitrary name and not necessarily a user name. Commands in the scripts are not authorized against the owner.

Default

‟TiMOS CLI”

expire-time

Syntax

expire-time {seconds | forever}

Context

config>system>script-control>script-policy

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command is used to configure the maximum length of time to keep the run history status entry from a script run.

Default

expire-time 3600

Parameters

seconds

Specifies the time to keep the run history status entry, in seconds.

Values

0 to 21474836

forever

Keyword to run the history status entry indefinitely.

lifetime

Syntax

lifetime {seconds | forever}

Context

config>system>script-control>script-policy

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command is used to configure the maximum length of time that a script may run.

Default

lifetime 3600

Parameters

seconds

Specifies the maximum amount of time that a script may run, in seconds.

Values

0 to 21474836

forever

Keyword to allow a script to run indefinitely.

max-completed

Syntax

max-completed unsigned

Context

config>system>script-control>script-policy

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command enables user to configure the maximum number of scripts to keep the run history status entries.

Default

max-completed 1

Parameters

unsigned

Specifies the maximum number of script run history status entries to keep.

Values

1 to 1500

results

Syntax

results file-url

no results

Context

config>system>script-control>script-policy

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies the location where the system writes the output of an event script’s execution.

The no form of this command removes the file location from the configuration. Scripts will not execute if there is no result location defined.

Default

no results

Parameters

file-url

Specifies the location to send the CLI output from script runs. The file-url is a location, directory, and filename prefix to which a data and timestamp suffix is added when the results files are created during a script run, as follows:

file-url_YYYYMMDD-hhmmss.uuuuuu.out

where: YYYYMMDD — date

hhmmss — hours, minutes, and seconds

uuuuuu — microseconds (padded to 6 characters with leading zeros)

Values

file-url — local-url | remote-url

local-url — [cflash-id/] [file-path]

255 chars maximum, including cflash-id directory length 99 characters maximum each

remote url — [{ftp:// | tftp://}| login:password@remote-location/][file- path]

255 characters maximum

directory length 99 characters maximum each

remote-location — [hostname | ipv4-address | ipv6-address]

  • ipv4-address — a.b.c.d
  • ipv6-address — x:x:x:x:x:x:x:x[-interface]
  • x:x:x:x:x:x:d.d.d.d[-interface]
  • x — 0 to FFFF (hexadecimal)
  • d — 0 to 255 (decimal)
  • interface — 32 characters maximum, for link local addresses

cflash-id — cf1:

usb-flash-id — uf1: