AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  executing from NIM server to NIM client

    Posted Thu July 08, 2010 05:30 PM

    Originally posted by: GurpreetSingh


    Hi Guys,

    I want to execute a script from NIM server to NIM client (Pushing and execute). I defined the script resource on NIM master but dont know how to push it NIM client and execute in there. Any idea how to do this?

    THanks & Regards,
    Gurpreet


  • 2.  Re: executing from NIM server to NIM client

    Posted Fri July 09, 2010 01:23 AM

    Originally posted by: Kosala


    This might not be the best method, but you can create a package with your executable and then specify the command as a post installation script. But this can get dirty.

    Kosala


  • 3.  Re: executing from NIM server to NIM client

    Posted Fri July 09, 2010 04:30 AM

    Originally posted by: GurpreetSingh


    Hi Kosala/Friends,

    I understood actually I have to check the data flow from NIM server to other servers, any Idea what could be other approach.

    Thanks & Regards,
    Gurpreet Singh


  • 4.  Re: executing from NIM server to NIM client

    Posted Fri July 09, 2010 09:09 AM

    Originally posted by: gcorneau


    One option is to utilize the dsh (distributed shell, a parallel remote shell command that can be configured to use rsh/ssh) and dcp (distributed copy, can be used to copy the script to the client machines) that are available with the csm.dsh fileset that comes with AIX.

    Don't let the csm name in the filesets fool you, you don't need a CSM managed environment to use those commands.

    Glen Corneau
    IBM Power Systems Advanced Technical Skills


  • 5.  Re: executing from NIM server to NIM client

    Posted Fri July 09, 2010 01:18 PM

    Originally posted by: Kosala


    Actually I myself use ssh to execute scripts on multiple machines. I use a variant like following:

    1. cat my_script | ssh user@host_name ksh

    And some times I pipe the script to bash as well, depending on what I want to achieve. If you have a password less ssh setup from NIM master to clients, this can be easily done with a for loop.

    Kosala


  • 6.  Re: executing from NIM server to NIM client

    Posted Fri March 22, 2013 09:27 AM

    Originally posted by: SystemAdmin


    Hi,

    You can use this: /usr/lpp/bos.sysmgt/nim/methods/m_cust -a script=+NIM_Script+ Server

    It works without problems from years at my office. I use it in this kind of script:
    for mac in `lsnim -tstandalone | awk '{print $1}' | sort`
    do
    echo $mac
    /usr/lpp/bos.sysmgt/nim/methods/m_cust -a script=NIM_Script $mac
    echo " "
    done