Community Tribal Knowledge Base

 View Only

AirRecorder Tutorial - Part 1 

Apr 23, 2014 11:19 AM

What is AirRecorder

A Java based tool that will run several common CLI commands for checking controller, AP, and wireless device health. AirRecorder supports ArubaOS, Instant VC (IAP) and MeshOS (MSR). AirRecorder runs on any operating system that supports a Java Platform Standard Edition version 6 or later.

 

Download

Please download latest release from:

Login to support.arubanetworks.com go to Tools> Airrecorder Folder

 

At time of writing this is version 1.2.16.

 

Getting Started

After downloading the distribution ZIP file, unpack it to a directory or folder of choice. On successful unpacking, you should at least find following files:

 AirRecorder-1.2.16-release.jar

 CHANGES.txt

 EULA.txt

 HOWTO.txt

 LICENSE.txt

 README.txt

 samples

 

Please note that "samples" is a folder that contains sample files.

 

To run the tool, please open a DOS command window or Linux/MacOS terminal and type:

java -jar AirRecorder-1.2.16-release.jar

 

You should see an output similar to:

AirRecorder (c)2011-2014 Thomas Bastian, Aruba Networks

usage: AirRecorder [options] [<controllerip>]

 

If you don’t see an output similar to above, then most likely you don’t have Java installed. Please download the proper Java for your system from:

http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp

 

First Use

AirRecorder records the output of CLI commands in a file. By default, the list of commands is read from a file named "commands" or "commands.txt". Please go 

ahead and create a file named "commands.txt" in the distribution directory. Enter a single line into the file:

0,show ap active

and save the file.

 

You are now ready to run your first AirRecorder session. In the Windows command (DOS) window or Linux/MacOS Shell terminal window, please type:

java -jar AirRecorder-1.2.16-release.jar <controller>

 

<controller> is the IP address or hostname of the controller you would like to run the session against.

 

As the session begins, you will be prompted for the username, password and enable password to be used to login into the controller (if you have 

"enable bypass" activated on the controller, just hit RETURN when prompted for enable password).

 

At the end of the session, a new file should have been created:

air-recorder-<controller>-YYYYMMDD-HHMMSS-00.log

 

Please use your favorite editor to look at the contents recorded (it should contain the output from the command “show ap active”).

 

Unattended Use

AirRecorder can read the username, password and enable password for login into the controller: 

- from the command line: -u <username> -p <password> -e <enable password>

  i.e.:

  java -jar AirRecorder-1.2.16-release.jar -u admin -p admin -e enable <controller>

  

- from a file named either "<controller>" or "<controller>.txt" argument provided (i.e. in the above case, a file named: "192.168.0.196" or 

  "192.168.0.196.txt"). In this case, the file should contain the username, password and enable password each on a separate line in the file. If

  "enable bypass" is enabled on the controller, leave the third line blank.

 

Working With Commands

AirRecorder can read commands from any file. Please use the command line argument:

-c <command file>

to specify an alternate commands file to be used.

 

The commands file syntax is as follows:

- one command specification per line

- lines starting with # are skipped

- a command specification takes the form: [<trigger>;]<schedule>,<command>

  i.e.: 0,show ap active

 

<trigger> is an optional field and can be omitted. TRIGGERS will be discussed later.

 

<schedule> is further broken down as:

  <interval>[;<execution count>[;<cycle interval>[;<cycle count>]]]

 

<interval> is the interval in *SECONDS* between consecutive executions. A value of zero will run the command once. Please be cautious when selecting the interval since smaller values may impact controller performance.

 

<execution count> is the optional number of times the command will be executed. When unspecified the command will repeat for ever. Otherwise the command will be executed the specified amount *PER* cycle. Note that if <cycle interval> is not specified, the command will be executed <execution count> number of times, then never again.

 

<cycle interval> is the optional interval between the start of repeating cycles. If this is omitted, the command will be executed just <execution count> times.

 

<cycle count> is the optional number of times to run the cycles.

 

<command> is the command string that is being sent to the controller. The string is sent as is to the controller with the exception of placeholder and variable processing.

 

Both interval and cycle interval are expressed in seconds. However, adding the m or h suffix will provide values in minutes and hours respectively.

 

Examples:

 0,show ap active: will run the command "show ap active" once.

 1;1,show ap active: will run the command "show ap active" just once, i.e. "one shot"

 1m,show ap active: will run the command "show ap active" every minute.

 1m;2,show ap active: will run the command "show ap active" twice spaced by one minute.

 1m;2;1h,show ap active: will run the command "show ap active" twice spaced by one minute every hour.

 1m;2;1h;3,show ap active: will run the command "show ap active" twice spaced by one minute every hour for three times.

