A asap_utils

This section explains the asap_utils functions. Because this is a UNIX and Linux program you can add or remove functions.

To invoke asap_utils:

  1. Type the following at the $ASAP_base prompt:

    asap_utils [-P ctrl_password] [option]
    

    where:

    • [-P ctrl_password] is the password for the control database.

    • [option] is the asap_utils option you want to invoke. For example, for the Resend Completed ASDLs option, you would type 11.

Note:

If any asap_utils command fails, diagnostic information can be found in the ASAP_home/DATA/logs/yyyymmdd/UTILITY.diag (where yyymmmdd is the year, month, and date of the logs) for the current date when the command was executed. For more information about diagnostic files, see ASAP System Administrator's Guide.

asap_utils Functions

This section describes each of the asap_utils functions.

SARM Utilities

1. Service Requests in DB

This lists the SRQs currently resident in the ASAP database. It details the order ID, status, priority, due date, parent order, batch group, etc.

2. In Proc Requests Summary

This lists the number of requests currently in progress in the ASAP database (this is determined to be orders in a Loading or In Progress state).

3. In Proc Requests Details

This lists details of any work orders currently in progress within the SARM.

4. Work Order Queue Summary

This details the number of orders in each of the SARM order queues and includes:

  • Ready Queue – Orders currently in progress.

  • Rollback Queue – Orders currently being rolled back.

  • Auto Held Queue – Orders that are being held by the SARM and not released for some reason.

5. Work Order Queue Details

This provides the order details of each order in the SARM work order queues. Such queues are global to the SARM.

6. Work Order Lock States

This lists the orders in progress and their respective lock states. Generally, an in progress order will have a local lock. Only in the high availability configuration will orders be remotely locked.

7. ASDL/NE Queue Summary

This is one of the most commonly used utilities. It provides summary details about each NE in the system including:

  • NE, technology and software load

  • NEP managing the NE

  • Current state of the NE Down, Connecting, Available, Maintenance, Disabled

  • Whether the thoughput of the NE is throttled to the configured throughput value

  • The configured throughput value

  • Time estimate (sec.) for ASDL processing to that NE

  • Number of ASDLs pending to that NE (in a prioritized queue)

  • Number of ASDLs currently in progress, the number of connections open to that NE

  • The number of ASDLs waiting to be retried to that NE.

8. ASDL/NE Queue Details

This provides details about each ASDL in the Pending, In Progress and Retry ASDL queues for each NE in the system.

9. HA Summary/Details

This option provides both a detailed and summary view of the ASAP high availability operation.

The ASAP configuration parameter, ASAP_HIGH_AVAIL, must be set for these RPCs to be installed; that is, the ASAP territory must be in HA mode.

10. Enable/Disable Entire NE

This utility facilitates the enabling/disabling of an entire NE from the SARM perspective. If a NE is disabled, then the SARM will hold all ASDLs queued to that NE in the ASDL pending queue for that NE.

In general, a NE is disabled for administrative purposes. It must be manually enabled for ASDLs to be transmitted to the NEP managing the NE. The current status of a NE may be viewed using the 30. List Device States option.

11. Resend Completed ASDLs

This option allows you to resend recent changes/completed ASDL commands, to an NE. This allows ASAP to provide some basic retransmission logic to re-provision completed ASDLs to a particular NE. It is intended for use in situations in which a NE has been recovered to a known state and ASAP is requested to re-input all successful commands to the NE from that known state onwards.

The arguments for this option include the target NE, the start and end dates/times. This option returns the number of the work order created within SARM, and resends all ASDLs in their original provisioning sequence.

12. List NEs over Err Thresh

This option allows you to view any NE/ASDL combinations that have been automatically disabled after the consecutive error threshold for that NE/ASDL was exceeded. The error threshold for a NE and ASDL combination may be specified in the ASAP error threshold database table.

The state of a NE as displayed by the 30. List Device States option may be available even though there may be several ASDLs that have been logically disabled to that NE by means of this facility.

13. Enable NE/ASDL over Thresh

This option allows you to logically enable NE/ASDL combinations that were logically disabled by the error threshold mechanism.

18. Set NE instance throughput

This option allows you to set the NE instance throughput value, which controls the minimum time in milliseconds an ASDL/transaction takes on an NE. A value of 0 disables NE instance throughput.

Admin Server Utilities

20. WO Stats

This option presents pseudo real time statistical information relating to SARM work order processing.

21. CSDL Stats

This option presents pseudo real time statistical information relating to SARM CSDL processing.

22. ASDL Stats

This option presents pseudo real time statistical information relating to SARM ASDL processing.

