DX Unified Infrastructure Management

 View Only
  • 1.  NEXEC Usage

    Posted Oct 21, 2016 08:20 AM

    Hi all,


    Does anyone have any examples of command for use within the nexec probe?


    The documentation doesnt give any working examples (other than whats preloaded with the probe).


    I'm looking to run a simple command to stop NLB:


    nlb stop

  • 2.  Re: NEXEC Usage
    Best Answer

    Broadcom Employee
    Posted Oct 21, 2016 09:38 AM

    HI the Nexec just executes programs or scripts.

    It does not have a scripting language of its own such as the nsa probe.

    So if your command is nlb stop


    I would create a .bat or .sh on the system and put that command it in.

    If you want to put in logging information to a log file or anything else you can do that.

    Then have the nexec call the file you created.


    if you want you could but the nlb and the stop in the arguments and try it that way as well.


    Are you getting an error or having a problem?


    if you can provide more details we might be better able to help you.

  • 3.  Re: NEXEC Usage

    Posted Oct 21, 2016 10:15 AM

    Thank you, I've got it.  Just needed to know the basic usage of the probe as I've never used it before.


    I think it will become a good friend now


    I'm going to try this script out to activate certain commands on demmand:


    if trigger.state("Customer_Primary") and not trigger.state("Customer_Secondary") then
    i = 1
    probename = "nexec"
    probeaddr1 = "/MyDomain/PrimaryDomain/myserver02/nexec"

    args = pds.create()
    pds.putString(args,"profile","Customer failover")

    while i <= 4 do
    reply,rc = nimbus.request(probeaddr1,"run_profile",args)
    if rc == NIME_OK then break end
    i = i + 1

    if i > 4 then
    body1 = body1.." [Request failed]"
    body1 = body1.." [Request succeeded in "..i.." attempts]"
    action.email (recipients,title1,body1)