7 Tools and Utilities
This chapter provides a description of the operational programs or executables used by the system.
Executables are located in the /IN/service_packages/SMS/bin
directory.
Some executables have accompanying scripts that run the executables after performing certain cleanup functions. All scripts should be located in the same directory as the executable.
cmnConfigSyntaxCheck
Configuration
cmnConfigSyntaxCheck accepts the following command line options.
Usage:
cmnConfigSyntaxCheck [-v -d] filename [filename [...]]The table below shows the available parameters.
Table 7-1 Configuration Parameters for cmnConfigSyntaxCheck
| Parameter | Default | Description |
|---|---|---|
|
-v |
- |
Verbose mode. Displays in detail all information that is available. |
|
-d |
- |
Reads and dumps the named files. |
Output
cmnConfigSyntaxCheck displays the results of the syntax check on the terminal.
Example: This text shows an example of a report from the cmnConfigSyntaxCheck.
$ cmnConfigSyntaxCheck -v filename /ACS/etc/acs.conf
cmn::FileNotFoundException: Opening config file filename
Config file syntax error: ACS/etc/acs.conf:30: Syntax ErrorcmnSU
Purpose
cmnSU replaces the built in “su” command for Convergent Charging Controller processes run from initab. Run as root, it will provide a login shell to the specified user.
Configuration
cmnSU accepts the following command line options.
Usage:
/cmnSU - username [arg...]The table below shows the available parameters.
Table 7-2 Configuration Parameters for cmnSU
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
Provide a login shell. Required. |
|
|
Not applicable. |
The user to become. Required. |
|
|
Not applicable. |
The rest of the arguments to the shell. |
compareNode
Purpose
This command can be used to initiate a full database comparison of an SCP database with the definitive copy in the SMF database.
This is used to ensure that an SCP database has all its data consistent with the SMF database. Under normal conditions, this should always be the case, but there may be a time (for example, after multiple failures) where the System Administrator wants to check that an SLC database is consistent.
The compareNode tool requests a comparison between the contents of the SMF database and one other node, by invoking comparisonServer. This is a more time-efficient method than a resync. All the entries of all the tables that are defined to be replicated to the specified updateLoader will be compared.
A full report of the comparison is written in the report directory (REPORT DIR) on the SLC machine.
Configuration
compareNode accepts the following command line options.
Usage:
compareNode [-hostname hostname|-master node_num] [-with node_num] [-timeout seconds]The table below shows the available parameters.
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
Sets the hostname of the superior node in the comparison. (Optional. If used, -master must = 0, that is, if -master must be set to off.) |
|
|
1 |
Node number of the superior node in the comparison. (Optional, as the default will be used if it is not set. Or it can be turned off by setting to 0, and a hostname specified instead.) Note: This can be an infMaster. |
-with |
256 |
Node number of the updateLoader in the comparison. (Optional, as the default will be used if it is not set.) |
-timeout |
10 |
Number of seconds before the connection between the nodes in the comparison is timed out. (Optional, as the default will be used if it is not set.) |
Example: This text shows the common usage of compareNode being run on the superior master in a node comparison.
compareNode -with 301comparisonServer
Purpose
comparisonServer is a shell script which starts node comparisons between data in two different nodes. It is started by an SMS in response to a database comparison request.
Configuration
comparisonServer accepts the following command line options.
Usage:
comparisonServer node_to_compare address portThe table below shows all the available parameters.
Table 7-3 Configuration Parameters for comparisonServer
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
Not applicable. |
|
|
Not applicable. |
Not applicable. |
|
|
Not applicable. |
Not applicable. |
inetCompareServer
Purpose
inetCompareServer is a shell script which is run by the Replication Check screens. It uses the report configuration information from the Replication Check screen to start a node comparison (which is performed by smsCompareResyncServer). It should not be necessary to run this script by hand.
Output
inetCompareServer writes to syslog and also logs additional information (including raw Replication Check report data) to /IN/service_packages/SMS/tmp/inetCompareServer.log.
Example: This text shows an example of a report from the inetCompareServer
Copyright (c) 2002, Oracle. Contact Oracle at support@oracle.co.nz
Input delivered through standard input. Please consult the SMS administration guide for more information on this software. For command line options, pass '-h'as the only option to this program.
Awaiting server control information...
Input accepted. Now running server.
Mar 4 05:01:49 smsCompareResyncServer(28781) NOTICE: Beginning comparison for node 301.
COM: Fri Mar 4 05:01:50 2005: Node 301, started processing 186 SMS and 186 SCP records.
COM: Fri Mar 4 05:01:50 2005: Node 301, table ACS_CALL_PLAN, started processing 186 SMS and 186 SCP records.
COM: Fri Mar 4 05:01:51 2005: Node 301, table ACS_CALL_PLAN, group ACS_CALL_PLAN, started processing 186 SMS and 186 SCP records.
COM: Fri Mar 4 05:01:52 2005: Node 301, table ACS_CALL_PLAN, group ACS_CALL_PLAN, finished processing 186 of 186 SMS and 186 of 186 SCP records, 0 discrepancy found in group.
COM: Fri Mar 4 05:01:52 2005: Node 301, table ACS_CALL_PLAN, finished processing 186 of 186 SMS and 186 of 186 SCP records, 0 discrepancy found in table.
COM: Fri Mar 4 05:01:52 2005: Node 301, finished processing 186 of 186 SMS and 186 SCP of 186 records, 0 discrepancy found in node.
Mar 4 05:01:54 smsCompareResyncServer(28781) NOTICE: Ending comparison for node 301.
Mar 4 05:01:54 smsCompareResyncServer(28781) NOTICE: Comparison was successful for node 301.
Started writing index HTML file for reports.
Finished writing index HTML file for reports.infoDisplayer
Purpose
infoDisplayer is an executable which can be used to display update request information results.
Configuration
infoDisplayer supports the following command-line options:
Usage:
infoDisplayer [-host value] [-master value] [-nodeid value] [-timeout value]The table below shows the available parameters.
Table 7-4 Configuration Parameters for infoDisplayer
| Parameter | Default | Description |
|---|---|---|
|
|
localhost |
The local host name. |
|
|
0 |
The node number of the smsMaster. |
|
|
1 |
The ID of the node for which the information is to be displayed. |
|
|
10 |
Period after which infoDisplayer will . |
Output
Examples:
bash-2.05$ ./infoDisplayer -nodeid 999 -master 1
initialiseNode: Reading '/IN/service_packages/SMS/etc/replication.def'
initialiseNode: heartbeatPeriod 20
initialiseNode: heartbeatTimeout 20
initialiseNode: connectionTimeout 2
initialiseNode: masterPortNum 12343
initialiseNode: queueWarnThresh 5
initialiseNode: queueErrThresh 100000
initialiseNode: queueCritThresh 1000000
initialiseNode: hBTolerance 10.0
initialiseNode: commitIdleTime 0.100000
initialiseNode: commitBusyTime 10.0
initialiseNode: tcpAbortSecs 20
initialiseNode: oracleUserPass '/'
initialiseNode: reportDir '/IN/service_packages/SMS/tmp/'
initialiseNode: statusFile '/IN/html/status.html'
initialiseNode: configFilePath '/IN/service_packages/SMS/etc/replication.config'
initialiseNode: configFileName 'replication.config'
initialiseNode: node number 999
initialiseNode: node type 5
initialiseNode: s side updates 1
Nov 22 22:05:17 infoDisplayer(6589) NOTICE: Master Controller. `/infoDisplayer' process started (node 999)inputBootstrap
Purpose
The purpose of the inputbootstrap binary is to produce a configuration file to be passed to the smsCompareResyncServer from replication.config. It is started by the comparisonServer or the resyncServer which initiates requests. It can also be run manually from the command line.
It must be noted that this binary cannot be run with DEBUG when used with the comparisonServer. (Applicable to production environment).
Note:
This binary is not intended to be run by the user. Please contact your Oracle support before attempting to do so.
Configuration
inputBootstrap accepts the following command line options.
Usage:
inputBootstrap -n node_id [-c config_filename] [-a ip_address] [--hex-address ip_address] [-p port] [-r] [-u usr/pwd] [-e] [-i interval] [-h] [-b]Or long form:
inputBootstrap --node-id=node_id [--config-file=config_filename] [--address=ip_address] [--hex-address ip_address] [--port=port] [--preserve-ranges] [--oracle-user=usr/pwd] [--enhanced-recovery] [--sync-marker-retry-interval=interval [--help] [--build-info]The table below lists the available parameters.
Table 7-5 Configuration Parameters for inputBootstrap
| Parameter | Default | Description |
|---|---|---|
|
|
none |
The replication node ID for which the configuration file is produced. (Required.) Allowed values: integers, (any signed number of reasonable value, usually in decimal/octal/hex). |
|
|
/IN/service_packages/SMS/etc/replication.config |
Name of the replication configuration file to use. (Optional.) Allowed values: string |
|
|
from file specified in config-file |
The IP address of the node. This cannot be specified if the '--hex-address' option is specified. (Optional.) If specified, this will override all addresses specified in the configuration file. Allowed values: string |
|
|
from file specified in config-file |
The IP address of the node as a hex string. This cannot be specified if the '-a' ('--address') option is specified. (Optional.) If specified, this will override all addresses specified in the configuration file. Allowed values: string |
|
|
none |
The port number to connect to at the given node. (Optional.) Note: This can only be used when the address is also specified. Allowed values: integers, (any signed number of reasonable value, usually in decimal/octal/hex). |
|
|
false when missing |
Leave the data from the configuration file as it is and do not correct the group ranges. This option is implied by the -e option. Allowed values:
|
|
|
smf/smf |
The Oracle database connection string (userid/password). (Optional.) Allowed values: string |
|
|
false when missing |
Restrict range of rows to resync. If enhanced recovery mode is possible, the smsMaster process sets this option. Allowed values:
|
|
|
30 seconds |
The number of seconds between attempts to insert the replication synchronization marker into the database. The marker indicates when a total database re-synchronization has been performed with the smsMaster database. Inserting marker requires inputBootstrap to acquire a lock; failure to acquire the lock could result in updateLoader timing out. (Optional.) Allowed values: integers, (any signed number of reasonable value, usually in decimal/octal/hex). |
|
|
false when missing |
Shows the help for this binary. Allowed values:
|
|
|
false when missing |
Prints out program build information of the binary. Allowed values:
|
Note:
Long options can be separated from their values by an equal sign ('='), or you can pass the value as the following argument on the command line (for example, '--port 4000' or '--port=4000'). Short options must have their values passed after them on the command line, and in the case of boolean short options, cannot have values (they default to true) (e.g., '-p 4000' or '-f').
repConfigWrite
Purpose
This command can be used to create a replication.config file. It reads the local database to obtain the replication set-up and writes the file to the directory specified by the output parameter.
Generally, this function is performed using the SMS Java screens.
For more information, see:
-
unresolvable-reference.html#GUID-74FDDECE-E835-4B53-BDCF-47A6A630CD73
-
Service Management System User's Guide
Startup
This task is started by clicking Create Config File on the Table Replication tab of the Node Management screen.
It can also be started on the SMS from the command line.
For more information about the Node Management screen, see SMS User's Guide.
Configuration
repConfigWrite accepts the following command-line options:
Usage:
repConfigWrite [-user user/password] [-output file]The table below shows the available configuration parameters.
Table 7-6 Configuration Parameters for repConfigWrite
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
Oracle user/password for the SMF. Example: |
|
|
./repCofigNNNNN (Where NNNNN is a version number that counts for the number of times the file has generated OK.) |
The output path and filename for the replication.config file. (Optional.) Example:
|
resyncServer
Purpose
resyncServer initiates resyncs between databases by sending a resync request to a node Master process. This overwrites data in an SCP with data from the SMF. The node Master process is usually smsMaster.
This process is started by the smsMaster when a database resync is required and runs only for the duration of the resync. It should not be run manually.
Configuration
resyncServer accepts the following command line options.
Usage:
resyncServer inf_node
address portenhanced_recovery
The table below shows the available configuration parameters.
Table 7-7 Configuration Parameters for resyncServer
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
The node with the database which will be updated. |
|
|
Not applicable. |
The ip address or hostname of the node which will be updated. |
|
|
Not applicable. |
The port number on the node which will be updated. |
|
|
off |
If set to on, the number of rows in the inferior database will not be counted during the resync. Allowed values: on, off. |
setupOracleWallet.sh
Purpose
The setupOracleWallet.sh script automatically creates the Oracle server wallet on the SMS by performing a sequence of orapki commands. The Oracle server wallet is the single-sign-on wallet that is used when connecting securely to the database and that contains certificate information for identifying the Oracle server. Use this script only if you are using SSL connections to the database.
For information about creating the Oracle wallet automatically by using setupOracleWallet.sh, see Creating the Oracle Wallet Automatically by Using setupOracleWallet.sh.
Note:
You will not need to re-run this script after you complete the Oracle server wallet setup.
Information Required by setupOracleWallet.sh
The following table lists the information that is required by the setupOracleWallet.sh script.
Table 7-8 Information Required by setupOracleWallet.sh
| Required Item | Description |
|---|---|
| Oracle wallet base directory |
The base directory for the Oracle wallet. Specify the base directory to use for the Oracle root and Oracle server wallets. On a clustered SMS specify a file system that is cluster-wide to allow all instances to access the same wallet information in a single location. On a non-clustered system the default location for the Oracle wallet base directory is: /u01/app/wallets/oracle/ On a clustered system the default location for the Oracle wallet base directory is: /global/oracle/app/wallets/oracle/ |
| ISO country code | The local international country (ISO) code for your country. Specify the two-letter code. |
| Wallet passwords | The password to use for the root CA wallet and the
password to use for the server wallet. You will be prompted for the
password each time the wallet is accessed.
Note: Wallet passwords have length and content validity checks applied to them. Generally passwords should have a minimum length of eight characters and contain alphabetic characters combined with numbers and special characters. |
Startup
You run setupOracleWallet.sh on the SMS node from the command line. You must be logged in as user oracle. If Convergent Charging Controller is installed on a clustered system then you should run setupOracleWallet.sh only on the primary SMS node.
Configuration
The setupOracleWallet.sh script is configured by the following command-line parameters.
Usage:
setupOracleWallet.sh [-k keysize] [-v validdays] [-s server_certificate] [-t root_certificate] [-w wallet_base]| Parameter | Default | Description |
|---|---|---|
|
|
2048 |
The keysize for certificate keys. |
|
|
3650 |
The validity period for certificates in days. |
|
|
NA |
The signed certificate file for the server wallet; for example, ./server/cert.txt. |
|
|
NA |
The root certificate file of the certificate authority (CA); for example, ./root/b64certificate.txt. |
|
|
NA |
The base directory for the Oracle wallet. If not specified, the script prompts you to enter the location of the Oracle wallet base directory. Choose a directory accessible by user oracle; for example, on a non-clustered SMS choose: /u01/app/wallets/oracle On a clustered system choose a directory located in a cluster global file system; for example: /global/oracle/app/wallets/oracle The script creates the following subdirectories for the root and server wallets under the wallet base location: ./root and ./server. |
Ways to run setupOracleWallet.sh
When you initially run setupOracleWallet.sh you specify whether to use self-signed certificates or certificates signed by a commercial CA. You can optionally specify the -k, -v, and -w command-line parameters; for example:
setupOracleWallet.sh -k keysize -v validdays -w
wallet_base
If you specify to use self-signed certificates then setupOracleWallet.sh creates the self-signed root certificate and exports it to the following file:
./root/b64certificate.txt
Where ./root is a sub-directory of the base directory for the Oracle wallet. You must import this certificate into the Java lib\security\cacerts file on each client PC by using the Java keytool utility. See Adding Trusted Certificates to the Keystore on Client PCs for more information.
If you specify to use a commercial CA to sign your certificates then
setupOracleWallet.sh creates the certificate request file that you must send
to the commercial CA for signing. When the commercial CA returns the signed certificate,
you must rerun setupOracleWallet.sh to add the trusted CA certificate and the
CA-signed certificate to the server wallet. You can optionally specify the
-s and -t command-line parameters; for
example:
setupOracleWallet.sh -s server_certificate -t
root_certificate
smsCompareResyncClient
Purpose
This is a child process of updateLoader. It is called by smsCompareResyncServer and updates the SCP during replication on a clustered install. It also performs database resynchronizations and comparisons on the inferior node during replication checks.
This process is not intended to be be started manually. It is installed on the SLC.
Configuration
smsCompareResyncClient accepts the following command line options.
Usage:
smsCompareResyncClient -n int [-u usr/pwd] [-h] [-b] [-i int] [-p port] [-o seconds] [-t] [--outside-throttle-sample-rate int] [--inside-throttle-sample-rate int] [--start-threshold int] [--stop-threshold int] [-s dir] [--database-write-buffer-size int] [--database-read-buffer-size int] [--database-commit-period int] [--max-buffer-size int] [--dump-core-instead-of-exception] [--long-raw-size=max_size]The table below contains the available parameters.
Table 7-9 Configuration Parameters for smsCompareResyncClient
| Parameter | Default | Description |
|---|---|---|
|
|
Not applicable. |
The node number of the client. (Required.) Allowed values: integer (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
smf/smf |
The Oracle database connection string. (Optional.) Allowed values: string |
|
|
false |
Prints this help screen. (Optional.) Allowed values:
|
|
|
false |
Prints out program build information then exits. (Optional.) Allowed values:
|
|
|
no process is informed |
Process to inform when the process is in a position to resync/compare. For use only when used from the updateLoader process. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
Not applicable. |
The port to listen on for connections from the server. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
-1 |
Timeout (in seconds) on TCP connection. (Optional.) Allowed values:
|
|
|
false |
To throttle the client. (Optional.) Allowed values:
|
|
|
Not applicable. |
Sample rate in seconds for throttling while not throttling. (Required if -t given.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
Not applicable. |
Sample rate in seconds for throttling while throttling. (Required if -t given.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
Not applicable. |
CPU usage percentage to start throttling at. (Required if -t given.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
Not applicable. |
CPU usage percentage to end throttling at. (Required if -t given.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
/tmp |
Directory to store required database changes in during a resync. (Optional.) Allowed values: string |
|
|
10 |
The size in terms of records of the buffer size for writing to the database. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
100 |
The size in terms of records of the buffer size for reading to the database. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
1000 |
The number of changes to make to the database before committing them to the database. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
approximately 50Mb |
The maximum size (in bytes) to allow messages received from the server to be. This size is reflected in the maximum size of bytes to allocate in memory for such messages. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex) |
|
|
false |
If set, will force the process to dump a core file (and exit) if any network messages are received bigger than max-buffer-size. Allowed values:
|
|
|
512K |
The maximum size (in bytes) to allocate for a long raw field used in a resync. Allowed values:
|
Note:
Long options can be separated from their values by an equal sign ('='), or you can pass the value as the following argument on the command line (for example, '--node-id 257' or '--node-id=257'). Short options must have their values passed after them on the command line, and in the case of boolean short options, cannot have values (they default to true) (for example, '-p 4000' or '-t').
smsCompareResyncServer
Purpose
smsCompareResyncServer performs comparisons and resyncs of data in specified tables and replication groups. This enables you to:
-
Check that replication is working correctly
-
Force updates of data between nodes
Note:
This process is usually started by resyncServer.
smsCompareResyncServer is installed on the SMS.
Configuration
smsCompareResyncServer accepts the following command line options.
Usage:
smsCompareResyncServer [--dump-core-instead-of-exception] --max-buffer-size=size [--dont-count-rows] [--inform-master] [--database-read-buffer-size=size] [--cancel-on-eof] [--use-ip=int] [--report-directory=base_dir] [--tcp-timeout] [--input-file=config_file_name] [--oracle-user=user] [--build-info] [--help] [--long-raw-size=max_size]The table below contains the available parameters.
Table 7-10 Configuration Parameters for smsCompareResyncServer
| Parameter | Default | Description |
|---|---|---|
|
|
false when missing |
If set, will force the process to dump a core file (and exit) if any network messages are received bigger than max-buffer-size. Allowed values:
|
|
|
approximately 50Mb |
The maximum size (in bytes) to allow messages sent to the client to be. This size is reflected in the maximum size of bytes to allocate in memory for such messages. Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex). |
|
|
false when missing |
Do not make a count of the rows in the database. For very large comparisons/resyncs this may give a speed improvement. Allowed values:
|
|
|
false when missing |
If performing a resync, inform the smsMaster. Allowed values:
|
|
|
100 |
The size (in records) of the buffer size for reading from the database. Must match the --database-write-buffer-size specified for the smsCompResyncClient. (Optional.) Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex). Note: Performance of the compare/resync can be seriously impacted if the number specified is too low, a recommended value for this parameter is 1000+. |
|
|
false when missing |
Tells the server to cancel the resync/compare when EOF on standard input is reached. Note: This option is specifically for the inetCompareServer setup. Allowed values:
|
|
|
none |
Forces the server to use the IP address ranked as per the mentioned integer for each client. If there are not enough IP addresses listed, or this option is not specified, it will start from the first IP address, attempting each in turn until connected. Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex). Examples: If --use-ip = 2, the server will use the second IP address listed. |
|
|
/IN/html/output/SMS/ |
The base directory to create and store final reports in. (Optional.) Allowed values: string. |
|
|
0 |
Timeout (in seconds) on TCP connection. (Optional.) Zero = no timeout. Allowed values: integers (any signed number of reasonable value, usually in decimal/octal/hex). |
|
|
Input is expected on the standard input stream. |
Contains the name of a configuration file as input information for performing a resync/compare. (Optional.) See Input file for details. Allowed values: string |
|
|
smf/smf |
The Oracle database connection string. (Optional.) Allowed values: string |
|
|
false when missing |
Prints out program build information then exits. Allowed values:
|
|
|
false when missing |
Prints this help screen. Allowed values:
|
|
|
512K |
The maximum size (in bytes) to allocate for a long raw field used in a resync. Allowed values:
|
Note:
-
All options apart from '-h', '-b' and '-i' can be specified in the input configuration.
-
Long options can be separated from their values by an equal sign ('='), or you can pass the value as the following argument on the command line (for example, '--tcp-timeout 100' or '--tcp-timeout=100'). Short options must have their values passed after them on the command line, and in the case of boolean short options, cannot have values (they default to true) (for example, '-o 100' or '-h').
Input File
These are the configuration parameters contained within the input file optionally used by smsCompareResyncServer.
Replication
|
Syntax |
|
|
Description |
The Replication section lists the required replication parameters. |
|
Type |
List |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
Not applicable. |
perform
|
Syntax |
|
|
Description |
The action to be taken by smsCompareResyncServer. |
|
Type |
Boolean |
|
Optionality |
Required |
|
Allowed |
|
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
|
report-row-number-limit
|
Syntax |
|
|
Description |
For a comparison, the maximum number of differences in a group that will be reported. For a resync, the maximum number of errors to report of each group synchronized. |
|
Type |
Integer |
|
Optionality |
Optional (default used if not set). |
|
Allowed |
Not applicable. |
|
Default |
-1 |
|
Notes |
Specifying -1 indicates no limit will be imposed. |
|
Example |
|
produce-final-reports
|
Syntax |
|
|
Description |
Whether or not to produce final reports. |
|
Type |
Boolean |
|
Optionality |
Optional (default used if not set). |
|
Allowed |
true, false |
|
Default |
true (reports produced) |
|
Notes |
Not applicable. |
|
Example |
|
report-directory
|
Syntax |
|
|
Description |
Specify which directory reports are to be written to. |
|
Type |
String |
|
Optionality |
Optional (default used if not set) |
|
Allowed |
Any valid directory |
|
Default |
/IN/html/output/SMS |
|
Notes |
Not applicable. |
|
Example |
|
report-after
|
Syntax |
|
|
Description |
Depending on the type option: Specify how many comparisons the client should process before sending progress report to the server. Specify how many seconds the client should allow to elapse before sending a progress report to the server. |
|
Type |
List |
|
Optionality |
Optional (default used if not set) |
|
Allowed |
Not applicable. |
|
Default |
No progress reports are provided. |
|
Notes |
type and count are both mandatory when report-after is specified. |
|
Example |
|
stop-on-limit
|
Syntax |
|
|
Description |
A flag to tell the server to stop a resync or comparison for a replication group after the Table 7-* is reached. |
|
Type |
Boolean |
|
Optionality |
Optional (default used if not set). |
|
Allowed |
true, false |
|
Default |
false (do not stop) |
|
Notes |
Not applicable. |
|
Example |
|
view
|
Syntax |
|
|
Description |
Describes the nodes, tables and groups for the replication action. |
|
Type |
List |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
Not applicable. |
Node
|
Syntax |
|
|
Description |
A list of nodes for the replication action to work on. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
Not applicable. |
id
|
Syntax |
|
|
Description |
The ID of the node to be used. |
|
Type |
Integer |
|
Optionality |
Optional (default used if not set) |
|
Allowed |
Not applicable. |
|
Default |
Values from replication node configuration. |
|
Notes |
For normal replication resyncronization, these are calculated using the replication node configuration. When running from the command line this must match the --node-id of a smsCompareResyncClient. |
|
Example |
|
address
|
Syntax |
|
|
Description |
An array of IP addresses and port numbers for this node ID. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
None |
|
Notes |
Internet Protocol version 6 (IPv6) addresses must be
enclosed in square brackets []; for example:
[2001:db8 Use a comma to separate address entries or specify each entry on a separate line. |
|
Example |
|
tables
|
Syntax |
|
|
Description |
An array of tables to action for this node ID. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
Not applicable. |
table
|
Syntax |
|
|
Description |
The name of the table to be used in this operation. |
|
Type |
String |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
|
groups-cover-table-on-scp
|
Syntax |
|
|
Description |
Not applicable. |
|
Type |
Boolean |
|
Optionality |
Optional (default used if not set) |
|
Allowed |
true, false |
|
Default |
false |
|
Notes |
Not applicable. |
|
Example |
|
key-columns
|
Syntax |
|
|
Description |
An array of the table column keys which are to be used for this table and this operation. |
|
Type |
Array |
|
Optionality |
Optional (default used if not set). |
|
Allowed |
Any valid key column name for this table. |
|
Default |
Pre-configured values. |
|
Notes |
Normal replication resyncs are pre-configured and restricted to a maximum of 3 keys. When running from the command line this restriction is lifted. These columns must exist on the remote platform. |
|
Example |
|
other-columns
|
Syntax |
|
|
Description |
An array of the non keyed columns which are to be used for this table and this operation. |
|
Type |
Array |
|
Optionality |
Optional (default used if not set). |
|
Allowed |
Any valid non keyed column name for this table. |
|
Default |
Pre-configured values. |
|
Notes |
For normally replication resyncs these are pre-configured. These columns must exist on the remote platform. |
|
Example |
|
Groups
|
Syntax |
|
|
Description |
An array of groups associated with this operation. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
Not applicable. |
group
|
Syntax |
|
|
Description |
The name associated with a node. |
|
Type |
String |
|
Optionality |
Required |
|
Allowed |
Any character |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
|
table
|
Syntax |
|
|
Description |
The name of the table associated with this group. |
|
Type |
String |
|
Optionality |
Required |
|
Allowed |
Any characters |
|
Default |
none |
|
Notes |
Not applicable. |
|
Example |
|
ranges
|
Syntax |
|
|
Description |
An array specifying the ranges to be associated with this group, table, and for this node. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Not applicable. |
|
Default |
none |
|
Notes |
Although an index to support the ranges specified is not required, it is recommended an index is used for performance reasons. The number of elements in the from and to conditions must be the same and must match tables, key-columns entry for the table specified. |
|
Example |
|
nodes
|
Syntax |
|
|
Description |
The list of nodes to be associated with this group. |
|
Type |
Array |
|
Optionality |
Required |
|
Allowed |
Any nodes defined in Node section. |
|
Default |
none |
|
Notes |
These nodes must have been defined already in the Node section. |
|
Example |
|
Input File Example
This is an example of what the input configuration will look like, the indentation format is for readability.
replication = {
perform = "resync"
report-row-number-limit = 100
produce-final-reports = true
report-directory = "."
report-after = {
count = 10type = "seconds"
}
stop-on-limit = false
}
view = {
nodes = [
{
id = 400
address = [
"127.0.0.1"
]
}
]
tables = [
{
table = "TEST_REP"
groups-cover-table-on-scp = true
key-columns = [
"NUMBER_3"
]
other-columns = [
"VARCHAR_1",
"LONG_RAW_2",
"CHAR_4",
"DATE_5"
]
}
]
groups = [
{
group = "TEST_REP_0"
table = "TEST_REP"
ranges = [
{
from = [
"1"
]
to = [
"2"
]
}
]
nodes = [
400
]
}
]
}smsDumpRepConfig
Purpose
smsDumpRepConfig parses and displays the contents of replication.config. This provides access to the contents of the binary file where the replication configuration data is held.
For more information, see unresolvable-reference.html#GUID-74FDDECE-E835-4B53-BDCF-47A6A630CD73.
Configuration
The smsDumpRepConfig supports the following command-line options.
Usage:
smsDumpRepConfig -f filename [-v]The table below contains the available parameters.
| Parameter | Default | Description |
|---|---|---|
|
|
/IN/service_packages/SMS/etc/replication.config |
Location of the configuration file to be displayed. |
|
|
Not applicable. |
Verbose, displays extra information, including column and field names. |
Failure
If smsDumpRepConfig fails, it will send error messages to stdout and syslog. If an error is displayed while parsing a replication.config file, the file may be corrupted.
Output
smsDumpRepConfig displays output to stdout.
Example:
This text is an example of the output from a simple replication.config file which includes SMS and ACS replication groups between nodes 1 and 301.
smsDumpRepConfig: File /IN/service_packages/SMS/etc/replication.config
smsDumpRepConfig: (PAD = 0)
smsDumpRepConfig: Short listing. Use -v (verbose) for full listing
-------------------------------------------------------------------------------
smsDumpRepConfig: Table, Column, Group definitions...
-------------------------------------------------------------------------------
TABLE [ACS_CALL_PLAN]
TABLE [ACS_CALL_PLAN_PROFILE]
TABLE [ACS_CALL_PLAN_STRUCTURE]
TABLE [ACS_CLI_CALL_PLAN_ACTIVATION]
TABLE [ACS_CUSTOMER]
TABLE [ACS_CUSTOMER_CLI]
TABLE [ACS_CUSTOMER_SN]
TABLE [ACS_FN_TYPE]
TABLE [ACS_GLOBAL_PROFILE]
TABLE [ACS_LANGUAGE]
TABLE [ACS_NETWORK_KEY]
TABLE [ACS_SN_CALL_PLAN_ACTIVATION]
TABLE [SMF_ALARM_MESSAGE]
TABLE [SMF_STATISTICS]
TABLE [SMF_STATISTICS_DEFN]
-------------------------------------------------------------------------------
smsDumpRepConfig: Replication Groups configured for each node...
-------------------------------------------------------------------------------
NODE NUMBER [1] Prim (192.168.0.144) Sec (0.0.0.0)
NODE NUMBER [301] Prim (192.168.0.142) Sec (0.0.0.0)
GROUP [ACS_CUSTOMER] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_FN_TYPE] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_CALL_PLAN_PROFILE] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_CALL_PLAN_STRUCTURE] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_CALL_PLAN] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_CUSTOMER_CLI] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_CUSTOMER_SN] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [SMF_STATISTICS_DEFN] [Prim=-1] Min=('!','!',') Max=('~','~','')
GROUP [ACS_CLI_CALL_PLAN_ACTIVATION] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_GLOBAL_PROFILE] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_LANGUAGE] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_NETWORK_KEY] [Prim=-1] Min=('+0','',') Max=('+9','','')
GROUP [ACS_SN_CALL_PLAN_ACTIVATION] [Prim=-1] Min=('+0','',') Max=('+9','','')Note:
Both nodes are primaries for their groups and have no secondary network address configured.
smsIorDump
Purpose
The smsIorDump utility enables you to display details about the IORs (Interoperable Object References) available to CORBA services. You use smsIorDump to investigate java exceptions related to CORBA.
The smsIorDump utility is located in the following directory:
/IN/service_packages/SMS/bin/
Configuration
The smsIorDump utility supports the following command-line options:
Usage:
smsIorDump [-u user/pw] -i IOR_strWhere:
-
user/pwis the user and password for the database on the SMS -
IOR_stris the IOR whose details you want to display
Fields Displayed by smsIorDump
This table describes the fields that display when you run the smsIorDump utility.
Table 7-11 Fields Displayed by smsIorDump
| Field | Description |
|---|---|
|
NAME |
(Always display) The unique CORBA server label agreed between the server and the client. |
|
CLASS |
(Display if available) Provides version information. |
|
IP |
(Display if available) The IP address that provides a key for distinguishing between multiple servers of the same type. Note that this IP address is not used to locate the server. |
|
IOR |
(Always display) The CORBA Interoperable Object Reference (IOR) that specifies the class of object actually served, and the host and port number of the server. The host and port number define the address that will be used to locate the server at run-time. |
smsLogTest
Purpose
smsLogTest generates an alarm and writes it to the syslog on the local machine. You can configure the alarm details.
Configuration
smsLogTest supports the following command-line options:
Usage:
./smsLogTest name severity message [copies] [alarm_type_id]The table below shows the available parameters.
Table 7-12 Configuration Parameters for smsLogTest
| Parameter | Default | Description |
|---|---|---|
|
|
none |
The subsystem name/identifier. (Required.) |
|
|
none |
The severity value. (Required.) Allowed values: N or 0 [Notice] W or 1 [Warning] E or 2 [Error] C or 3 [Critical] - or 4 [clear] |
|
|
none |
The message to log. (Required.) |
|
|
1 |
Number of times to generate the alarm. (Optional.) Allowed values: integer |
|
|
none |
Optional Alarm Type ID associated with the message. This must be up to a 9-digit number between braces (for example, {123456789}) |
Examples:
./smsLogTest smsAlarmRelay %d \"Failed to connect to Oracle\" 4\n {123456789}
./smsLogTest smsMaster %d \"Startup Successful\"smsManualRequester
Configuration
smsManualRequester supports the following command-line options.
Usage:
smsManualRequester [-nodeid value]The table below shows the available parameters.
Table 7-13 Configuration Parameters for smsManualRequester
| Parameter | Default | Description |
|---|---|---|
value |
Not applicable. |
The ID of the node (Optional) |
Output
smsManualRequester displays the output to local terminal.
Examples:
./smsManualRequester -nodeid 999
Nov 22 22:01:48 smsManualRequester(6578) NOTICE: Update Requester
`./smsManualRequester' process registered (node 999)
Enter table name (start with `-' to indicate delete)
?-to set info return:-ACS_CUSTOMER
Enter key names (key1,key2...):id
Enter values for keys & columns(terminate with ##):29
Enter values for keys & columns(terminate with ##):##
initialiseNode: Reading '/IN/service_packages/SMS/etc/replication.def'
initialiseNode: heartbeatPeriod 20
initialiseNode: heartbeatTimeout 20
initialiseNode: connectionTimeout 2
initialiseNode: masterPortNum 12343
initialiseNode: queueWarnThresh 5
initialiseNode: queueErrThresh 100000
initialiseNode: queueCritThresh 1000000
initialiseNode: hBTolerance 10.0
initialiseNode: commitIdleTime 0.100000
initialiseNode: commitBusyTime 10.0
initialiseNode: tcpAbortSecs 20
initialiseNode: oracleUserPass '/'
initialiseNode: reportDir '/IN/service_packages/SMS/tmp/'
initialiseNode: statusFile '/IN/html/status.html'
initialiseNode: configFilePath '/IN/service_packages/SMS/etc/replication.config'
initialiseNode: configFileName 'replication.config'
initialiseNode: node number 999
initialiseNode: node type 3
initialiseNode: s side updates 1
Nov 22 22:02:17 smsManualRequester(6578) NOTICE: Reached master node 1 at `192.168.0.198'
Enter table name (start with `-' to indicate delete)
?-to set info return:
.....smsProcessCdr
Purpose
smsProcessCdr processes EDRs based on the rules set in a format file. The format file describes the fields, literal strings and functions to apply to the input data in order to produce the desired output EDR.
Functions include:
-
Field selection
-
Reordering
-
Delimiter specification
-
String concatenation with static strings and field values (such as would be required for field #13 in the EDR SRS)
-
Multi-level pattern matching (as would be required for field #1) conditional field selection (as would be required for field #11)
This process is typically used to perform the following tasks for EDR files and ACS PIN log files:
-
(Optional) format conversion on files.
-
Move of files to a medium-term archive area.
-
(Optional) copy of files to directory for external retrieval.
-
Cleanup of expired files from the archive area.
Specification and implementation of EDR processing requirements is typically a system integration task which is performed prior to final system acceptance. This is usually implemented by the shell script smsCdrProcess.sh.
To prevent the EDR from being processed, see Configuring smsCdrProcess.sh (on page 140).
Configuration
smsProcessCdr accepts the following command line parameters.
Usage:
smsProcessCdr [-t edr_format] -d in_dir -D out_dir [-s in_suffix] [-p in_prefix] [-S out_suffix] [-P out_prefix] [-u usr/pwd] [-l tz] [-h] -bThe table below shows the available parameters.
Table 7-14 Configuration Parameters for smsProcessCdr
| Parameter | Default | Description |
|---|---|---|
|
|
none |
The filename of the EDR format file. Note: No format conversion is performed by default. The formatting file supports the following:
|
|
|
none |
The directory to read EDRs from. |
|
|
none |
The directory to write processed EDRs to. |
|
|
none |
The suffix that input EDR files must match (these are stripped from the output file name). |
|
|
none |
The prefix that input EDR files must match (these are stripped from the output file name). |
|
|
none |
The suffix to add to output EDR files. |
|
|
none |
The prefix to add to output EDR files. |
|
|
/ |
The Oracle user and password to use. Note: smsProcessCdr will only attempt to connect to the database if the EDR format file contains functions that require it. |
|
|
none |
Alternate timezone TCS and TCE EDR fields are converted to. |
|
|
none |
Displays a help page. |
|
|
none |
Allows blank header tag values. Treats non-existent header tags as blank value. |
Example 1
The following command would:
- Use /IN/service_packages/SMS/bin/cdrFormat.fmt as theEDR format file
- Process every file matching the pattern /IN/service_packages/SMS/cdr/received/scp2_acs*.cdr
smsProcessCdr –t /IN/service_packages/SMS/bin/cdrFormat.fmt –d /IN/service_packages/SMS/cdr/received -D /tmp/processedCdrs -p scp2_acs -s .cdr -P ACS_ -S .out -u smf/smfThe output file name is a transformation of the input file name. For example, with the parameters supplied above, an input file /IN/service_packages/SMS/cdr/received/scp2_acs20010831120012.cdr would have output file named /tmp/processedCdrs/ACS_20010831120012.out.
Example 2
The following command:
smsProcessCdr –t /IN/service_packages/SMS/bin/mobifone.fmt –d /IN/service_packages/SMS/cdr/received -D /tmp/processedCdrs -p scp2_acs -s .cdr -P ACS_ -S .out -u smf/smfWould cause the following file to be parsed as the EDR format file /IN/service_packages/SMS/bin/mobifone.fmt.
After parsing is complete, the binary will process its input files. With the parameters supplied above, this would be every file matching the pattern:
/IN/service_packages/SMS/cdr/received/scp2_acs*.cdr
When an input EDR is successfully processed, it is written out to an output EDR file. One output EDR file is created for each input EDR file. The output file name is a transformation of the input file name.
The input file /IN/service_packages/SMS/cdr/received/scp2_acs20010831120012.cdr would produce the following output file /tmp/processedCdrs/ACS_20010831120012.out.
Format File Configuration
A EDR format file consists of field specifiers which translate input data to an output format.
The valid field specifiers are:
-
Header tags
-
Standard fields
-
Special fields
-
Strings
-
Functions
-
Format characters
Header Tags
A HEADER tag may be specified in the format file passed in providing a single header line at the top of processed output files.
The header appears once and contains all HEADER tag values concatenated and space separated.
Through the use of a -b option passed in to smsProcessCdr at runtime
blank values are allowed. When any tags are missing their respective value will be set
blank rather than exiting on error. Underscores are allowed by default with no extra
settings.
Standard Fields
Standard fields are fields which relate to tags in the input EDR.
ACS EDRs have the following format:
APPLICATION|tag1=value1|tag2=value2| . . . |tagn=valuenA standard field is any one of the tag values.
If a EDR File format contains a field tag, then the corresponding value from the input EDR, value, will be written to the output EDR. Standard tags are written into the EDR format file using the same text which is used to specify them in the input EDR.
Special Fields
Special fields are for data extracted from a EDR which does not occur in the input as a tag=value pair.
The only example of this is the EDR application name field, which always occurs as the first element in a EDR.
Placing the field <APPLICATION> in the EDR format file will cause the
application name from the input EDR to be written to the output EDR.
Strings
Strings are used to write literal text to the output EDR.
Strings appear in the EDR format file as double quoted strings "data".
Any characters occurring in data are written, verbatim, to the output EDR file. This can be used to supply field delimiters (for example: “,”) or to hard code output values (for example: “0,2,-1,”).
Functions
Functions are programmatic transformations that can be applied to values.
Functions occur in the DR format file with the form:
function_name ( function_parameters )Functions always produce a textual output.
The format of the functions used in smsProcessCdr are the same or similar to those used in the LISP programming language.
Most functions will support expressions as parameters so long as they produce textual output. The following types are included:
-
Standard fields
-
Special fields
-
Strings
-
Functions
Boolean Expressions
Boolean expressions are used as parameters to COND functions (and could be used as parameters to other functions at a later date).
Boolean functions are functions which evaluate to either TRUE or FALSE. The compiler will not allow Boolean functions to be used as ‘top level’ functions, but they may be nested in other functions to provide the ability to test conditions.
EQUALS Function
The EQUALS function compares two expressions for equality. EQUALS evaluates to TRUE if the expressions are equivalent. Otherwise it evaluates to FALSE. The equality test is a case-sensitive string comparison.
EQUALS ( expr1 ,expr2 )Example: This example shows the EQUALS function being used as part of a COND function. EQUALS is used to check whether the application name is “ACS”.
COND ( ( EQUALS ( APPLICATION, “ACS” ) , “ACS Service” ) , ( TRUE , “Unknown Service” ) )PREFIX Function
The PREFIX function evaluates to TRUE if expr2 is a prefix of expr1. Otherwise, it evaluates to FALSE.
PREFIX ( expr1 , expr2 )Example: This example shows the PREFIX function being used as part of a COND function. PREFIX is used to check whether the service number (SN) in the input EDR starts with either the digits 0800 or 0900.
COND ( ( PREFIX ( SN , “0800” ) , “Freephone” ) , ( PREFIX ( SN , “0900” ) , “Pay Service” ) , ( TRUE , “Unknown Service” ) )CONCAT Function
The CONCAT function concatenates one or more expressions.
CONCAT ( expr1 [ , expr2 , expr3 . . . exprn ] )Example: This example concatenates the literal string T0 onto the value of the special field, APPLICATION. Therefore, if APPLICATION evaluates to CCS then the example would produce the output: T0CCS.
CONCAT ( “T0” , APPLICATION )Example: This example shows literal strings being concatenated to a field value and the result of another expression. If the value of the field XYZ is 21 and CCET is 12.32 then the result of the example would be: ABC2112.
CONCAT ( “ABC” , XYZ , ROUND ( CCET ) )COND Function
The COND function evaluates to an expression on the basis of a series of one or more test Boolean expressions.
The first Boolean expression which evaluates to TRUE causes its associated result expression to be evaluated as the result of the COND function. If none of the Boolean expressions evaluates to TRUE then the result of the COND function is an empty string.
COND ( ( bexpr1 , expr1 ) [ , ( bexpr2 , expr2 ) . . . , ( bexprn , exprn ) ] )Examples:
In either of these two examples, the function evaluates to:
-
Pizza Shed if the service number is 0800101101
-
Pay Service if the service number starts with 0900
-
Unknown in all other cases
COND ( ( EQUALS ( SN , “0800101101” ) , “Pizza Shed” ) , ( TRUE , ( COND ( ( PREFIX ( SN , “0900” ) , “Pay Service” ) , ( TRUE , “Unknown” )
COND ( ( EQUALS ( SN , “0800101101” ) , “Pizza Shed” ) , ( PREFIX ( SN , “0900” ) , “Pay Service” ) , ( TRUE , “Unknown” ) )For more examples, see the examples for PREFIX and EQUALS.
LANGUAGEID Function
The LANGUAGEID function evaluates to the ID of a named language (from the ACS_SE_LANGUAGE table). The language name check is case insensitive.
If the named language can not be found, LANGUAGEID evaluates to –1.
LANGUAGEID ( "string" )Note:
Using the LANGUAGEID function requires a connection to the database, which requires setting the oracle user / password option when invoking smsProcessCdr (unless the default “/” will suffice).
Example: This example checks the language ID from the input EDR (the LGID field). If the LGID is the same as the ID for the language English, then the expression evaluates to 1. If it is French, it evaluates to 2, if it is German, it evaluates to 3.
COND ( ( EQUALS ( LANGUAGEID ( “English” , LGID ) ) , “1” ) , ( EQUALS ( LANGUAGEID ( “French” , LGID ) ) , “2” ) , ( EQUALS ( LANGUAGEID ( “German” , LGID ) ) , “3” ) )ROUND Function
The ROUND function interprets the supplied expression as a floating point number and replaces it with the same value rounded to the nearest integer. ROUND also works for negative numbers (using the minus symbol). If the supplied expression cannot be interpreted as a floating point number, then ROUND will evaluate to 0.
ROUND ( expr )Examples:
This example evaluates to 2.
ROUND ( “2.1” )This example evaluates to 3.
ROUND ( “2.6” )If CCET evaluates to 12.3, this example evaluates to 12.
ROUND ( CCET )SUBSTR Function
The SUBSTR function extracts a substring from a given expression. The parameters:
- expr is the source expression
- start is an integer indicating where the substring should start (counting starts at zero)
- length is an integer indicating how many characters should be read.
If start is greater than the length of expr, then SUBSTR returns an empty string. If the specified start and length would cause SUBSTR to read off the end of the input expression, then SUBSTR returns the maximum number of characters it could read.
SUBSTR ( expr , start , length )Examples:
This example evaluates to "the".
SUBSTR ( "the happy elephant" , 0, 3 )This example evaluates to "e ha".
SUBSTR ( "the happy elephant" , 2, 4 )This example evaluates to an empty string.
SUBSTR ( "the happy elephant" , 50, 4 )This example evaluates to "appy elephant".
SUBSTR ( "the happy elephant" , 5, 40 )Format Characters
The format characters are a subset of the ASCII escape characters which allow special characters to be inserted into the output file. This table describes the supported format characters.
Table 7-15 Definitions of Format Characters
| Format Character | Definition |
|---|---|
|
|
New line |
|
|
Carriage return |
|
|
Tab |
|
|
Null |
File Format Example 1
A simple example which just picks up the application name, service number, CLI.
Fields are comma delimited, records are terminated with a newline character (\n).
Format File:
<APPLICATION> "," SN "," CLI \nInput CDR file contents:
ACS|SN=0800101101|CLI=044784333|XYZ=123
ACS|SN=0900222333|CLI=044784333|XYZ=123
ACS|SN=|CLI=044784333|XYZ=123Output file contents:
ACS,0800101101,044784333
ACS,0900222333,044784333
ACS,,044784333File Format Example 2
A more complicated example using comments, special fields, and a function.
Fields are space delimited, records are terminated with a newline and a carriage return character.
Format File:
// our CDR format file
APPLICATION " "
// fields 2 and 3 are hard coded to be zero
"0 0 "
ROUND ( CCET ) " "
COND ( (EQUALS(APPLICATION, "CCS"), CONCAT("00", CA)), (TRUE, CONCAT("00", TN)) )
// end of line indicator:
\n \rInput CDR file contents:
CCS|XYZ=123|CCET=0.2|TN=123123|CA=321321|ABC=333
ACS|XYZ=123|CCET=8.8|TN=123123|CA=321321|ABC=333
VPN|XYZ=123|CCET=-1.6|TN=123123|CA=321321|ABC=333
CCS|XYZ=123|CCET=BOB|TN=123123|CA=321321|ABC=333Output file contents:
CCS 0 0 0 00321321
ACS 0 0 9 00123123
VPN 0 0 –2 00123123
CCS 0 0 0 00321321File Format Example 3
Another complicated example using a header, comments, special fields, and a function.
Fields are space delimited, records are terminated with a newline and a carriage return character.
Format file:
HEADER ( "ONE TWO" )
//ROUND ( "6.1" )
<APPLICATION> " "
ROUND ( CCET ) " "HEADER ( "THREE" )
COND ( (EQUALS(<APPLICATION>, "CCS"), CONCAT("00", CA)),
(TRUE,CONCAT("00", TN)) )
// end of line indicator:
\n \rInput CDR file contents:
CCS|XYZ=123|CCET=0.2|TN=123123|CA=321321|ABC=333
ACS|XYZ=123|CCET=8.8|TN=123123|CA=321321|ABC=333
VPN|XYZ=123|CCET=-1.6|TN=123123|CA=321321|ABC=333CCS|XYZ=123|
CCET=BOB|TN=123123|CA=321321|ABC=333Output file:
ONE TWO THREE
CCS 0 00321321
ACS 9 00123123
VPN -2 00123123
CCS 0 00321321Further Information
Because of the wide range of external EDR processing systems and site-specific requirements, it is not feasible in this document to describe all of the tasks which may be required to complete EDR integration.
For more information about this process, contact Level 1 support with details.
smsRecordStatistic
Purpose
This tool makes use of the SMS statistics subsystem, which in turn makes use of shared memory for communicating with the smsStatsDaemon. The smsStatsDaemon must be installed and running.
Location
The smsRecordStatistic process is located on the SLC in the ./IN/service_packages/SMS/bin directory.
Configuration
smsRecordStatistic supports the following command-line options:
Usage:
smsRecordStatistic [application] [statistic] [value]The table below has the available parameters.
Table 7-16 Configuration Parameters for smsRecordStatistic
| Parameter | Description |
|---|---|
application |
The name of the application for the statistic. (Optional) |
statistic |
The name of the statistic to record. (Optional) |
value |
Adds the given delta value to the statistic. (Optional.) |
smsStatsQuery
About smsStatsQuery
The smsStatsQuery utility enables you to directly query statistics generated on the Voucher and Wallet Server (VWS) and Service Logic Controller (SLC) before the statistics are replicated to the Service Management System (SMS). You use this utility for system monitoring.
Tip:
You can view statistics that have been replicated to the SMS node by using the statistical viewing feature in the SMS user interface (UI). For more information, see Service Management System User's Guide.
The smsStatsQuery utility is located in the following directories:
- /IN/service_packages/BE/bin on the VWS nodes.
- /IN/service_packages/SMS/bin on the SLC nodes.
You can either supply a single query string as input to smsStatsQuery, or you can supply a text file containing a list of query strings as input.
Usage:
smsStatsQuery [options] "stats_query"
smsStatsQuery [options] -f "queryfile"where:
-
optionsis a space-separated list of optional parameters. The available options include options for the standard bc (binary calculator) utility, that is accessed by smsStatsQuery to apply calculations to the statistics results.The optional parameters and some typical bc options that you might want to set are listed in the Optional Parameters Table below.
Note:
You can display a full list of bc options by entering man bc at the UNIX prompt.
-
stats_queryis a string that identifies the statistics to query. To retrieve multiple statistics, specify a space-separated list of the statistics you want in the query string.You can also include a mathematical formula in the query to perform calculations on the retrieved statistics and return a single value.
See Specifying the Statistics to Query for information about specifying the stats_query string.
queryfileis the name of a text file that contains a list ofstats_querystrings.
Note:
Specify either stats_query or
queryfile, but not both.
Examples
In the following examples, the statistics to query are specified in a query string:
./smsStatsQuery "Acs_Service.elapsedTime"
./smsStatsQuery "Acs_Service.CALLS_INITIATED
Acs_Service.ANNOUNCEMENTS_PLAYED"
In the following example, the statistics to query are specified in a text file:
./smsStatsQuery -f "queryFile.txt"
Note:
./smsStatsQuery -lFor more
information about smsStatsDaemon, see smsStatsDaemon.
Specifying the Statistics to Query
To specify one or more statistics in the stats_query string, use the following syntax:
application.statistic[.detail] [application.statistic[.detail]]Where:
applicationis the name of the application or service that generated the statistic, such as Acs_Service.statisticis the name of the statistic to query, such aselapsedTime.detail(optional field) is the name of a detail field associated with the specified statistic.Note:
Not all statistics have detail fields.
For example, the following queries retrieve statistics for the ACS service:
./smsStatsQuery "Acs_Service.elapsedTime"
./smsStatsQuery "Acs_Service.CALLS_INITIATED
Acs_Service.ANNOUNCEMENTS_PLAYED"
To query a statistic that contains a space in any of its attribute names, you must use
double square brackets, "[[" and "]]", to enclose the statistic specification in the
stats_query string.
For example, the following queries include the "PrePaid Success" statistic in the
stats_query string:
./smsStatsQuery "[[Ccs_Service.PrePaid Success]]"
./smsStatsQuery "Acs_Service.CALLS_INITIATED [[Ccs_Service.PrePaid Success]] Acs_Service.ANNOUNCEMENTS_PLAYED"To specify a formula in the stats_query string, use the following
syntax:
[factor]statistic[[factor][statistic]]
Where:
factoris a combination of a constant and an operator, or just an operator, that is applied to the statistic.statisticis a statistic specified as:application.statistic.detail.
For example:
./smsStatsQuery "10*Acs_Service.ANNOUNCEMENTS_PLAYED/Acs_Service.CALLS_INITIATED"Note:
You may not retrieve a list of statistics if you include a formula in the stats_query string.
Optional Parameters Table
This table describes the optional parameters for smsStatsQuery.
| Parameter | Description |
|---|---|
-h |
Lists usage information for the smsStatsQuery utility. |
-l |
Lists the contents of statistics currently held by smsStatsDaemon. |
-t secs |
(bc option) Calculates the average rate a statistic is used based on
two readings of the statistic, where the second reading is taken
secs seconds after the first reading. The formula used to calculate
the average rate a statistic is used is: (value of reading 2 - value
of reading 1)/ |
-p precision |
(bc option) Specifies the number of decimal places to display for the statistics value output. |
-w |
Warn if the statistics values are saturated. |
-c |
Correct the saturated statistics values. |
-r |
Reset saturated statistics values. |
startMerge
Purpose
This command initiates a master merge of an inferior master to a superior one. It can also be used to safely shut down an superior master by merging it with an inferior master.
Configuration
The startMerge supports the following command-line options:
Usage:
startMerge [-from nodenum] [-to nodenum]
Table 7-17 Configuration Parameters for startMerge
| Parameter | Default | Description |
|---|---|---|
-from nodenum |
none |
Node number of the inferior master to merge from. |
-to nodenum |
none |
Node number of the inferior master to merge to. |