Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
dan_thrall
Participant

Recently, I was using ASE Cockpit and Workload Analyzer for a side-by-side demo of a performance profile using SSD vs spinning disks.

During this process I realized that only one of the servers I was working on was visible in Cockpit, which was established during installation.  No problem, make a directory in the plugins path, copy templates, modify agent-plugin.xml and they were added.

By the time the third ASE was added, it became apparent that this is probably going to be a repeating process in the future.

This is where the Cockpit Configuration Tool was made.

Before discussing this tool, a quick bit of history about Cockpit to ASE ratios.

When ASE 16.0 SP02 was in early stages of Beta testing, the ratio of Cockpit to ASE was 1:1.  Later on during the Beta program, Cockpit was expanded to allow multiple ASEs to a single Cockpit server as long as they are on the same host.  When Cockpit was released with 16.0 SP02, it was able to perform this one to many ratio on the same host.

The purpose of this script is to quickly add an ASE to a new or existing Cockpit installation.

Installation

The script is designed to be executed from anywhere and not be bound to any $SYBASE directory.  It makes sense to install this in $SYBASE/COCKPIT-4/bin directory.

You can find the current version of this script at KBA 2133600.

Usage

Executing the script is simple, it's create_cockpit.sh with no arguments.

Shutdown Cockpit if you are using this tool to modify or replace an existing configured ASE in the plugins directory (more on this later)
As you can see by the name, this utility exists for Unix at this time and not for Windows.

When you run the script, it will ask you for things like your $SYBASE where Cockpit resides, $SYBASE of the target ASE, sa_role user, etc. (full details below.)

All prompts should be very self-explanatory.  Once all questions are answered you'll be prompted to execute the selection after an overview of which you'll be able to make modifications if something doesn't look right.

Some things to keep in mind:

1. This is something I put together to simplify a repeating task.  The code used by this script may not be the most efficient nor the most elegant, it was made to perform a simple task and that's what it does.  Please be gentle if you take a peek at the code!

2. While many bugs have been squashed, there's likely something I've missed.  Please report any issues you encounter to me.

3. This is a use at your own risk utility.

Diagram of an ASE visible by Cockpit:

Location of where the ASE is installed with respect to Cockpit is $SYBASE/COCKPIT-4/plugins/<ase name>

When adding new ASE's you create a new directory in the plugins path, then copy the contents of $SYBASE/COCKPIT-4/templates/com.sybase.ase to the new directory.

Within this plugins/<ase name> directory is a file named agent-plugin.xml.  This sets the necessary properties for Cockpit to see the ASE and be able to connect.

This can be seen in the documentation.


So what does this utility really do?

This utility automates the creation of the plugins directory, copies content from com.sybase.ase and populates agent-plugin.xml.

Here's a sample session

$ create_cockpit.sh

################### ASE COCKPIT GENERATOR ###################

Please enter the $SYBASE path where Cockpit is installed: /walleye1/rel16

Cockpit directory is COCKPIT-4

Please enter the $SYBASE path for the ASE to be added: /walleye1/rel16.sp02pl02

Found ASE-16_0 as SYBASE_ASE in /walleye1/rel16.sp02pl02

Use this value? [y/n]:  y

Using ASE-16_0 as SYBASE_ASE in /walleye1/rel16.sp02pl02

Please enter ASE server name to be added: ase16

Please enter the path and filename for ase16's errorlog: /walleye1/rel16.sp02pl02/ASE-16_0/install/ase16.log

Please enter the path and filename for ase16's RUN_server file: /walleye1/rel16.sp02pl02/ASE-16_0/install/RUN_ase16

Please enter sa_role admin login for ase16: sa

Please enter password for sa:

Please enter password for sa again:

<<<<<<Installation Summary>>>>>>

$SYBASE of ASE to be added:  /walleye1/rel16.sp02pl02

SYBASE_ASE for added ASE:    ASE-16_0

$SYBASE of Cockpit:          /walleye1/rel16

Cockpit directory:          COCKPIT-4

ASE to be added:            ase16

Errorlog for added ASE:      /walleye1/rel16.sp02pl02/ASE-16_0/install/ase16.log

RUN_file for added ASE:      /walleye1/rel16.sp02pl02/ASE-16_0/install/RUN_ase16

Administrator login:        sa

Encrypted password:          {SHA-256:+TStgNjt4Fs=}e82Bnc9B2/0JUi67popCnl1wk1QW7hyvK+homRiCzms=

Continue with this [y] or make changes [n]:

Entering y at this point will execute the installation.  Pressing n will start over the data collection.

If there is an existing ASE directory name, you will be prompted if you want to delete.  Here, I reused an ASE name for more than one installation, and the script found it.

Continue with this [y] or make changes [n]: y

Directory /walleye1/rel16/COCKPIT-4/plugins/ase16 already exists

Delete and reinstall existing files for /walleye1/rel16/COCKPIT-4/plugins/ase16 [y/n]?

Since I don't want to remove my existing ase16 data, I will need to start over and give it a different (logical) name.  This complication exists if you have the same name for more than oneASE on the same host.  If this happens, use an alias in the target's interfaces file instead.

Delete and reinstall existing files for /walleye1/rel16/COCKPIT-4/plugins/ase16 [y/n]? n

Existing files in /walleye1/rel16/COCKPIT-4/plugins/ase16 will not be modified, exiting

$

If you use this tool to rewrite an existing ASE installed in the plugins directory, please be sure to do so only when Cockpit is shutdown.  When Cockpit is running, the in-memory values are flushed to agent-plugin.xml.  If the Cockpit is running, your newly modified settings will be overwritten when Cockpit is restarted.

I hope you find this script useful and look forward to hearing if it worked for you.

If you encounter any issues or problems with the script, please post them here.

7 Comments