DX Unified Infrastructure Management

 View Only
  • 1.  Run a shell in AIX with Nexec

    Posted Jul 14, 2020 06:00 PM
    Hi everyone.

    I am configuring the execution of a shell with the nexec probe, but it doesn't work.

    Command: /usr/bin/ksh
    Arguments: /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh

    When I testing the profile this is the information

    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh: ntwk_exec: not found.
    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh[2]: ntwk_exec: not found.
    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh[3]: ntwk_exec: not found.
    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh[4]: ntwk_exec: not found.
    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh[5]: ntwk_exec: not found.
    /UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh[6]: ntwk_exec: not found.

    And the logs in level 5 indicate this information ------->

    Jul 14 16:53:13:248 [0261] nexec: (t_r_p) - timeout is 29 seconds
    Jul 14 16:53:13:248 [0261] nexec: (r_p) - profile MCBNET_LOGON_N1, command /usr/bin/ksh, args "/UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh"
    Jul 14 16:53:13:248 [0261] nexec: (r_p) - profile MCBNET_LOGON_N1, commandline /usr/bin/ksh "/UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh"
    Jul 14 16:53:13:248 [0261] nexec: params Size=29
    Jul 14 16:53:13:248 [0261] nexec: profile PDS_PCH 16 MCBNET_LOGON_N1
    Jul 14 16:53:13:248 [0261] nexec: (r_p) - expanding variables in commandline
    Jul 14 16:53:13:248 [0261] nexec: (r_p) - profile MCBNET_LOGON_N1, expanded commandline /usr/bin/ksh "/UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh"
    Jul 14 16:53:13:278 [0261] nexec: read_pipe: ready to read from socket 11
    Jul 14 16:53:13:278 [0261] nexec: read_pipe: got EOF on socket 11
    Jul 14 16:53:13:278 [0261] nexec: read_pipe: ready to read from socket 13
    Jul 14 16:53:13:278 [0261] nexec: read_pipe: got EOF on socket 13
    Jul 14 16:53:13:279 [0261] nexec: debug_out Size=547
    Jul 14 16:53:13:279 [0261] nexec: stdout PDS_PCH 1
    Jul 14 16:53:13:279 [0261] nexec: stderr PDS_PCH 478 /UIM/nimsoft/probes/service/ne~
    Jul 14 16:53:13:279 [0261] nexec: return PDS_I 4 127
    Jul 14 16:53:13:279 [0261] nexec: profile PDS_PCH 16 MCBNET_LOGON_N1
    Jul 14 16:53:13:279 [0261] nexec: SREPLY: status = 0(OK) ->172.16.1.86/65097
    Jul 14 16:53:14:220 [0001] nexec: RREQUEST: _close <-172.16.1.86/65097 h=282 d=0
    Jul 14 16:53:14:220 [0001] nexec: sockClose:1100a2c30:192.168.61.11/48008
    Jul 14 16:53:16:220 [0001] nexec: (d_w) - no profiles are scheduled to run

    Any idea?


  • 2.  RE: Run a shell in AIX with Nexec

    Broadcom Employee
    Posted Jul 14, 2020 06:15 PM
    Your sh is call another shell or program which is not found. ntwk_exec: not found. I assume you tested when you were logged in and everything worked. It is probably because the environment variable $PATH or $LIB_Path is set and ntwk_exec is found. You can either and the environment variables that are set in your shell where the program works or include the complete path to ntwk_exec in your shell script.


  • 3.  RE: Run a shell in AIX with Nexec

    Broadcom Employee
    Posted Jul 14, 2020 06:20 PM
    Sorry to be clear add the environment variable within the shell using SET or add the variables to the controller probe Environment variable tab....or use full path name in shell.


  • 4.  RE: Run a shell in AIX with Nexec

    Posted Jul 15, 2020 08:49 AM
    Hi Gregg the shell execute this ----> ntwk_exec NOPIPE 5 LOGON_REQ 100

    Maybe is it necessary that the user can execute this command ntwk_exec?

    What variable maybe need add ?



  • 5.  RE: Run a shell in AIX with Nexec
    Best Answer

    Broadcom Employee
    Posted Jul 15, 2020 09:18 AM
    Hi Miller,

    So when you login and su to root you can run the program fine, correct? The 'not found' means the shell can't find the file ntwk_exec. This is NOT a UIM issue but strictly a Unix/AIX configuration issue and you could ask your Sys Admin. Typically it is a PATH Variable in this case. You can try using the full path ie".../net_exec in your shell or setting in controller. You can check what your $PATH is by running "echo $PATH". Verify you see the directory in the $PATH which holds the ntwk_exec.
    This is just my guess,not knowing exactly situation, as a former Sys Admin I would solve in the past like this.
    Have "/UIM/nimsoft/probes/service/nexec/MCBNET_LOGON_N1.sh" as you command and tweak it as below.

    #/usr/bin/ksh
    set PATH=$PATH:{path where ntwk_exec is}
    export $PATH
    ntwk_exec "command"

    Again, I recommend you work withe the Server's Sys Admin.


  • 6.  RE: Run a shell in AIX with Nexec

    Broadcom Employee
    Posted Jul 15, 2020 09:25 AM
    Sorry that first line is #!/usr/bin/ksh
    you can google AIX shell to get your syntax.​


  • 7.  RE: Run a shell in AIX with Nexec

    Broadcom Employee
    Posted Jul 15, 2020 09:29 AM
    LOL and no "$" in the export line

    #!/usr/bin.ksh
    set PATH=$PATH:(your path)
    export PATH​