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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi session polling; compiling 1

Status
Not open for further replies.

asmostopheles

Programmer
Dec 15, 2004
7
US
I currently have a set of scripts that I created to mass poll sites (send down file, execute, copy back results) for specific data (dialing into unix servers).

I needed to make this scalable from 10 sites, to upwards of 10,000 sites, so this needed to be able to use many modems from our modem pool at a time.

The solution I found to do this was to limit the max number of modems to 20 (because of manual compiling explained below), and i have a script.wax for each modem session i want to use and i have to open another session of procomm for each session. each of these scripts is independant and updates to thier own directory with the comma delimited results file. i then have another script that will compile all of this data into 1 text file.

The problem I am having is this:

I need to on occasion change what is being sent down, and set up new polls that will be available for re-use.

This currently results in me having to recompile each of the session scripts i have (20 of them) and change variables in each one.


Is there a way to have a "compile script" of sorts? that will feed the changes i specify out to the 20 seperate scripts and compile each of them individually?

or alternatively, is there a way, that I am overlooking, to perform this type of multi connection function in a single aspect script with procomm?


any help would be appreciated as I would like to offload support of this process if I can make it reasonable for someone else to step into.
Thanks in advance!
 
I forgot to specify, I use telnet through procomm to connect to our modem pool and then dial out, i do not use my PC's comm ports.
 
There are a couple different ways to attack this. The first is that if you run the source .was file instead of the compiled .wax file, Procomm will automatically compile the script for you. What you can do is either use an include file (using the #include command) to pull in a script snippet to update the variables in your main script, or you could reference a text file that contained those variables.

One thing to keep in mind is that I think I've seen some cases in the past where running the .was file instead of the .wax file would cause odd problems. To eliminate that problem, you could use the compile command in the "compile script" that you mentioned in your message, while using the ideas above to have the compilation process automatically update your scripts.


aspect@aspectscripting.com
 
ok let me see if i am understanding this correctly.

have procomm open, run the .was instead of the .wax it compiles it.

how about if using a shortcut that kicks procomm and a script together, will that compile or does it need to be a 2 step process. also when run this way does it create and leave a .wax file after completed? or is it an "in memory" only deal?

also with a parent script can i have it call a .was for the same results of compiling on the fly?

if this is the case i could use a parent script purely for compiling purposes that would feed the settings that need changing to each of the seperate session files and compile them correct? would it pass global variables, or would i need the .was file its calling to have its own include referring to the file containing the variables i want to get added to it?

does that make sense or did i miss the boat somewhere in this process heh, thanks for your help :)
 
Yes, I believe that calling the .was file from the command line will have Procomm automatically compile the script for you. The generated .wax file will be left on the machine for future use.

If you have a parent script calling other .was files, then using either the execute or chain command (execute returns to the calling script, chain does not) with a .was file will cause a new .wax file to be created.

If you use the execute command, then the global predefined variables (i0-i9, s0-s9, f0-f9, l0-l9) will be passed to the child script. The help file discussion of the chain command did not state that this would occur when chaining, but I don't know why it wouldn't. However, I think multiple execute commands are what you will want to use with your script.


aspect@aspectscripting.com
 
i believe that should answer my question, thank you so much for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top