Statistics
0 Favorited
114 Views
0 Files
0 Shares
0 Downloads

Comments

Feb 21, 2019 12:19 AM

hi zesa, are you connecting to a controller or IAP, and what version of code is running on it.

Feb 12, 2019 09:20 AM

i tried it with macos and ubuntu. always the same :/

Feb 12, 2019 07:57 AM

my java version:
java version "11.0.2" 2019-01-15 LTS

Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)

Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

i get a lot of : Failed to connect: java.io.IOException: Enable handschake failed(1).

also with --disable-fast-login.

 

java -jar AirRecorder-1.5.5-release.jar -disable-fast-login 192.168.1.xx

 

Sep 20, 2016 12:13 PM

Same as Carlos, I had to use the "--disable-fast-login" option.  Example:

java -jar AirRecorder-1.4.2-release.jar --disable-fast-login <controller IP>

 

I think use of the "--disable-fast-login" option should be added to tutorial.

 

Thanks.

May 11, 2016 04:03 AM

Hi again,

 

I think I found the solution, is use the "--disable-fast-login" option.

 

Regards.

May 10, 2016 05:41 AM

I am receiving the same error than Alba:

2016-05-10T11:26:28.066+0200 ERROR AbstractConnector - initial connector setup f
ailed, phase: read prompt, timeout
Failed to connect: java.io.IOException: Read prompt handschake failed(timeout).

 

I can connect perfectly to controller by ssh but with AirRecorder I receive this error.

Feb 19, 2016 03:09 AM

I'm geting this error: "2016-02-19T11:37:26.782+0400 ERROR AbstractConnector - initial connector setup failed, phase: read prompt, timeout
Failed to connect: java.io.IOException: Read prompt handschake failed(timeout)."

Whatever I do: automatic login, manual login, script or no script. Doesn't matter.

And I can connect successfully to the same Instant controller with putty.exe

Dec 22, 2014 09:29 PM

hi Raja

the username, password, enable password should be exactly like this:

 

----------------------

usernamehere

passwordhere

enablepasswordhere

----------------

 

not including the ---- of course, in a text file named 1.2.3.4.txt, and then you start AirRecorder with 1.2.3.4 as the IP of the controller (not 1.2.3.4.txt)

 

please copy/paste your full example session if this is still not working.

 

regards

-jeff

 

 

Dec 22, 2014 03:25 PM

 Jeff 

 

I was able to see the results after using the command

Java -jar AirRecorder-10.2.16-release-jar-c commands.txt  <IP address. of the controller> but the user name,password was entered manually. 

 

 

Will need to try out automated way.

 

Raja

Dec 22, 2014 01:26 PM

I tried the command

Java -jar AirRecorder-10.2.16-release-jar <IP address. of the controller>

 

and entered the user name, password. enable password.

The commands.txt file has the above commands that I have typed above and the commands.txt file is

stored in the air-recorder-1.2 folder

 

Regards,

Raja

Dec 22, 2014 03:30 AM

krsarla,

can you share the full output of what you tried ?

 

typical invocation on windows looks like this:

 

c:\temp> java -jar AirRecorder-1.2.0.jar -c commands.txt 1.2.3.4

 

where 1.2.3.4.txt exists with the credentials of the controller

and command.txt is your command file as shown above

 

regards

-jeff

 

Dec 22, 2014 02:28 AM

 

I was able to execute successfully but getting the message no commands available for processing:exiting.

 

I have a created a commands.txt file with the commands below and its stored in the air-recorder-1.2 folder as well as Java\jre1.8.0_25\bin

 

Commands.txt file contents

0,show ap active

0,show user-table

 

Am I missing a step to see the output?

Oct 09, 2014 03:44 PM

AirRecorder is great tool. Example:

clear gap-db wired-mac ${apmac} and create a placeholder file with the MACs of the APs.

We used it to clear the list with APs that were down after a big deployment/move of new APs. It saves a lot of time in repetative jobs and this is just the beggining. You can do a lot more if you get in the advanced options.

Jul 10, 2014 02:48 PM

Hi,

 

For use case -

There are certain scenarios where we would be required to get show command outputs at a regular interval,

i.e., 'show ap active' command to be run once every 5mins for a duration of 2 hours.

 

This could also be used to backup specific logs/outputs to an external server at a set interval for review at a later point of time.

Such options become quite handy while troubleshooting client connectivity, datapath and AP boot related issues.

Going into the CLI would permit the same to be executed but by using this tool, the task is automated.

 

Thank you.

Jul 08, 2014 08:07 PM

Hi,


Can you explain a use case for using this tool instead of going driectly into the CLI?


Thank You

 

 

Apr 23, 2014 12:32 PM

Cool stuff

Related Entries and Links

No Related Resource entered.