Control and Response from PC
Nightcrawler
Posts: 35
Hi,
I am a bit new to AMX coding. I basically looking into using a NI700 to monitor a set of workstations running XP/NT among other things.
Basically when a PC has a software fault or a specific process stops or starts - I need a message going to the NetLinx box through TCP/IP or the NetLinx box to signal that a PC isnt responding. Then in the internal web browser I need to see a list of machines and their errors conditions.
Now ignoring the fact a process or similar has to be running on the PC to do the monitoring and the fact a web page on the Netlinx needs to be coded, is it to problamatic to get a communication from the PC to the NetLinx box ?? IE Can I write in part of the process monitor code to except and send commands between it and the NetLinx unit - where does one start? I see there are IP_OPEN commands etc in NetLinx - would simply coding a TCP connection be goo enough ?
On the second note I need to get the NetLinx box to send shutdown and restart commands to the PC as well
Thanks for any pointers ....
Ed
I am a bit new to AMX coding. I basically looking into using a NI700 to monitor a set of workstations running XP/NT among other things.
Basically when a PC has a software fault or a specific process stops or starts - I need a message going to the NetLinx box through TCP/IP or the NetLinx box to signal that a PC isnt responding. Then in the internal web browser I need to see a list of machines and their errors conditions.
Now ignoring the fact a process or similar has to be running on the PC to do the monitoring and the fact a web page on the Netlinx needs to be coded, is it to problamatic to get a communication from the PC to the NetLinx box ?? IE Can I write in part of the process monitor code to except and send commands between it and the NetLinx unit - where does one start? I see there are IP_OPEN commands etc in NetLinx - would simply coding a TCP connection be goo enough ?
On the second note I need to get the NetLinx box to send shutdown and restart commands to the PC as well
Thanks for any pointers ....
Ed
0
Comments
You still need to do some coding on the PC too, so i think there are other option besides using an NI-controller.
*hint* SNMP anyone
Reason why I want to use NI rather than SNMP is it s black box which can be quickly reboot or box swapped. I don't really want to rely on a PC to do the tasks as it a bit pointless if there is just a cheaper black box soultion - which I think would be neater, more stable and secure...??
Thanks
Ed
That being said, you can install and run telnet servers on all your PCs. A telnet server comes standard with XP Professional and you can install third party servers on PCs with XP home. You can then program your AMX master to connect to these servers as a client. The telnet servers will give the client program access to the command line. Anything that you can do from an XP command line you will be able to do through the telnet client. Note that you may have to set up an account on each PC with a username and password in order to establish the telnet client. This is not hard to do -- just connect manually from another PC and you will see what the challenge and response look like -- just code it up in your netlinx program.
That's everything you need to do on the AMX side except to handle strings returned from the PCs and any commands that you want to run on the PCs. You will be able to execute programs and scripts and the servers will return to the AMX appropriate strings.
One thing you could do is to have scripts or programs running on your PCs that would create diagnostic text files. Periodically, you could have your telnet client type out these files and parse the return from the PC.
Also, when one of the PCs goes down, the client will lose your connection and you can program a proper response. Run a timeline to try to re-establish the connection every 30 seconds or so and when the PC comes up and starts the server, you will connect and can then send any command strings you desire to the PC.
Telnet can work the other way, too. You can program a server on your master and then have a PC application run as a telnet client and connect to your master as the server. There is probably an easy way to do this with a Windows script--I don't now how right off, though. Every installation of XP should have a telnet client available that you can run from a script, or Java, or whatever.
So, telnet is pretty easy. But, you could do something similar with ftp on port 21 or web type programming with port 80 (or whatever). You can program your AMX to act as a web client or an ftp client. I think, also, to act as an ftp server.
sounds to me like the easy part is getting the connection between the AMX and the PCs. Applications/scripts on the PCs is a whole nuther matter as is programming all the parsind into the AMX master.
Thanks for the response makes sense
One more thing is there a limit to the amount of open connections on the AMX as either a server or client ??
Thanks
Ed
200 IP sessions including ALL sessions eg from NS2 or Telnet
[Oops - corrected from 100]
I ran into a need to have a AMX master talk to a network router about 3 years ago. I soon ran into many problems, specifically the data management required to handle the MIP tables involved in SNMP. I then went to AMX and found a short letter in the tech notes section that basically confirmed my findings and saying that AMX would not be able to do SNMP controlling type functions.
I thought that was kinda lame. But, in fairness, SNMP is also lame and should be updated. It's a very old protocol that doesn't even work at the higher level of the network package.
When you get to messing around with it, you also find that there is not a lot of useful documentation concerning the protocols.
I'm sure the few companies who actually sell the SNMP software are not too interested in updating it either.
AMX has an integration solution called i!-PCLink/Web. It's main function is to allow a user to launch a browser window on a connected PC to a specific or user entered URL. However it also includes a method to determine what applications a currently running on the PC, who is logged in and so on. The program also includes commands that can lock, reboot, shutdown and log off a user among other things. Take a look at it here. http://www.amx.com/products/i!-PCLink-Web.asp The program can be downloaded from amx.com at http://www.amx.com/techcenter/downloadConfirm.asp?fn=/assets/applicationFiles/i!-PCLinkWebSetup.exe
All of this information can be logged to the NetLinx master which can report that to RMS where it can be viewed on a browser page with specific notifications based upon the information received about the PC.
PDK