2013年6月23日 星期日

event timer command

event timer

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of time-specific events, use the event timercommand in applet configuration mode. To remove the time-specific event criteria, use the no form of this command.
event [tag event-tagtimer {absolute time time-value | countdown time time-value | cron cron-entry cron-entry watchdog time time-value} [name timer-name]
no event [tag event-tagtimer {absolute time time-value | countdown time time-value | cron cron-entry cron-entry watchdog time time-value} [name timer-name]

Syntax Description


tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

absolute

Specifies that an event is triggered when the specified absolute time of day occurs.

time

Specifies the time interval during which the event must take place.

time-value

Integer that specifies, in seconds and optional milliseconds, the time interval during which the event must take place. The range for seconds is from 0 to 4294967295 and the range for milliseconds is from 0 to 999. The format is ssssss[.mmm]. When only milliseconds are specified, use the format 0.mmm.

countdown

Specifies that an event is triggered when the specified time counts down to zero. The timer does not reset.

cron

Specifies that an event is triggered when the CRON string specification matches the current time.

cron-entry

Specifies the first five fields of a UNIX crontab entry as used with the UNIX CRON daemon.

cron-entry

Text string that consists of five fields separated by spaces. The fields represent the times and dates when CRON timer events will be triggered. Fields and corresponding values are as follows:

minute—A number in the range from 0 to 59 that specifies when a CRON timer event is triggered.

hour—A number in the range from 0 to 23 that specifies when a CRON timer event is triggered.

day-of-month—A number in the range from 1 to 31 that specifies the day of the month when a CRON timer event is triggered.

month—A number in the range from 1 to 12 or the first three letters (not case-sensitive) of the name of the month in which a CRON timer event is triggered.

day-of-week—A number in the range from 0 to 6 (Sunday is 0) or the first three letters (not case-sensitive) of the name of the day when a CRON timer event is triggered.

Instead of the first five fields, special strings can be entered. See the "Usage Guidelines" section for details.

watchdog

Specifies that an event is triggered when the specified time counts down to zero. The timer automatically resets to the initial value and continues to count down.

name

(Optional) Specifies that the timer is named.

timer-name

(Optional) Name of the timer.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 4294967295, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).

Command Default

No EEM events are triggered on the basis of time-specific events.

Command Modes

Applet configuration

Command History


Release

Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added were added to support multiple event statements within an applet. The entry-val-is-increment, true, false, and exit-val-is-increment, keywords were deprecated.

Usage Guidelines

For the cron-entry argument, the following special strings also are allowed in syntax:
Range of numbers—The specified range is inclusive, and a hyphen separates the numbers. For example, 8-11 after the hour field specifies execution of a CRON timer event at hours 8, 9, 10, and 11.
Asterisk (*)—Indicates that a field is not specified and can be any value.
List—A list is a set of numbers or ranges separated by a comma but no space. For example, 1,2,5,9 or 0-4,8-12.
Step value in conjunction with a range—Following a range with /number specifies skips of the number value through the range. For example, 0-23/2 in the hour field specifies that an event is triggered every second hour. Steps are permitted after an asterisk, for example */2 means every two hours.
Instead of the five fields of a UNIX crontab entry for the cron-entry argument, one of the following seven special strings can be entered:
@yearly—An event is triggered once a year. This is the equivalent of specifying 0 0 1 1 * for the first five fields.
@annually—Same as @yearly.
@monthly—An event is triggered once a month. This is the equivalent of specifying 0 0 1 * * for the first five fields.
@weekly—An event is triggered once a week. This is the equivalent of specifying 0 0 * * 0 for the first five fields.
@daily—An event is triggered once a day. This is the equivalent of specifying 0 0 * * * for the first five fields.
@midnight—Same as @daily.
@hourly—An event is triggered once an hour. This is the equivalent of specifying 0 * * * * for the first five fields.
A CRON timer may not produce the intended result if the time-of-day clock is not set to the correct time. Network Time Protocol (NTP) services can be used to facilitate keeping an accurate time-of-day clock setting. For more details on NTP configuration, see the "Performing Basic System Management" chapter of the Cisco IOS Network Management Configuration Guide, Release 12.4.

Examples

The following example shows how to specify that an event is triggered one time after 5 hours:
Router(config)# event manager applet timer-absolute
Router(config-applet)# event timer absolute time 18000

The following example shows how to specify that an event is triggered once after 6 minutes and 6 milliseconds:
Router(config)# event manager applet timer-set
Router(config-applet)# event timer countdown time 360.006 name six-minutes

The following example shows how to specify that an event is triggered at 1:01 a.m. on January 1 each year:
Router(config)# event manager applet timer-cron1
Router(config-applet)# event timer cron cron-entry 1 1 1 1 * name Jan1

The following example shows how to specify that an event is triggered at noon on Monday through Friday of every week:
Router(config)# event manager applet timer-cron2
Router(config-applet)# event timer cron cron-entry 0 12 * * 1-5 name MonFri

The following example shows how to specify that an event is triggered at midnight on Sunday every week:
Router(config)# event manager applet timer-cron3
Router(config-applet)# event timer cron cron-entry @weekly name Sunday

The following example shows how to specify that an event is triggered every 5 hours:
Router(config)# event manager applet timer-watch
Router(config-applet)# event timer watchdog time 18000 

Related Commands



Command

Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.
http://www.cisco.com/en/US/docs/ios/netmgmt/command/reference/nm_06.html

2013年4月20日 星期六

Windows 2008 R2 Enterprise failover cluster with StarWind

I need to take some screen captures to customer for installation of windows failover cluster. The minimum requirement is 1 DC, 2 cluster member and 1 storage.

 I got 3 PC with 3 NICs of each PC... but there is no storage (NetApp or any SAN storage).

I start to find some storage software or operating system...for my work. Someone tells me openfiler is fucking good. I tried but fail fail and fail in the validation of the cluster configuration.

The "Openfiler" does not support Persistent Reservation, at least the free edition does not support. (actually it supports, please read http://www.openfiler.com/products/advanced-iscsi-plugin)

I am not good at server side and no time to do the research. Therefore, I choose the StartWind, it is very good for your POC if you don't have the enough hardware or VM. I encounter the problem that only 127.0.0.1 can be used for connecting the iSCSI target but not the ip address of the storage. 

Finally, i add more a network interface with another ip address with port 3260. It totally work!!!!!!!!! with the windows 2008 cluster failover cluster. I love it, StarWind!!!!


2013年3月25日 星期一

WLC 5508 predownload image

Today, I need to upgrade a WLC 5508 and 4402 from 6.0.199.4 and 6.0.188.0. to 7.0.240.0. On Thursday, I will upgrade a 3750G with WLC module  to 7.0.240.0.

To reduce the down time of the AP, predownload image of AP is used. Only 25 AP can be predownload at the same time =.=

2013年3月17日 星期日

WLC 3750G-WS-S50 upgrade path

Someone needs to upgrade the WLC 3750G-WS-S50 from 4.2.99.0 to 7.0.240, it is necessary to find the upgrade path. Here is the path:


Finally, i don't want to take any risk. I upgrade from 4 to 5, 5 to 6, and 6 to 7. It is totally waste of time.... but successful :)

2013年3月14日 星期四

Administrative Distance


Default Distance Value Table

This table lists the administrative distance default values of the protocols that Cisco supports:
Route SourceDefault Distance Values
Connected interface0
Static route1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route5
External Border Gateway Protocol (BGP)20
Internal EIGRP90
IGRP100
OSPF110
Intermediate System-to-Intermediate System (IS-IS)115
Routing Information Protocol (RIP)120
Exterior Gateway Protocol (EGP)140
On Demand Routing (ODR)160
External EIGRP170
Internal BGP200
Unknown*255


http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094195.shtml

2013年3月13日 星期三

SSH configuration

Secure Shell (SSH) is a protocol which provides a secure remote access connection to network devices.

The Cisco IOS image used must be a k9(crypto) image in order to support SSH. For example c3750e-universalk9-tar.122-35.SE5.tar is a k9 (crypto) image.


Set Up an IOS Router or Switch as SSH Client

There are four steps required to enable SSH support on a Cisco IOS router:
  1. Configure the hostname command.
  2. Configure the DNS domain.
  3. Generate the SSH key to be used.
  4. Enable SSH transport support for the virtual type terminal (vtys).

conf t
hostname jason
ip domain-name jason
aaa new-model
username jason password 0 jason
crypto key gen rsa
1024
line vty 5 15
transport input SSH