- New and Changed
- Preface
- Overview
- Using the CFS Infrastructure
- Configuring System Message Logging
- Configuring Call Home
- Scheduling Maintenance Jobs
- Monitoring System Processes and Logs
- Configuring SNMP
- Configuring RMON
- Configuring Domain Parameters
- Monitoring Network Traffic Using SPAN
- Configuring Fabric Configuration Server
Scheduling Maintenance Jobs
The Cisco MDS command scheduler feature helps you schedule configuration and maintenance jobs in any switch in the Cisco MDS 9000 Family.You can use this feature to schedule jobs on a one-time basis or periodically.
This chapter includes the following sections:
•Configuring the Command Scheduler
About the Command Scheduler
The Cisco NX-OS command scheduler provides a facility to schedule a job (set of CLI commands) or multiple jobs at a specified time in the future. The job(s) can be executed once at a specified time in the future or at periodic intervals.
Note To use the command scheduler, you do not need to obtain any license.
You can use this feature to schedule zone set changes, make QoS policy changes, back up data, save the configuration and do other similar jobs.
Scheduler Terminology
The following terms are used in this chapter.
•Job—A job is a set of NX-OS CLI commands (EXEC and config mode) that are executed as defined in the schedule.
•Schedule—A schedule determines the time when the assigned jobs must be executed. Multiple jobs can be assigned to a schedule. A schedule executes in one of two modes: one-time or periodic.
•Periodic mode—A job is executed at the user-specified periodic intervals, until it is deleted by the administrator. The following types of periodic intervals are supported:
–Daily—The job is executed once a day.
–Weekly—The job is executed once a week.
–Monthly—The job is executed once a month.
–Delta—The job is executed beginning at the specified start time and thereafter at user-specified intervals (days:hours:minutes).
•One-time mode—The job is executed once at a user-specified time.
Scheduling Guidelines
Before scheduling jobs on a Cisco MDS switch, be aware of the following guidelines:
•Prior to Cisco MDS SAN-OS Release 3.0(3), only users local to the switch could perform scheduler configuration. As of Cisco MDS SAN-OS Release 3.0(3), remote users can perform job scheduling using AAA authentication.
•Be aware that the scheduled job can fail if it encounters one of the following situations when executing the job:
–If the license has expired for a feature at the time when a job containing commands pertaining to that feature is scheduled.
–If a feature is disabled at the time when a job containing commands pertaining to that feature is scheduled.
–If you have removed a module from a slot and the job has commands pertaining to the interfaces for that module or slot.
•Verify that you have configured the time. The scheduler does not have any default time configured. If you create a schedule and assign job(s) and do not configure the time, that schedule is not launched.
•While defining a job, verify that no interactive or disruptive commands (for example, copy bootflash: file ftp: URI, write erase, and other similar commands) are specified as part of a job because the job is executed noninteractively at the scheduled time.
Configuring the Command Scheduler
To configure the command scheduler, follow these steps:
Step 1 Enable the scheduler.
Step 2 Authorize remote user access (optional).
Step 3 Define the job.
Step 4 Specify the schedule and assign jobs to the schedule.
Step 5 Specify the time for the schedule(s).
Step 6 Verify the scheduled configuration.
This section includes the following topics:
•Enabling the Command Scheduler
•Configuring Remote User Authentication
•Verifying the Command Scheduler Execution Status
Enabling the Command Scheduler
To use the scheduling feature, you must explicitly enable this feature on the required switches in the fabric. By default, this feature is disabled in all switches in the Cisco MDS 9000 Family.
The configuration and verification commands for the command scheduler feature are only available when this feature is enabled on a switch. When you disable this feature, all related configurations are automatically discarded.
To enable the command scheduling feature, follow these steps:
To display the command schedule status, use the show scheduler config command.
switch# show scheduler config
config terminal
feature scheduler
scheduler logfile size 16
end
Configuring Remote User Authentication
Prior to Cisco MDS SAN-OS Release 3.0(3), only users local to the switch could perform scheduler configuration. As of Cisco MDS SAN-OS Release 3.0(3), remote users can perform job scheduling using AAA authentication.
Note AAA authentication requires the clear text password of the remote user before creating and configuring command scheduler jobs.
To configure remote user authentication, follow these steps:
To display the scheduler password configuration for remote users, use the show running-config command.
switch# show running-config | include "scheduler aaa-authentication"
scheduler aaa-authentication username newuser password 7 "C98d76S54e"
Note The scheduler remote user passwords are always displayed in encrypted form in the show running-config command output. The encrypted option (7) in the command exists to support applying the ASCII configuration to the switch.
Defining a Job
To define a job, you must specify the job name. This action places you in the job definition (config-job)
submode. In this submode, you can define the sequence of CLI commands that the job has to perform. Be sure to exit the config-job submode to complete the job definition.
Note•Job configuration files created using MDS NX-OS or SAN-OS releases before Cisco MDS NX-OS Release 4.1(1b) are not supported. However, you can edit the job configuration file and combine the commands within a job into a single line using a semicolon (;).
•You must exit the config-job submode for the job definition to be complete.
•You cannot modify or remove a command after exiting the config-job submode. To make changes, you must explicitly delete the defined job name and then reconfigure the job with new commands.
To define a job for the command scheduler, follow these steps:
Verifying the Job Definition
To verify the job definition, use the show scheduler job command.
switch# show scheduler job addMemVsan99
Job Name: addMemVsan99
----------------------
config terminal
vsan database
vsan 99 interface fc1/1
vsan 99 interface fc1/2
vsan 99 interface fc1/3
vsan 99 interface fc1/4
Deleting a Job
To delete a job for the command scheduler, follow these steps:
Specifying a Schedule
After defining jobs, you can create schedules and assign jobs to the schedule. Subsequently, you can configure the time of execution. The execution can be one-time or periodic depending on your requirements. If the time for the schedule is not configured, then it will never be executed.
Specifying a Periodic Schedule
When you specify a periodic job execution, that job is executed periodically at the specified (daily, weekly, monthly, or delta) intervals.
To specify a periodic job for the command scheduler, follow these steps:
The following examples are for reference:
The most significant fields in the time parameter are optional. If you omit the most significant fields, the values are assumed to be the same as the current time. For example, if the current time is September 24, 2004, 22:00 hours, then the commands are executed as follows:
•The time start 23:00 repeat 4:00:00 command implies a start time of September 24, 2004, 23:00 hours.
•The time daily 55 command implies every day at 22:55 hours.
•The time weekly 23:00 command implies every Friday at 23:00 hours.
•The time monthly 23:00 command implies the 24th of every month at 23:00 hours.
Note If the time interval configured for any schedule is smaller than the time taken to execute its assigned job(s), then the subsequent schedule execution occurs only after the configured interval amount of time has elapsed following the completion time of the last iteration of the schedule. For example, a schedule is executed at 1-minute intervals and a job assigned to it takes 2 minutes to complete. If the first schedule is at 22:00 hours, the job finishes at 22:02 after which the 1-minute interval is observed, and the next execution occurs at 22:03 and finishes at 22:05.
Specifying a One-Time Schedule
When you specify a one-time job execution, that job is only executed once.
To specify a one-time job for the command scheduler, follow these steps:
Verifying Scheduler Configuration
To display the scheduler configuration, use the show scheduler config command.
switch# show scheduler config
config terminal
feature scheduler
scheduler logfile size 512
end
config terminal
scheduler job name addMemVsan99
config terminal
vsan database
vsan 99 interface fc1/1
vsan 99 interface fc1/2
vsan 99 interface fc1/3
vsan 99 interface fc1/4
end
config terminal
scheduler schedule name configureVsan99
time start 2004:8:10:9:52
job name addMemVsan99
end
Deleting a Schedule
To delete a schedule, follow these steps:
|
|
|
---|---|---|
Step 1 |
switch# conf t switch(config)# |
Enters the configuration mode. |
Step 2 |
switch(config)# no scheduler schedule name weekendbackup |
Deletes the defined schedule. |
Removing an Assigned Job
To remove an assigned job, follow these steps:
Deleting a Schedule Time
To delete the schedule time, follow these steps:
Verifying the Command Scheduler Execution Status
To verify the command scheduler execution status, use the show scheduler schedule command.
switch# show scheduler schedule configureVsan99
Schedule Name : configureVsan99
------------------------------------
User Name : admin
Schedule Type : Run once on Tue Aug 10 09:48:00 2004
Last Execution Time: Tue Aug 10 09:48:00 2004
-----------------------------------------------
Job Name Status
-----------------------------------------------
addMemVsan99 Success (0)
Execution Logs
This section describes execution logs for the command scheduler and contains the following sections:
•Clearing the Execution Log File Contents
About Execution Logs
The command scheduler maintains a log file. While you cannot modify the contents of this file, you can change the file size. This log file is a circular log that contains the output of the job executed. If the output of the job is greater than the log file, then the output stored in this file remains truncated.
You can configure the log file size to be a maximum of 1024 KB. The default size of the execution log file is 16 KB.
Configuring Execution Logs
To configure the execution log file size, follow these steps:
To display the execution log file configuration, use the show scheduler config command.
switch# show scheduler config
config terminal
feature scheduler
scheduler logfile size 1024
end
Displaying Execution Log File Contents
To display the execution log for all jobs executed in the system, use the show scheduler logfile command.
switch# show scheduler logfile
Job Name : addMemVsan99 Job Status: Success (0)
Schedule Name : configureVsan99 User Name : admin
Completion time: Tue Aug 10 09:48:00 2004
--------------------------- Job Output ---------------------------
`config terminal`
`vsan database`
`vsan 99 interface fc1/1`
`vsan 99 interface fc1/2`
`vsan 99 interface fc1/3`
`vsan 99 interface fc1/4`
Clearing the Execution Log File Contents
To clear the contents of the scheduler execution log file, issue the clear scheduler logfile command in EXEC mode.
switch# clear scheduler logfile
Default Settings
Table 5-1 lists the default settings for command scheduling parameters.
|
|
---|---|
Command scheduler |
Disabled. |
Log file size |
16 KB. |