How to use the Script TCL EEM in router?

Dear all,

I have a TCl Script (it's 1 to test and understand).

********************************************** TEST.tcl *******************************************

: model cisco::eem:event_register_syslog "Interface FastEthernet0/0, changed State to.

import namespace: cisco::eem: *.
import namespace: cisco::lib: *.

Table game arr_einfo [event_reqinfo]

action_script enable status

If {[catch result {cli_exec $cli_fd (fd) 'enable'}]} {error $result $errorInfo}

If {[catch result {cli_exec $cli_fd (fd) 'int fa0/1'}]} {error $result $errorInfo}

If {[catch result {cli_exec $cli_fd (fd) 'shut'}]} {error $result $errorInfo}

action_syslog msg "New Port is now"

If {[catch result {cli_close $cli_fd (fd) $cli_fd (tty_id)}]} {error $result $errorInfo}

********************************************** TEST.tcl *******************************************

Can someone tell me how to use this script in router that will be used every time my interface fa0/0 he'll fa0/1 in stop mode?

Can you give me the steps to follow in the router?

Wharton are the sine qua non for the use of this?

Concerning

Concerning

Virtually any command, Yes.  You can't do "?" as you can from an interactive session, but you can run all the commands EXEC and config otherwise.

Tags: Cisco Network

Similar Questions

  • How to run the script to EEM/TCL file

    Hello world

    I need to run the EEM script found in this link

    https://supportforums.Cisco.com/document/75806/interface-input-queue-Mon...

    Can you please point me to a HOWTO to download the file and run it under an interface?

    Thank you

    Federico

    Here is the manual how to run scripts tcl file - http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/1...

    In short - you download the script to switch via tftp and the tcl implementation with command tclsh interpreter. Then run the command source source

  • How to use the script "click menu item" command on a menu item for an application that runs under another user?

    Hey everyone, quick question...

    I am trying to run this script:

    say application "System events".

    say process of "iTunes."

    click on menu item "Start Station" from the menu 'Song' to menu bar item 'Song' in the menu bar 1

    end say

    end say



    The idea behind this is to start a song selected currently playing station. I know, it's not hard to do it manually, but I want to be able to do it without having to call the iTunes app to the front. Now, this script works for my own iTunes app, but I have a second instance of iTunes connecting the second user on my computer at home (User2), with its own separate library and account and all. script I have works fine for an instance of iTunes under my user account, but I can't figure out how to specify which instance of iTunes, I'd like the script to work on.




    I want to emphasize as an FYI that i use.


    the shell script "connection f User2 /Applications/iTunes.app/Contents/MacOS/iTunes > & - 2 > & - &" with administrator privileges

    -to open my second instance of iTunes as User2



    is there a way to change the "process"iTunes"to say" something like 'process 'unix ID' say' and have the ID for each respective instance of iTunes unix?


    Let me know if I do not make sense... Thanks in advance to anyone who can help






    You can target a process of application using various properties of system events, for example:

    tell application "System Events"
      tell first item of (get application processes whose unix id is 15174) -- or whatever id
        activate --> needed when using GUI scripting
        get properties
      end tell
    end tell
    
  • How to use the script to display the number of columns contain no data

    I have a requirement. There is a source that is the excel, the excel file file, we need to load data into the staging table. There are 5 columns mandatory ones must not be null. We used "No. Data Check" for this. The logic is so mentioned previously mentioned 5 columns don't contain any record that the record will be moved to without data. So far, it is fine. Now the requirement is to show what column or columns contain no data. We used a script to do this like:

    RES =' '

    RES = input1 [0] + ": failed because values null in required columns;"

    INPUT1 [1] = res;

    Output 1 = res;

    But it shows message "down because of nulls in the required columns", which is a generic message. We must show what column or columns does not contain the value "failed because of null values in a column required columnA, columnB or columnC. Can someone help me in this regard. Any kind of help is appreciated.

    You can use the variable inputname1, which keeps an array of names of the entry for the script processor attribute. For example:

    var result = "";

    var first = true;

    for (i = 1; i< input1.length;="" i++)="">

    If (input1 [i] == null | input1 [i] == ' ') {}

    If {(first)

    Firstly = false;

    } else {}

    result += "";

    }

    lead inputname1 += [i];

    }

    }

    If (result.length > 0) {}

    result = "failed due to null values in the following mandatory columns:"+ result; "

    }

    Output 1 = result;

    Kind regards

    Nick

  • How to use the @accum function in the calculation script

    Dear all.

    I'm new in essbase - calculation script so don't know how to use the @accum function.

    I want the aggregation value of child to parent

    Hierarchy

    Product

    100 > Storage Dimensions marked as stored (marked as intentionally as I want to calculate the value using the calculation script)

    100. 10 (+)

    100-20 (+)

    100-30 (+)

    I'm trying calculation Script

    100 = @Accum (@children("100"), jan: Feb);

    It works when I use below

    100 = @Accum("100-10",Jan:Feb);

    Error:-number of Dimensions [1] does not match number of gen/lev [3] office [@Dim]

    Don't know how I can roll up to an aggregate value of all the members of the child to the parent.

    Error.PNGhierachy.PNG

    you do this more difficult it must be. If you want to accumulate up to 100 then you could just make your calc

    '100 '.

    but that would be only 100, to make the OU any dimension would

    AGG (Product);

    Or better yet

    AGG (Product, Market);

  • How to use between operator in Disqualification without using the script processor?

    Hello Experts,

    How to use between operator in Disqualification? for example phonenumberLength between 7 and 10. I don't want to use the script processor? Also how to reproduce the SWITCH statement Disqualification CASE?

    Thank you

    Konate

    1 Add a processor 'check the length.

    2. connect the transformer and open the configuration dialog box

    3. in the tab 'Attributes' select your attribute of telephone number as the "field Check.

    4. in the tab "Options", enter "7-15"in the option 'number of valid characters.

    5. run the process.

    a. accounts with [included] a character length 7-15 phone numbers out of the release of "valid".

    b. records with a length of character <7 or="">15 phone numbers out of the release of "Invalid character count.

    Note: the processor also adds a 'LengthValid' flag attribute which you may also branch on [with the values "Y" and "NC" for both scenarios above]. See Library of processor of the online help for more information.

    Thank you

    Nick

  • How to use a script to validate the same field with different addresses in different pages?

    I have a script that is applied to a field 'email '.

    The script asks to check the address, if it is not well written.

    But this field is present in many pages for different guests filling in this information.

    How can I adapt this script? (without changing the name of each field of each page and therefore to change the value in the script to a page that ...)

    function confirm_email_OnValidate (element)

    {

    Event.RC = confirm_email_Validate (Element, event.value);

    }

    function confirm_email_Validate (Element, newvalue)

    {

    If (newvalue.length < = 0)

    Returns true;

    Model = newvalue.replace (/ [a-zA-Z0-9] + ((\.| _ | \-) [a-zA-Z0-9] +) * @([a-zA-Z0-9] +(\.| \-))+[a-za-Z]{2,}/, «»);)

    If (Dummy.length! = 0)

    {

    InputError (element, 'Check this address');

    Returns false;

    }

    Returns true;

    }

    function confirm_email_Format (element)

    {

    Returns true;

    }

    You can use the eMailValidate built-in function to simplify this. For example, you can use the custom following validation script:

    if (event.value && !eMailValidate(event.value)) {
        app.alert("Check this address");
        event.rc = false;
    }
    

    It provides a validation better than the regular expression that you have demonstrated.

    Without knowing how you use the parameter of the element and the operation of the function InputError, it is difficult to offer something more.

  • help to change the size of precomp (weight and size using the script)

    Hi guys, need help with change precomp size (weight and size using the script), my problem in this... when I change the size of the model (height and weight) of GUI AE, AE change the size of the composition of the Center model, but if I change the size of the model of my script it change from upper left... so I need some how change in the center of scripts of composition or something like that?

    now I change size with this code

    MyComp.Width = myComp.Width.Width + 50;

    MyComp.Height = myComp.Width + 50;

    Hi Zipkiev,

    If you want to change the composition and all the layers it contains, there is a script: scale Composition.jsx that comes with Ae (in the Scripts folder) which does exactly the same thing.

    He puts on a scale by a factor uniform using a temporary null object. You can twist no uniform scaling by a factor.

    But if you want only to preserve the size of the layers and adjust their position so that their new position relative to the new comp Center is the same as previously, the script above can not help.

    In the simplest situation you just compensate for all positions of layers related by the same amount: [(compNewWidth-compOldWidth) * 0.5, (compNewHeigth-compOldHeight) * 0.5].

    Not sure it will work well in all situations (such as 3D with cameras).

    You can try it, it might work for you:

    COMP is the composition, newWidth, newHeight its new width/height

    var

    DX = (newWidth - comp.width) * 0.5;

    DY = (newHeight - comp.height) * 0.5;

    layer, n,

    p, j,

    value;

    COMP. Width = newWidth;

    COMP. Height = newHeight;

    for (n = 1; n<=comp.numLayers;>

    layer = comp.layer (n);

    If (layer.transform &! layer.parent) {}

    p = layer.transform.position;

    If {(p.numKeys===0)}

    p.value = value;

    value [0] += dx;

    value [1] += dy;

    p.setValue (value);

    }

    else {}

    for (j = 1; j<=p.numKeys;>

    value = p.keyValue (j);

    value [0] += dx;

    value [1] += dy;

    p.setValueAtKey (j, value);

    };

    };

    };

    };

  • How to generate the script to insert data tables present in a

    How to generate the script to insert data from one table in an entire schema under environment sqlplus




    with toads it please help me please!

    905310 wrote:
    How to generate the script to insert data from one table in an entire schema under environment sqlplus
    with toads it please help me please!

    The correct method by using the pump of the database or import/export or unload the data in CSV format for loading using SQL * Loader.

    Generate instructions insert with literals is very bad choices - the bind variable is missing. It will be quite slow because many other CPU cycles are spend on hard analysis. The shared pool will become fragmented. This can cause errors of memory for other applications when they attempt to analyze SQLs for cursors.

  • How to use the data object 'DatastoreHostMount '.

    I train to iterate on the grouping value in vCenter and for each data store found, determine whether a host has mounted data store or if it is visible to the host. I am using data object 'DatastoreHostMount' , but I don't know exactly how to use the object to retrieve the name of host configuration.

    Here's the perl code snippet and I get an error for:

    #get all hosts within cluster and check the connectionState and compare with all datastores found
    #is there a more efficient way to combine this section with the next section?
    
            my $hosts = Vim::get_views (mo_ref_array => $cluster->host);
    
            foreach my $host (@$hosts) {
                    if ($host->runtime->connectionState->val eq 'connected') {
                            my $datastores = Vim::get_views (mo_ref_array => $cluster->datastore);
                            foreach my $datastore (@$datastores) {
                                      print "  Datastore ", $datastore->host->summary->config->name,"\n"
                            }
                    }
                    elsif ($host->runtime->connectionState->val eq 'disconnected') {
                            print "\t|", $host->summary->config->name, "|Disconnected|\n"
                    }
                    elsif ($host->runtime->connectionState->val eq 'notResponding') {
                            print "\t|", $host->summary->config->name, "|Not Responding|\n"
                    }
            }
    

    Cannot call method 'Summary' on some wrapping 71 de./listCluster.pl.

    Disconnection of the end

    =========================================================================

    -William

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    OK, I remembered how it works. Sorry for the noise:

    |

    My $datacenter = Opts::get_option ('Center');

    My $datacenter_view = Vim::find_entity_view (view_type = > 'Data center',)

    filter = > {name = > $datacenter});

    If (! $datacenter_view) {}

    Die "data center" "» $datacenter. "" not found\n ";

    }

    My $cluster_views = Vim::find_entity_views (view_type = > 'ClusterComputeResource',)

    begin_entity = > $datacenter_view);

    My $counter = 1;

    Print "Clusters found: \n";

    {foreach (@$cluster_views)}

    Print "$counter:". "." $_-> name. "\n";

    My $datastores = Vim::get_views (mo_ref_array = > $_-> data store);

    foreach my {$datastore (@$datastores)}

    my $instances = @{$datastore-> host};

    my $instance = 0;

    while($instance < $instances) {}

    My $x = Vim::get_view (mo_ref = > $datastore-> Home-> \[$instance\]-> key);

    print $datastore--> summary-> name, "Datastore", $x-> name, "\n";

    $instance ++;

    }

    }

    $counter ++;

    }

  • Help: apply different styles of Pará to several consecutive paragraphs using the script

    Hi all

    I need to apply different styles of Pará to several consecutive paragraphs using the script, something like this (found somewhere on the net):

    myDoc = app.documents var [0];

    mySel var = app.selection [0];

    var myPStyle1 = "A";

    var myPStyle2 = 'B ';.

    you need to add 6 styles here:

    var myPStyle3 = 'C ';

    var myPStyle4 = "D";

    var myPStyle5 = 'E ';

    var myPStyle6 = 'F';

    var myPStyle7 = "G";

    var myPStyle8 = 'H ';

    the last style is not necessary in the script?

    apply style 1 paragraph 1

    mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);

    apply styles to the paragraphs after selection

    style 2

    mySel.paragraphs [-1] .insertionPoints [-1] .appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);

    next style

    mySel.paragraphs [-1] .insertionPoints [-1] .paragraphs [0] .insertionPoints [-1] .appliedParagrap hStyle = .nextStyle myDoc.paragraphStyles.item (myPStyle2);

    I tried a lot, but could not find the way to extend the sequence

    Sorry, no skills in the scripts still...

    all styles have "Next Style" option enabled, but I can't use ' apply style, then next style "or object styles, because I need four different sequences of these paragraph styles:

    A-B-C-D-E-F-G-H

    A-B-D-E-G-H

    A-C-D-F-G-H

    A-D-G-H

    and I don't really want to create special clones of the same style for each sequence (Keep It Simple, they say ).

    I think that this can be done through four slightly adjusted scripts...

    any suggestions would be greatly appreciated...

    Sorry to be late to the party, I usually take up such things immediately.

    How about this one?

    1. no separate necessary script, it uses a small dialog box where you can choose what style to use. If I'm not mistaken, you can press a digit key on Windows to immediately select one of the items.

    2. it works down in the paragraph in that your cursor is located. It has nothing to do with the blocks of text, even if - consecutive paragraphs within a story always ignore the text frames.

    3. extensible: you can easily change the names of the styles in the table at the top of the page and the number of groups of style in the list.

    var styleLists = [
              [ "A", "B", "C", "D", "E", "F", "G", "H" ],
              [ "A", "B", "D", "E", "G", "H" ],
              [ "A", "C", "D", "F", "G", "H" ],
              [ "A", "D", "G", "H" ]
    ];
    
    var radiobutts = [];
    
    styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true});
    with (styleDialog)
    {
              with (dialogColumns.add())
              {
                        with (radiobuttonGroups.add())
                        {
                                  for (i=0; i		   
  • How to use the goto function?

    How to use the goto function in indesign javascript?

    my script begins by chekcing if the input files are present or not... If one of the input files is not present, I want the n function put an end to the operation in the display of the message tht file exists... I was wondering to use goto for tht... then how to use it? or is there an alternative to that?

    GoTo is generally frowned upon by the programmers.

    The only legitimate use of goto is when you need to escape from a nested loop.

    If you need to jump into a routine, use break or simply in return from the current function.

    The model currently used by the SDK looks like this:

    do
    {
         if(condition1 == false)
              break;
         if(condition2 == false)
              break;
         if(condition3 == false)
              break;
         doSomethingReallyCool();
    }while(false);
    

    'break' the jumps at the end of the do / while loop that always comes out when you reach the end of it (while (false))

    Substances

  • Using the script, Jython in ODI

    Hello
    I have a requirement where I want to exploit a jython script to solve a business problem (break a string of semicolon separated into tokens). I'll call this script of ODI.

    Do I need to download the jython interpreter to test my script before I use it in ODI?

    How to call the script of ODI?

    N ° the Jython interpreter is built into ODI. You can simply create an ODI procedure, step, assign technology as "Jython" and paste your script in the command on the target. You can then use this procedure as part of a package.

  • With no headphone jack, how to use the iPhone in my car 7

    Okay, so here's the challenge.  I have a power source and a headphone and not Bluetooth.  It works perfectly with iPhones before 7.  But with 7, it isn't possible to use the same configuration I had for years.  I own my car, and I have no interest in buying a new car just to support a new phone.  And since this will be a problem for the years to come if I stay with Apple, I would like to know what are the solutions are available.

    So, how to use the new iPhone 7 while remaining responsible and using my car speakers?  Dongles Bluetooth that I need to reload, it's probably not.

    Thus, looking for ideas that might have people.  I can't be the only one with this concern.

    It's almost a certainty that a third party adapter will appear quickly. The new Macbook has a single port usb - c and people asked the same question, 'how to load and use USB at the same time." There are today dozens of solutions for the Macbook, and then it will be with the iPhone 7. An adapter with a 3.5 mm jack and a port of loading Lightening would be my guess. Kickstarter entrepreneurs are probably already working on it.

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

Maybe you are looking for