Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell out to a 3rd machine

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
Ok this is a fun one, not sure which forum to put it in... but since I'm using PHP as the server side scripting I'm thinking this may be a good place to start.

Three machines.
A) Client
B) Webserver
C) Workhorse


The client logs onto the webserver and makes some requests. The webserver processes these requests, decides what to do, and tells the workhorse to get up and do it. Now in reality there are several workhorses, and depending on what choices are made different ones will be activated.

It looks like the activation will be simply calling an executable or batch file with some parameters...

So, does anyone know how I do this? I have full control over B & C, so if it's an issue of setting permissions and the like, I just need to know to do it, not how to do it.

Please don't tell me it can't be done, I already know two ways to do it, but one's ugly and innefficient, and the other one just seems more complex than necessary.

All machines running W2k or WinXP.

Webserver is Apache 2.0.44, but that could be changed if need be.

Solutions I have...
1 (ugly and innefficient): Have a process on the workhorse polling the webserver every X seconds, when it finds information it processes that and executes.

2 (too complex): Write a process which sits on the workhorse and listens for a signal, then runs... (too complex because of writing this process, if one exists already, I'm happy to use it)

Ideas I have...
1: Scheduling something into these machines (I've been told I can use the AT command across machines)

2: Opening a port on the workhorse which I can telnet into and issue commands, i.e. telnet

Thanks for any information you have...

Rob
 
I'm not sure I understand your question correctly, but I think you would be able to do this with a little socket programming. Or is that would you were describing as "too complex"? It certainly wouldn't be any more complex than writing a script to telnet commands over to the server. I'm sorry, I'm just not sure what you are asking.
 
The socket programming is what I'm calling too complex, because these tools already exist for every operating system except the ones I'm concerned with (W2k, WinXP).

Basically think of telnetting into a box, or better yet... the exact behavior I want is rsh. However, I don't have an rsh service or daemon to load onto a W2k or WinXP box (That I know of!), so perhaps that's my modified question after doing some research... does anyone know a good RSH or REXEC daemon/service that I can load onto a Win2k or WinXP box (not Win2k server).

Currently I'm digging into Cygwin, and have gone through some other options. Already found one which worked, but it was outdated and apparently no longer supported.... and I'm not much in the mood to give money to software developers who aren't around any more just in case.

-Rob
 
Looks like the answer I was looking for can be solved with the AT command... it schedules them instead of running them immediately, but close enough unless I figure out a nice good free RSHD for Win2k.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top