4 Replies Latest reply: Jun 9, 2011 1:39 PM by bobthesungeek76036 RSS

    "rsh remote_machine $(remote cmd)" does "rsh remote_machine $(local_cmd)

    scampsd
      Good afternoon,
      I am working on a central machine from which I would like to verify the status of the other machines in my network.
      In order to do this, one of the commands that I use is the following:

      rsh <remote machine> /usr/platform/`uname -i`/sbin/prtdiag -v

      The problem is that sometimes this works well, and sometimes it doesn't.

      When it works well, it goes on the remote machine, and launches:
      /usr/platform/SUNW,Sun-Fire-V240/sbin/prtdiag -v
      The remote machine being a "SUNW,Sun-Fire-V240".

      When it does not work well, it goes on the remote machine, and launches:
      /usr/platform/SUNW,SPARC-Enterprise-T5120/sbin/prtdiag -v
      The local machine being a "SUNW,SPARC-Enterprise-T5120".

      I would like to be sure that, when I launch a command "rsh <remote> <command>", that indeed the <command> is the one from the remote machine, and not the one of the local machine.

      Is there any way to force this?
      Thanks
      Dominique