23. NE Stats

This option presents pseudo real time statistical information relating to SARM NE processing.

24. NE/ASDL Stats

This option presents pseudo real time statistical information relating to SARM NE/ASDL processing.

In particular, this provides information about the ASDL user exit codes from the NEP state tables and facilitates statistical collection of types of soft errors, hard errors, etc.

NEP Utilities

30. List Device States

This option details the state of each communication device in the selected NEP.

It includes the following:

  • resource pool to which the device belongs

  • device type (for example, T – Telnet device)

  • device status (Enabled/Disabled)

  • bind status of the device (Free/Bound to a NE)

  • host NE to which the device last communicated

31. Enable/Disable NE Devices

This option allows you to enable/disable specific communication devices in the NEP used to communicate with external NEs.

There is also an ASAP automatic device re-enabling facility that automatically re-enables a disabled device after a specific period of time.

32. Enable/Disable Screen Diags

This option allows you to capture the return data stream from a terminal emulation session such as a Telnet session and append the output to a UNIX file.

You may then ”tail -f” the file to see the ASAP interaction with the terminal session in real time.

This may only be used in terminal emulation sessions, not message based sessions.

If you provide only a file name for the log file, the log file will be stored in the default directory for line/screen diagnostics – $LOGDIR/ne_logs. If you provide a full path with file name, the log file will be stored at the location you specified.

$LOGDIR/ne_logs is the default directory for line/screen diagnostic files. However, if you specify a file path, such as './dms_log' or '../dms_log1', the dms_log will be created under $LOGDIR/ne_logs, and dms_log1 will be created in the $LOGDIR.

33. Enable/Disable NE Line Diags

This option allows you to capture all data passing on the communication ”line” between the NEP and the NE while provisioning the NE. It is sometimes useful for diagnosing specific character sequences.

If you provide only a file name for the log file, the log file will be stored in the default directory for line/screen diagnostics – $LOGDIR/ne_logs. If you provide a full path with file name, the log file will be stored in the location you specified.

$LOGDIR/ne_logs is the default directory for line/screen diagnostic files. However, if you specify a file path, such as './dms_log' or '../dms_log1', the dms_log will be created under $LOGDIR/ne_logs, and dms_log1 will be created in the $LOGDIR.

34. Capture NE VS Screen to File

This option allows you to capture a snapshot of a terminal session screen to a file for review. This option is only available for state table based cartridges.

35. Enable/Disable EDD Diags

This option controls a series of external device driver diagnostic capabilities including the following:

  • start_dump – Starts logging of all communication for this generic device

  • stop_dump – Stops logging of all communication for this generic device

  • dump_info – Prints information about the EDD devices to the specified file

  • start_dump_all – Starts communication logging for all generic devices

  • stop_dump_all – Stop communication logging for all generic devices

36. List NE Loopback Information

Using this option, all the network elements configured within an NEP server can be listed:

Specify NEP: [NEP_HT9]
Host NE   NE loop back
-------------------------------------------------------------- 
ROME        OFF [from NE config]
BEIJING     ON  [Global]
TORONTO     OFF [from NE config]
DYN_DALLAS  OFF [from NE config] [Dynamic Template]

As shown above, for dynamic NE configurations, only the dynamic template is listed. (When changing the loopback state for dynamic NE configurations, only the template is modified as the template represents a group of dynamic network elements.)

In the list above:

  • OFF – Network element loopback is set to OFF

  • ON – Network element loopback is set to ON

  • Global – The Network element loopback setting is taken from the global loopback parameter (i.e. LOOPBACK_ON parameter in the ASAP.cfg file). The value OFF is used if the global loopback parameter LOOPBACK_ON is not specified in the ASAP.cfg file.

  • [from NE config] – The network element loopback state is configured to be either ON or OFF independently of the value of the global loopback parameter LOOPBACK_ON.

  • [Dynamic Template] – The network element is a template for dynamic network elements.

37. Set NE Loopback

Use this option to set the loopback state of network elements to ON, OFF or Global.

When you use this option, you are first notified with the following prompt:

Before changing the loopback state of an NE, it is suggested to disable the NE.
Would you like to continue ('Y') or not ('N')? [N] Y

The loopback state of a network element can be turned ON or OFF or set to Global at any time without having to stop and restart the ASAP Server. However, once a specific connection is established, its loopback state will be preserved. In order for the new loopback state to be used, the connection must be released and re-established. Any new connections will employ the updated loopback configuration for that network element.

