The answer to an earlier question,
left me with a new problem. To review, I have a computing environment comprised of:
- 27" iMac with dual cores running Mac OS X 10.6.8 and
- 2 XServes each with 2 quad cores running Max OS X Server 10.6.8
- All networking by ethernet to a Time capsule.
As this question has more general application than the earlier question, I thought it merited its own post.
I need to launch and shut down a service (in my case Wolfram Lightweight Grid Manager but this really applies to any service, program, or application) which needs to run on a server (or more generally, any other machine) attached to my network (or again more generally, any network to which one has authorized access).
So, ideally I'd like to do the following:
Access and log on to (a) remote computer(s) on a local network directly from Mathematica;
Launch a script on the remote computer that will in turn launch Wolfram Lightweight Grid Manager;
Launch available kernels;
Run parallel processing code;
Close remote kernels; and
Launch a script on the remote computer to close Wolfram Lightweight Grid Manager.
Can I do all of this from within Mathematica?
Run enables one to run a command line program:
But how do I get to a remote machine, especially as it does not likely have a fixed IP address? ;-(
I would appear to need a way to identify machines on the network (I do have machine names and log on credentials).
I've very rarely done this sort of thing.
Could a script launched locally by the
Run function access the remote machines and launch a script on them?
That would make it easy.
References or examples welcome.
My Unix script never amounted to much, so any guidance welcome.
It also, occurs to me that one could do this via JLink, but as the little I knew of Java has generally drifted out of my memory a more direct solution would do me better.