Topic
  • 5 replies
  • Latest Post - ‏2013-03-22T13:26:51Z by SystemAdmin
GurpreetSingh
GurpreetSingh
52 Posts

Pinned topic executing from NIM server to NIM client

‏2010-07-08T21:30:08Z |
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
Updated on 2013-03-22T13:26:51Z at 2013-03-22T13:26:51Z by SystemAdmin
  • Kosala
    Kosala
    141 Posts

    Re: executing from NIM server to NIM client

    ‏2010-07-09T05:22:37Z  
    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
  • GurpreetSingh
    GurpreetSingh
    52 Posts

    Re: executing from NIM server to NIM client

    ‏2010-07-09T08:30:10Z  
    • Kosala
    • ‏2010-07-09T05:22:37Z
    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
    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
  • gcorneau
    gcorneau
    59 Posts

    Re: executing from NIM server to NIM client

    ‏2010-07-09T13:08:39Z  
    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
    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
  • Kosala
    Kosala
    141 Posts

    Re: executing from NIM server to NIM client

    ‏2010-07-09T17:18:12Z  
    • gcorneau
    • ‏2010-07-09T13:08:39Z
    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
    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
  • SystemAdmin
    SystemAdmin
    6902 Posts

    Re: executing from NIM server to NIM client

    ‏2013-03-22T13:26:51Z  
    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