Loopback parameters:

  • OFF – Set the Network element loopback to OFF

  • ON – Set Network element loopback to ON

  • Global – The Network element loopback setting is taken from the global loopback parameter (i.e. LOOPBACK_ON parameter in the ASAP.cfg file). The value OFF is used if the global loopback parameter LOOPBACK_ON is not specified in the ASAP.cfg file.

When changing the loopback state for dynamic NE configurations, only the template is modified as the template represents a group of dynamic network elements.

The '%' can be used as a wildcard. Alone, it denotes all network elements (%). It can also denote a group of network elements (e.g. A%, AA%, AB%, ABC%).

Execution example:

Before changing the loopback state of an NE, it is suggested to disable the NE.
Would you like to continue ('Y') or not ('N')? [N] Y
Specify NEP: [NEP_HT9]
Specify NE name: [BEIJING] T%
Specify NE loopback operation: ON ('Y') or OFF ('N') or Global('G'): [G] Y

In state table programming, the network element state can be checked by referring to the value of the LOOPBACK_ON parameter as shown in the following state table fragment:

100     IF_THEN         '%LOOPBACK_ON == 0'
110         LOG         'NE is ALIVE (NO loopback)'
120         SEND        'ls -l /tmp'
130         SENDKEY     'ENT'                           3
140         ASDL_EXIT   'SUCCEED:Successful Non Loopback State Table'
150     ENDIF           ''
160    LOG         'NE is in LOOPBACK mode....'

In Java classes of the Java-enabled NEP server, the loopback state can be checked by inspecting the value of the LOOPBACK_ON parameter passed from the NEP server to the JNEP server (Java interpreter) during connection time as a connection parameter or as an order parameter at the beginning of ASDL execution. For example:

>> 193902.659:Connection handler srvtodev07-58877:LOW :com.mslv.activation.jinterpreter.JInterpConnection:

Communication Parameters passed:

DEVICE = JTEL#1
LOOPBACK_ON = 1
...
>> 193902.659:Connection handler srvtodev07-58877:LOW :com.mslv.activation.jinterpreter.ClassManager:
...
Received invocation request for telnet_demo.TelnetProcessor.prov
>> 193902.804:Connection handler srvtodev07-58877:LOW :com.mslv.activation.jinterpreter.JInterpConnection:

Communication Parameters passed:

HOST_IPADDR = 127.0.0.1
HOST_NAME = localhost
HOST_PASSWORD = desert1
HOST_USERID = sunen808
LOGIN_PROMPT = login:
OPEN_TIMEOUT = 5
PASSWORD_PROMPT = Password:
PORT = 23
PROMPT = $
READ_TIMEOUT = 5
VSTYPE = vt100
VS_LENGTH = 24
VS_WIDTH = 80
WRITE_TIMEOUT = 5

Order Parameters passed:

ACT_FUNC_SEC = 0
ASDL_CMD = ASDL_TELNET
ASDL_UNID = 6
CSDL_CMD = CSDL_TELNET
CSDL_SEQ_NO = 5
DEVICE = JTEL#1
DIAL_NO =
HOSTCLLI = TEL_HOST
IS_ROLLBACK = NO
LOOPBACK_ON = 1
...

60. Clear Alarms

This option allows you to enter an alarm code and a number of hours as parameters. Alarms matching the alarm code that are older than the number of hours specified are cleared.

Use "%" as a parameter to clear all alarms.

Technical Utilities

The following options are not applicable for the C++ SRP servers.

100. View Server Thread Listing

This option displays details of all threads within the application server including:

  • Thread ID (spid) and status

  • Login name and hostname of incoming connection threads

  • Thread name (cmd)

101. View Server Memory Statistics

This option provides statistics about the internal server memory management subsystem including the following:

  • Memory blocks available

  • Block sizes

  • Number of such memory blocks currently in use

  • High water mark of the memory block usage

These statistics only refer to use of the ASC memory management routines.

102. View Server Memory Usage

This option provides detailed memory usage statistics for the ASC memory management routines. The output of this RPC is appended to the application diagnostic file.

The configuration parameter, MEMORY_LOGGING, must be >= 1 for this RPC to be installed.

Note:

In production systems, this configuration parameter should not be set as it imposes a minor performance overhead.

103. Flush State Table Cache

This option will request the target application to flush its memory cache of state tables. This is usually performed to ensure that updated copies of state tables in the database are read into the cache when next executed. This allows dynamic loading of updated state tables.

104. View Server Thread Status

This option displays details about internal application threads. This includes the following:

  • Start time of each thread

  • Number of thread context switches since thread startup

  • CPU time used by each thread

  • If applicable, thread message queue details for each thread

