Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

SSR Database Management Scripts

 

All SSR administration scripts are executed on management nodes. The scripts directly related to cluster and database management are included in this section.

Using the Monitor Script

Using the Monitor Script

The Monitor.sh script is useful for monitoring cluster operations, either to take a snapshot or to use for real-time monitoring.

Monitor.sh

Monitor.sh

The Monitor.sh script provides real-time monitoring of the SSR cluster. The Monitor.sh script periodically executes one or more scripts, such as ShowPools.sh, which looks for changes in the Steel-Belted Radius Carrier high availability database. If a change is found, the Monitor.sh script updates the statistics it displays when a change is detected.

Note

To change the default time zone setting from UTC time, you must edit this script and the DBtime zone.txt field. For more information about editing the scripts, see Table 102.

Syntax

Options

Table 78: Monitor.sh Options

Option

Description

-sseconds

Specifies the number of seconds the Monitor.sh script should wait between execution of its commands. The number of seconds must follow the -s argument without a space.

Default value is 1 second.

-l

Specifies only a limited number of printouts; 0 defaults to no limit.

 scriptname

Specifies the name of the script you want Monitor.sh to execute.

arguments

Specifies the arguments for the script that you want Monitor.sh to execute.

-c

Clears the screen before each display page (by default, a blank line separates the displays).

-h

Displays help for the Monitor.sh script.

Example

The following example shows the output for the Monitor.sh script:

Creating and Destroying the SSR Database

Creating and Destroying the SSR Database

One script creates the SSR database; a second destroys the existing database.

CreateDB.sh

CreateDB.sh

The CreateDB.sh script creates a new database from the schema in the CurrentSessions.sql file. For details, see the section on Customizing the SSR Database Current Sessions Table in the SBR Carrier Installation Guide. It rebuilds all related tables and stored procedures, and gives the new database the name specified in the DBName.txt file.

CreateDB.sh must be executed on all management nodes in the cluster.

Syntax

Options

Table 79: CreateDB.sh Options

Option

Description

-h

Displays help for the CreateDB.sh script.

Example

The following example displays the contents of the DBName.txt file (to verify the name (“SteelBeltedRadius”) to be used to create the database) and creates a database named SteelBeltedRadius.

Usage Notes

The CreateDB.sh script determines whether a database exists when it starts; if a database is found, the CreateDB.sh script halts.

Auxiliary SQL Files Used by CreateDB.sh

Table 80 lists the auxiliary SQL files in /opt/JNPRhadm that contain information used by the CreateDB.sh script.

Table 80: Auxiliary SQL Files Used by CreateDB.sh

SQL Filename

Description

Table Schemas

Misc.sql

Contains schemas for miscellaneous internal tables

  • Sbr_Abort—Used for terminating transactions/scripts

  • Sbr_LastPoolOrd—Used for numbering IP pools

IPAddrs.sql

Contains schemas for tables involved in IP address management

  • Sbr_IpPools—Contains the names of the IP pools and their ordinal numbers

  • Sbr_IpRanges—Contains the ranges of the IP addresses and the pools that they are in

  • Sbr_IpAddrs—Contains all configured IP addresses and the details

CurrentSessions.sql

Contains schema for the Current Sessions Table

  • Sbr_CurrentSessions—Contains information about current (ongoing) sessions

UserConcurrency.sql

Contains schema for the User Concurrency Table

  • Sbr_UserConcurrency—Contains identifiers and counts

StoredRoutines.sql

Contains various stored routines used by the administration scripts

 

DestroyDB.sh

DestroyDB.sh

The DestroyDB.sh script deletes the existing database.

DestroyDB.sh needs to be run once, on one management node.

Syntax

Options

Table 81: DestroyDB.sh Options

Option

Description

-h

Displays help for the DestroyDB.sh script.

Example

Creating a Demonstration Database

Creating a Demonstration Database

One script creates a demonstration database that is useful for testing, but is not intended to create a working production database.

DemoSetup.sh

DemoSetup.sh

The DemoSetup.sh script creates a new database and related tables, gives the new database the name specified in the DBName.txt file, and populates the database with a sample IP address pool configuration. You can use this program to test a cluster environment without using live production data.

Syntax

Options

Table 82: DemoSetup.sh Options

Option

Description

numpools

A number in the range 1–25 that specifies the number of IP address pools for the script to create.

Default value is 5.

maxranges

A number in the range 1–20 that specifies the number of address ranges within each IP address pool for the script to create.

Default value is 4.

minaddrs

A number in the range 1–100,000 that specifies the minimum number of IP addresses per range for the script to create.

Default value is 1000.

maxaddrs

A number in the range 1–100,000 that specifies the maximum number of IP addresses per range for the script to create.

Default value is the value of minaddrs x 2.

-h

Displays help for the DemoSetup script.

Example

This example displays the contents of the DBName.txt file (to verify that SteelBeltedRadius is used to create the database) and creates a database called SteelBeltedRadius: