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

save us all time

Status
Not open for further replies.

evilScooby

Technical User
Jan 9, 2004
35
GB
Somebody must of figured out how to do this without paying big bucks for programs and licenses.

Does anyone have any scripts for Procomm OR a way in ASA to log in, display the error reports and then export it to a file on your desktop?

I have to go in every day to lots of sites and check for errors, or check the system status and see what there using , so it would be great if I had a script or a way to do it automatically to do things like list system meaurements or display alarms.

There seems to be options , but I would be better if there were scripts already written.
ASA is meant to be better for getting reports and exporting them but Who knows how to do it automatically.
And things like Display alarms comes up with options of what alarms you want to view, so would ASA not be able to automatically do this command ?

does anyone use anything like this?
how many use ASA , and how many use Procomm?

 
You can use Procomm's script recorder to get a start on a script that will display the proper screens for you (you will need to add to it to capture the data to a text file). This will work as long as the commands you sen each day are always the same.

Here is some more information from my site on the script recorder:

If you are trying to create a script that automates communications with a remote system and the text is relatively constant, you can make the task easier by using the Script Recorder to create your script. To enable the Script Recorder, select the Tools | Scripts | Start Recorder menu item. Procomm Plus will now monitor all incoming data and your outgoing responses to that data. Start performing the tasks (keyboard-based only!) that you want Procomm Plus to record. Once done, select the Tools | Scripts | Stop Recorder menu item. You will be prompted to save your recorded script; some editing of the script may be necessary. When you view your script, you will see that it is composed of waitfor/transmit commands. If all looks well, compile your script and see if it executes as expected.

aspect@aspectscripting.com
 
yeh I have done that and have been playin about with it for a while.
few questions though.
when it does "waitfor" command, can u make it wait for a time, like 2 secs instead of a command, cause one of the commands u have to wait for a couple of seconds before issueing it to log off and just now it just waits for the prompt then issues the command I told it to, but no waiting.

Also, I have got it loggin into the switch with the recorder once I dialled up to the switch I want (can it autodial as well?)? but I want it to capture to a file when its runnin the commands/

basically it logs in. Does display alarms, then logs out.
I have tried to make it capture to a text file the result of the display alarms command but I cant. I can only somehow do it manually with the capture thing.

Also when lookin in the dial directory , it has a capture command, but turning that on doesnt capture it either.
Is this possible?

Cause im aiming for being able to make it capture a page, then it pushes next page, then captures that.. etc. for about 10 pages.

helpppppppppp Its drivin me mad
 
The way the waitfor command works is by default it will wait up to 30 seconds for the specified string to appear. If you need a two-second pause for whatever reason before a command fires, you could use pause 2 for a two-second pause.

If the manual capture works OK for you, then you'll want to try adding these commands to your script:

set capture file <filename>

where filename is just the name of the capture file with no path information. If you want to place the capture file in a different directory than Procomm's default capture directory, you would use this command:

set capture path <path>

Are you dialing in to the switch with a modem or making a telnet connection? There's a known bug with capture files not starting automatically upon a telnet connection, but I have a workaround script on my site if this is the case.


aspect@aspectscripting.com
 
using telnet and dialing in but mostly dialing in.

can u make it do things at scheduled times ? like 10am everyday.
Is ur site scripts free? I had a quick look about there before posting here but didnt find much to help me on this.

can u make it dial a connection itself?

 
The samples on my site are free for all to use. The script to workaround the issue with a capture file not opening automatically with a telnet connection is here:


Here is the discussion of this script (turns out it wasn't on my samples page after all):

If you try to connect to a telnet entry in your Connection Directory and have a capture file specified, you will notice that the capture file is not opened when you make a connection. This script, attached to the Connection Directory entry, will open the capture file you have specified in the entry when the connection is made. When the connection is closed, the script will close the capture file and then close itself.

I would say the easiest way to have your system automatically execute a script is to schedule it using the Windows scheduler. Procomm comes with a scheduler as well, but there are some issues with it.

As for dialing a connection automatically, you could either have your script do that using the dial command, or you could launch a batch file with the proper command line to launch Procomm and dial a particular Connection Directory entry. You can find out more on command line options by click Help | Script Reference in Procomm, clicking on the Index tab if necessary, type in the the word command, double click on Command Line Options, then double click Command Line Options (Procomm Plus ASPECT Reference). The help file will reference PW4, but if you are using version 4.8 of Procomm you will want to use PW5 in your command line.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top