105. View Server Thread Sleep Status

This options details the sleep and alarm requests currently being managed by the API including the following:

  • Time to wake up

  • Request type (Sleep, Alarm, or Poll)

  • Thread queue name and ID to which alarm notifications are to be sent

  • Socket file descriptor to which a message is to be written if the request is a poll request

106. Initiate Server DB Admin Proc

This option will initiate the database administration procedures to the primary database of the selected server. This routine performs the following steps:

  • Invokes the DB Admin stored procedure, if defined

  • Updates all database statistics on user-defined entities in this database

  • Recompiles all SQL entities in the database to ensure they are optimized

This capability is only enabled if the DB_ADMIN_ON configuration parameter is set. In addition, the behavior of this option is controlled by several configuration parameters including DB_ADMIN_TIME, DB_ADMIN_PROC and DB_ADMIN_PROC_PARAM.

107. Change Server Diag Level

This option allows you to dynamically change the diagnostic level of an application server when it is running. For more information on diagnostic levels, see ASAP System Administrator's Guide.

This change only has effect as long as the server is running. Upon restart, it assumes the diagnostic level specified in the database configuration.

The System monitoring tool is not available to C++ SRPs.

108. Change Server Diag Line Flush

This option allows you to specify whether or not each diagnostic message written to the diagnostic file should be physically flushed to disk after each write.

In production systems, diagnostics must not be explicitly flushed after each write as it imposes a performance overhead.

109. Real-time System Monitoring

The ASAP Utility Script (asap_utils) is a menu that provides access from UNIX to a set of monitoring utilities for ASAP. You can access sysmon through the Real-time System Monitoring option (109) of the asap_utils menu. You can also monitor multiple servers at the same time by selecting the Real-time System Monitoring option (109) again. Once the data collection time period has passed, sysmon output files will be created in the ASAP systems diagnostic file directory.

Note:

Option 101, View Server Msg Queue Statistics, available in previous versions of ASAP, as well as the configuration parameter DIAG_MSGQUEUES and the RPC diag_msgqueues, have been replaced by the functionality available from option 109, Real-time System Monitoring.

The system monitoring tool is not available to C++ SRPs.

Sysmon defaults to monitoring the SARM for 300 seconds. If you want to monitor a different ASAP component or change the length of the monitoring time, you can change the defaults.

----------------------
Tuning - Message Queue
----------------------
Description            Count   Total    Min   Max    Average  Mean   Deviation
------------           ------  ------   ----  -----  -------  -----  ----------
ASDL Provision Queue 
message read wait time 1056   5995.5     0.9  62.2     5.7    15.1     10.2
messages sent (count)  1056
queue idle-time (ms)   1056   5971905.0  0.0  114374.2 5655.2 23775.0  19062.4
queue size (count)     1056   0.0        0.0  0.0      0.0    0.0 0.0
... 

Group Manager Msg Q
message read wait time 2469   38896.8    2.5  290.5    15.8   61.5     48.0
messages sent (count)  2469
queue idle-time (ms)   2469   18707440.6 0.0  71880.3  7576.9 18294.2  119980.0
queue size (count)     2469   27184.0    0.0  27.1     7.2    1.5      4.5
... 

For more information, refer to System monitoring output files, below.

110. Print System Monitor Report

This option allows you to print gathered information on a monitored ASAP component.

112. Load New Service Configuration into Cache

This option allows you to add new ASAP service definitions dynamically including all CSDL and ASDL-related configurations.

113. Load New NE Configuration into Cache

This option allows you to add ASAP network interface configurations dynamically including host NEs and NE resources.

114. Change JNEP Java Interpreter Diagnostic Level

To change the diagnostic level for JNEP, give the name of the related NEP server as follows:

Specify Server: [NEP_S11A]

Specify New Diag Level: (KERN, LOW, SANE, PROG) [SANE] PROG

115. Analyze Service Model & NEP Configuration Refresh

Performs a discrepancy analysis between the NE configuration in the cache and the configuration read from the database. Produces a discrepancy report which summarizes the discrepancies and includes the following fields: NEP, Host_CLLI, Host_Update_Type, State, Estimate, Pending, In_Progress, Connect_Count, Retry_Count, NEP_Update_Type.

116. Service Model & Configuration Refresh

Refreshes the configuration from the database using the latest values without requiring a restart of ASAP. This command is similar to command 115, except in addition to producing the discrepancy report, it also applies the Service Model and NE configuration cache refresh.

117. List CSDL & ASDL version information and usage referencing

This command produces a report containing the current CSDL and ASDL version information and usage referencing count.