cc/td/doc/product/rtrmgmt/ugm/ugca
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Starting, Using, and Maintaining Cisco UGCA
Launching Cisco UGCA from a Browser
Using Cisco UGCA: Quick Tour
Maintaining Cisco UGCA
Using Cisco UGCA Utility Tools
Troubleshooting

Starting, Using, and Maintaining Cisco UGCA


This chapter presents the following major topics:

Launching Cisco UGCA from a Browser

To access Cisco UGCA from a Web browser, do the following:


Note   Initial releases of this application require Microsoft Internet Explorer. Make sure you have read "Installing Cisco UGCA," in particular Prerequisites.


Step 1   Start Microsoft Internet Explorer and go to the following URL:

https://<FQDN>

where FQDN is the fully qualified domain name of the application server (for example, myserver.mydomain.com)

Cisco UGCA launches.


Tip You may get a warning that the security certificate was not issued by a trusted company. You can add the certificate now. This stops future warning messages from appearing when you launch the application.

Step 2   Enter your user ID and password.

The predefined user ID is admin.

The predefined password is admin.

You are now connected to Cisco UGCA and can create reports.



Maintaining the Cisco UGCA application on the server is discussed in the remainder of this chapter.

Using Cisco UGCA: Quick Tour

A brief introduction to using Cisco UGCA follows. For more details, see the online help. The major tasks, in order, are as follows:

Task 1: Load CDR Records

To load CDR records in the form of syslog files, do the following:


Step 1   Identify a syslog file to load.

Refer to Loading CDR Data. The syslog records are saved in /tmp/syslog.log.

Step 2   Open a UNIX terminal window and login as root.

Step 3   Enter the following to run CDRLoader and load the syslog file into the application:

# install/CSCOugca/bin/loadcdr_file.sh /tmp/syslog.log /tmp/syslog.log.result

where install is the user-selected installation directory. The following messsage should appear:

Job started successfully, please check job information for details.

Step 4   After the job is started, you can observe its status in the browser.

    a. Job status is initially considered active. To confirm this, choose Reports > Job Status from the main window. Choose Data Source > Active. See Figure 3-1.


Figure 3-1   Viewing the Status of an Active Job


    b. After the job is completed, it is moved to the historical job list. To confirm this, choose Reports > Job Status from the main window. Choose Data Source > Historical. See Figure 3-2.


Figure 3-2   Viewing the Status of a Completed Job


An output file containing statistics, /tmp/syslog.log.result, is generated.

    c. To see the content of the file, enter the following command in the UNIX terminal window:

# cat /tmp/syslog.log.result

An example file follows:

================= Summary =================
Status : Completed
Start time : 2002-11-14 11:22:39 EST
End time : 2002-11-14 11:23:04 EST
Time (s) : 24.90
Total syslog msgs : 14781
Total CR to DB : 1640
Total Markup to DB : 1640
Total MCR to DB : 1599
Total inserted to DB : 4879
Total failed CR : 0
Total failed MCR : 0
Av. insert rate (/s) : 195.91
Av. CR ins. rate(/s) : 65.85
Files processed : /tmp/syslog.log
Files failed :



Task 2: Create a Report Specification

To generate a report for call volume distribution across nodes for calls lasting longer than 300 seconds, do the following:


Step 1   Select a report type.

    a. Choose Reports > Report Specifications. The Manage Report Specifications window appears. See Figure 3-3.


Figure 3-3   Selecting a Report Specification


    b. Click the folder Call Duration.

    c. Click Create, at the bottom right. The Name, Description window appears. See Figure 3-4.

Step 2   Enter a report name and description.


Figure 3-4   Entering a Report Name and Description


    a. In the Name field, enter a name. In our example, we enter CallDuration_Node_5min.


Note    Use underscores instead of spaces.

    b. In the Description field, enter a description.


Note    A good description assists others in understanding report results.

    c. Click Next. The Time Coverage window appears. See Figure 3-5.

Step 3   Configure time coverage.


Figure 3-5   Configuring Time Coverage


    a. Choose All.

    b. Click Next. The Configuring Conditions window appears. See Figure 3-6.

Step 4   Configure conditions.


Figure 3-6   Configuring Conditions


    a. Under Field, choose cr_dur_bucket.

    b. Under Get Values, choose 300-.

    c. Click << to populate the Value field.

    d. Under Get Values, click Add.

    e. Leave other conditions at their default values.

    f. Note the Condition Clause Display field at the bottom, and verify that it reads as follows:

cr_dur_bucket = 300-

    g. Click Next. The Grouping window appears. See Figure 3-7.

Step 5   Configure grouping.


Figure 3-7   Configuring Grouping


    a. Under Available Fields, choose node.

    b. Click Add.

    c. Under Selected Fields, verify that node is added.

    d. Click Next. The Summary window appears. See Figure 3-8.

Step 6   Verify the report specification.


Figure 3-8   Verifying the Report Specification


    a. In the Summary window, verify the report specification.

    b. Click Finish. The Report Specifications window appears. See Figure 3-9.

Step 7   Finish creating the report specification.


Figure 3-9   Finishing the Report Specification


    a. Look at the Report Specifications window.

    b. Verify that the report specification CallDuration_Node_5min is created under CallDuration.



Task 3: Generate a Report

To generate a report, do the following:


Step 1   Run report generation.

    a. From the main menu, choose Reports > Report Specifications. The Manage Report Specifications window appears. See Figure 3-10.


Figure 3-10   Generating a Report


    b. Choose Call Duration > CallDuration_Node_5min.

    c. Click Run, at the bottom of the window. A dialog box confirms that report generation has started.

    d. Click OK.

Step 2   Verify that report generation has completed.

    a. From the main menu, choose Reports > Job Status. See Figure 3-11.


Figure 3-11   Verifying that Report Generation Has Completed


    b. Choose Data Source > Active. Wait until the task CallDuration_Node_5min disappears from the list.

    c. Choose Data Source > Historical. Look under the Status column to verify that the report generation is completed.



Task 4: View a Report

To view a report, do the following:


Step 1   Select the report.

    a. From the main menu choose Reports > Report Results. The Report Results window appears. See Figure 3-12.


Figure 3-12   Viewing a Report


    b. Double-click the folder CallDuration to expand it, and find the folder CallDuration_Node_5min.

    c. Open the folder CallDuration_Node_5min and choose the report result that has the appropriate time stamp.


Note    The timestamp of a report result is taken from the End Time of the job (see Step 2 in Task 3: Generate a Report 3-11. Reports of the same type that are run at different times will have different time stamps appended to the original title. In our example, we are concerned with only a single report.

Step 2   View the report as a table. See Figure 3-12.

    a. Click View Table. Report details appear. See Figure 3-13.


Figure 3-13   Viewing a Report as a Table


Step 3   View the report as a graph. See Figure 3-12.

    a. Click View Graph. The Graphing Configuration window appears. See Figure 3-14.


Figure 3-14   Viewing a Report as a Graph


    b. Choose TotalCalls as the value to be displayed.

    c. Choose Bar Chart as the type of the graph.

    d. Click Graph It. In our example, the following bar chart appears. See Figure 3-15.


Figure 3-15   Example Bar Graph


Step 4   Print the report. You can print a report from either table or graph views.

    a. To print a report as a table, first view the report as a table. (See Step 2 in this task.)

    b. Within the selected view, select the printer icon. A new window with the report in printable format is displayed.

    c. Choose File > Print.

    d. To print a report as a graph, first view the report as a graph. (See Step 3 in this task.). Then repeat Step b and Step c immediately above.



Task 5: Modify a Report Specification


Step 1   Select the report to modify.

    a. From the main menu, choose Reports > Report Specifications. The Manage Report Specifications window appears. See Figure 3-16.


Figure 3-16   Modifying a Report Specification


    b. Double-click the folder CallDuration to expand it, and find the folder CallDuration_Node_5min.

    c. Open the folder CallDuration_Node_5min and choose the report result that has the appropriate time stamp.

    d. Click Edit.

Step 2   Modify the report specification.

The procedure for modifying a report is the same as in Task 2: Create a Report Specification, except that you can choose specific screens to modify directly.



Maintaining Cisco UGCA

Perform the following routine maintenance procedures as needed to maintain Cisco UGCA:


Caution   Root access is required for the following activities.

Purging Data


Note   In the following discussion, install represents the directory in which you installed the Cisco UGCA application. See also Managing crontab Entries for Backups and Purges.

A purge utility purges data older than the specified age and is located in the following directory:

install/CSCOugca/bin/purge.sh.

The utility purges three data sets:

The purging is controlled by age parameters specified in the configuration file install/CSCOugca/etc/config/ugca.xml, under the module "purge."

The parameters are as follows:

To purge the data, enter the following at the UNIX command line:

install/CSCOugca/bin/purge.sh

For loaded syslog data, data falling into the following range is purged:

(current date in GMT) - (call setup date in GMT) >= (callrecordsage + 1)

For historical job entries, data falling into the following range is purged:

(current date in local time) - (job end date) >= (tasksage + 1)

For Apache Tomcat log files, data falling into the following range is purged:

(current local time) - (last time log file was modified) >= tomcatlogsage * 24 hour


Note   The use of the "+ 1" leaves the current day's data. For callrecordsage = 0 (the minimum allowed value), data for the previous day and earlier is purged.

Backing Up the System


Caution   Before attempting a backup, you must ensure that sufficient free memory is available to accommodate the files. See Determine Free Disk Space.


Note   The backup directory must exist before this utility can be run. See also Managing crontab Entries for Backups and Purges.

The backup utility is located in the following directory:

install/CSCOugca/bin/backup.sh

The utility will back up the database plus the directory install/CSCOugca/etc into the specified backup directory. The backup directory is specified in the configuration file install/CSCOugca/etc/config/ugca.xml, under the module "backup" with the parameter "backupdir."

Performing a Backup

To back up the system, enter the following at the UNIX command line:

install/CSCOugca/bin/backup.sh

The backup file is compressed and is named automatically in the following ISO-standard format (HH represents time in 24-hour format):

UGCA_yyyymmddHHmmss.tar.Z


Note   If the Cisco UGCA server is up before a backup is run, the backup utility stops the server first, then restarts the server following the backup. If the server is down before the backup is run, it remains down following the backup.

Restoring the System


Note   Before restoring the system, shut down the Cisco UGCA server. See Stopping Cisco UGCA.

To restore the system, enter the following:

install/CSCOugca/bin/restore.sh filename_and_path

This command takes as its parameter the filename and path as discussed in Backing Up the System, above. This restores either the database, the directory install/CSCOugca/etc, or both the database and the directory.


Caution   Cisco strongly recommends that you run the backup utility first, to back up the current database and the /etc directory. If a restore fails, the system attempts to revert to the previous database files, but this cannot be ensured.

Stopping Cisco UGCA


Caution   Do not stop Cisco UGCA while maintenance activities (backup, restore, reset, purge, check_markup) are in progress. If a report is running or a file is being loaded, stopping the application aborts these activities.

To stop Cisco UGCA on the server, enter the following:

/etc/init.d/ugca stop

Caveats and Examples

Note the following caveats and example reports following a stop command. The following cases are considered:

If No Other Processes Are Running

The stop command first checks whether any Cisco UGCA processes are running. If none are running, the application exits.

/etc/init.d/ugca stop
Stopping UGCA
No UGCA processes were detected to stop
If Processes Are Running

If any Cisco UGCA processes are running, then a stop command asks them to shut down and report on success:

/etc/init.d/ugca stop
Stopping UGCA
UGCA stopped
If the System Is Busy

If the system is busy, it may take more than a minute for the application to exit.


Caution   Do not interrupt a stop command during this time or attempt to run another stop.

If any problems are encountered as the process is shutting down (for example, the process does not reply to the request to shut down), then the stop command will report that it encountered problems. This should be taken only as a warning, as it is the eventual success of the stop process that really counts. In the example below, a stop command encounters some issues but eventually runs successfully:

/etc/init.d/ugca stop
Stopping UGCA
Problems encountered whilst shutting down
UGCA stopped

The only circumstances under which the user needs to take further action is when a stop command reports that some processes remained running. For example:

/etc/init.d/ugca stop
Stopping UGCA
Problems encountered whilst shutting down
UGCA stop failed, the following processes were detected:
8943 /opt/CSCOugca/j2sdk1.4.0/jre/bin/java
8942 /opt/CSCOugca/j2sdk1.4.0/jre/bin/java
Please see the troubleshooting section of the user guide for help

Note   The system may or may not report "Problems encountered whilst shutting down." What counts is the line "UGCA stop failed, the following processes were detected:" followed by a list of processes.

To return the system to a stable state, first try issuing a stop command again. If the system still reports that it detected Cisco UGCA processes, do the following:


Step 1   Issue the command kill <pid>, where <pid> is the process ID (the number at the left of the "following processes were detected" line (see above).

kill 8943
kill 8942

Step 2   Issue another stop command.

/etc/init.d/ugca stop

Step 3   If processes are still reported, use the kill command again, this time with the -9 flag:

kill -9 8943
kill -9 8942

Step 4   Issue another stop command.

/etc/init.d/ugca stop

The system is down when a stop reports either of the following:

UGCA stopped

or

No UGCA processes were detected to stop



At this point you can then either (1) perform a maintenance activity that requires a stopped system, or (2) start the system again. When the process of stopping the system is started, continue until the system is successfully stopped. Do not attempt to restart the system or perform a maintenance activity that requires a stopped system until the system is finally down.


Caution   Any maintenance activity (such as restore, reset, check_markup) that requires a stopped system followed by a start refuses to run if the system is not totally stopped.

Resetting the Cisco UGCA Database

Resetting the database returns it to the state it is in immediately following an installation.


Caution   A reset removes all data from the database and reverts to the predefined user ID and password of admin.


Step 1   Make sure that Cisco UGCA is stopped on the server. See Stopping Cisco UGCA, above.

Step 2   To reset the Cisco UGCA database, enter the following:

install/CSCOugca/bin/reset.sh



Starting Cisco UGCA

To start Cisco UGCA on the server, enter the following:

/etc/init.d/ugca start

Removing Cisco UGCA


Step 1   To remove Cisco UGCA from the server, enter the following:

pkgrm CSCOugca

Step 2   Follow the prompts. The system stops CSCOugca first, before removing it from the server.



Editing Session Timeout

Session timeout is a mechanism that will invalidate a user session after a predefined number of minutes of inactivity. The invalidation of a user session also causes all locked resources to be unlocked.


Note   The ReportSpec is locked whenever a user goes to "Edit mode." In this case no other session can delete the ReportSpec or edit it. However, session timeout unlocks the ReportSpec.

The default timeout is 10 minutes.


Step 1   To modify the default, edit the following configuration file:

install/CSCOugca/jakarta-tomcat-4.0.3/webapps/ugca/WEB-INF/web.xml

Step 2   Find the following line and change the default timeout value, taking care to write and save the file:

<session-timeout>10</session-timeout>



Managing crontab Entries for Backups and Purges

By default, the crontab file is set to add entries to run a backup at 10:00 p.m. and purge data at 5:00 a.m. daily. If you chose not to enable backups and purges during installation, you can use the crontab command to enable them now, as well as to change the default times.

When the system is removed, these entries are removed from the crontab file for the root user. The following is a sample crontab file.

#ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0 /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
#0 22 * * * /opt/CSCOugca/bin/backup.sh > /dev/null 2>&1
#0 5 * * * /opt/CSCOugca/bin/purge.sh > /dev/null 2>&1

The last two lines belong to the application, and are always added when the package is installed and removed when the package is removed. The "#" signs mean that these lines are commented out. If you answer yes to the enabling of backup or purge during installation, then the "#" is removed automatically from the beginning of the appropriate line. The backup line says to run the backup script at 0 minutes past 22 hours on the * (every) day of the month, on * (every) month of the year and * (every) day of the week. The purge script is similar, this time running at 5 a.m. instead of at 10 p.m. The format of this file and how to manipulate it is described if you type the following, to launch the UNIX man page for crontab:

man crontab

Note   The rest of the file was established by the Sun Solaris operating system during installation.

Loading CDR Data

Cisco UGCA uses a program called CDRLoader to load CDR data into the database for report generation. The CDRLoader script prints out usage information such as the following. Below is the default without special parameters set.


Note   User input is highlighted in bold. The value of install is the user-selected installation directory.

# install/CSCOugca/bin/loadcdr_file.sh
Usage: loadcdr_file.sh <input> <result>
Where
input file name to be loaded, or directory name
containing files to be loaded.
result file name, to which results will be written.
Exit code
0 job scheduled or started successfully.
1 otherwise.

For example, to load a syslog file with the filename /tmp/syslog.msg, the resulting file is generated in the same directory with the following name:

# cd /opt/CSCOugca/bin
# ./loadcdr_file.sh /tmp/syslog.msg /tmp/syslog.msg.rst
Job started successfully, please check job information for details.

Internally, the CDR loading request was translated into a job. CDRLoader then executes this job. During execution, if you open the "Job Status" page and select "Active" jobs on the browser, the status of this job is displayed. After the job is executed, you can display it by choosing "Historical" as the data source.

Figure 3-17 illustrates the status of a running LoadCDRFromFile job.


Figure 3-17   A Running LoadCDRFromFile job


Figure 3-18 illustrates the status of the completed job.


Figure 3-18   A Completed LoadCDRFromFile job


The result file is always generated. If the operation was successful, it contains the statistics of the execution. Otherwise, it contains error messages. An additional purpose of the result file is to automate CDR loading. An external script can create the syslog file, invoke the loadcdr_file.sh script, and wait for the creation of the result file. By analyzing the contents of the result file, the script can also determine whether the file loaded successfully.

CDRLoader Configuration

The configuration of CDRLoader is stored in the following files:

During system startup, the backend server reads the file ugca.xml. This file is the master source of configuration for the Cisco UGCA system. Then, the backend server starts a process that reads only the file cdrloader.xml. When an attribute in the configuration is queried, CDRLoader looks locally first, to the file cdrloader.xml on the client machine. If the attribute is found, it is returned. Otherwise, it forwards the query to the backend server, which has the content of the file ugca.xml.


Note   In other words, if a configuration aspect is configured in ugca.xml and not in cdrloader.xml, CDRLoader uses the configuration from ugca.xml. If the aspect is also configured in cdrloader.xml, CDRLoader uses the configuration from cdrloader.xml. See the following Tip.


Tip For example, you may want to change only the logging level configuration in cdrloader.xml. If you change it in ugca.xml, it affects all processes.

The format of ugca.xml and cdrloader.xml is identical. In most cases, it is sufficient to use only ugca.xml. However, some situations require cdrloader.xml. For example, the user may want to change only the logging level of CDRLoader. Table 3-1 lists and describes CDRLoader configuration attributes, with their defaults.

Table 3-1   CDRLoader Configuration Attributes

Name Description Default

queueSize

Maximum size of the message queue used internally in the CDR message loader. In general, a larger queue size makes the loader better able to accept large numbers of messages in a short time. This may cause higher memory consumption.

4000

queueSampleThreshold

Threshold used in monitoring the message queue. A snapshot of queue activity is taken after this number of messages is inserted to the queue.

800

mcrMatchQueueSize

Maximum size of the message queue used for matching a call record with its corresponding modem call record in the case of a modem call. A larger queue size may cause higher memory consumption.

100

UnmatchedCRQueueSize

Maximum size of the message queue used for unmatched call records.

250

maxProcessors

Maximum number of CDR message processors. Each processor consumes one database connection. If the maximum number of processors is constantly observed in the statistics, it is beneficial to reduce this number (for example, to 5).

10

statisticsEnabled

Enable or disable statistics. This is mostly used for tuning. It should be disabled under normal operation. Statistics are written to the log file with the logging level "INFO."

false

sampleInterval

Interval between statistics, in seconds.

60

dbInsertDisabled

Processing without a database insert (used internally). This should not be changed under normal circumstances.

false


Note   A result file is not created when the CDR loader process is not shut down properly. An example of an improper shutdown is the use of the UNIX command kill -9 or the unplugging of the power cord.

Maintaining Markup Data

Markup data is generated from raw CDR data. Markup data (table markup) is stored in the database . The primary purpose of markup data is to increase the efficiency of report generation, as well as to provide some level of normalization of raw data. For a better understanding of this topic, some knowledge of SQL and high-level programming languages is required.

Markup is generated automatically during the loading of CDR data, and no direct user involvement is required. However, user interaction is required for configuration and maintenance.

This section presents the following major topics:

Markup Configuration Attributes

General configurations are stored in the file markup.xml. Table 3-2 lists and describes markup configuration attributes, with their defaults.

Table 3-2   General Markup Configurations

Name Description Default

regenChunkSize

Markup data is regenerated chunk by chunk. This variable specifies the chunk size. A larger chunk size may cause a shorter markup-data regeneration time, but increase memory consumption. Too large a chunk size may cause more frequent paging, and an even longer markup-data regeneration time.

5000

regenThreshold

When inconsistency in markup data is detected, the existing data is either repaired or regenerated, depending on the number of inconsistent entries in the database. If the number is greater than this variable, existing markup data is simply removed and regenerated. Otherwise, existing markup data is repaired.

1000

The database schema and rules used for markup generation are totally controlled by the configuration file markup.xml (defined by markup.dtd). Changes in this file can be detected automatically during system startup, but the user must manually invoke a utility for the changes to take effect. Below is the file markup.dtd:

<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT MarkupSetup (MarkupAttribute)+ >
<!ELEMENT MarkupAttribute (MarkupAttrEnumType)?>
<!ATTLIST MarkupAttribute
Name CDATA #REQUIRED
Type CDATA #REQUIRED
Unique (TRUE|FALSE|true|false) #REQUIRED
Default CDATA #IMPLIED
Rule CDATA #REQUIRED >
<!ELEMENT MarkupAttrEnumType (Pair)+>
<!ATTLIST MarkupAttrEnumType
DefaultName CDATA #REQUIRED
DefaultValue CDATA #REQUIRED >
<!ELEMENT Pair EMPTY>
<!ATTLIST Pair
Name CDATA #REQUIRED
Value CDATA #REQUIRED >

The content of the file markup.xml must be 100 percent compliant with its DTD, markup.dtd. Internally, all markup data is stored in a table called markup. As defined in the DTD, the root element MarkupSetup consists of one or more MarkupAttributes. Each has the following attributes:

A MarkupAttribute can have 0 or 1 MarkupAttrEnumTypes. If an enumeration type is presented in the definition of a markup attribute, this attribute is interpreted internally as an enumeration type. This type must be unique across the system. A MarkupAttrEnumType has the following attributes:

A MarkupAttrEnumType consists of one or more Pairs (name-value mappings).

The following is a simplified example of markup.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MarkupSetup SYSTEM "file://localhost//opt/CSCOugca/etc/dtd/markup.dtd">
<MarkupSetup>
<MarkupAttribute Name = "recid"
Type = "BIGINT"
Unique = "true"
Rule = "
value = call_record.recid;
">
</MarkupAttribute>
</MarkupSetup>

Markup Generation Rules

The rules used to generate markup data are similar to those of a simple programming language. Note that the XML specification requires the use of character sequences for certain characters. For better readability, most examples in the text will not substitute the following:

Character String Used in XML File

&

&amp;

`

&apos;

"

&quot;

<

&lt;

>

&gt;


Note   The full BNF grammar for markup generation rule can be found in "BNF for Markup Interpreter: Terminals and Nonterminals." The file makup.xml is shown in "Cisco UGCA Markup: markup.xml and call_record.discid."

The return value of the markup logic should always be saved in the variable value. After execution, if this variable cannot be found in the internal symbol table, the default value defined in previous section is used.

The rules are applied to call record and modem record pairs; all values in these records are accessible from the markup interpreter. Details about these tables can be found in "Cisco UGCA Database Schema." For example, the following are call record and modem record pairs:

Variable Explanation

call_record.recid

Record ID for a call record defined in table call_record

modem_call_rec.sq

Signal quality defined in table modem_call_rec

The following additional topics are illustrated below:

Comments

The following comment styles are supported:

Data Types

Only two data types are supported: string and number. Strings are character sequence quoted by `"'.

Example: "A string"


Note   In the XML file, `"' must be substituted by `&quote;').

Any number is interpreted as a float internally (range: -2139095040 to 2139095039).

Example: 0, 1.2, -54226.

Calculation Operations

Operation Explanation

+

Addition.

Example: 2.2+3; a+2; b+c

-

Substitution.

Example: 2.2-3; a-2; b-c

*

Multiplication.

Example: 2.2*3; a*2; b*c

/

Division.

Example: 2.2/3; a/2; b/c

~

Matching. Returns the first match of a regular expression (right-hand side) from the left-hand side.

Example: "kaaabc" ~ "a*b" returns "aaab".

Boolean Operations

Operation Explanation

&&

And.

Example: (3>2) && (3<2) returns false.

||

And.

Example: (3>2) || (3<2) returns true.

==

Equal to.

Example: 3 == 2 returns false.

>

Greater than.

Example: 3>2 returns true.

>=

Greater than or equal to. Example: 2>=3 returns false.

<

Less than.

Example: 3<2 returns false.

<=

And.

Example: 3<=2 returns false.

~~

Contains. Operation returns true, at least one match of the regular expression (right-hand side) can be found in left-hand side.

Example: "kaaabc"~~ "a*b" returns true. "kaaacb" ~~ "a*b" returns false.

If Statements

Syntax:

"if" "(" Expression ")" Statement ( "else" Statement )?

Example:

a = 5; /* Assign 5 to variable a */
if (a == 5) { /* Check, if a equals 5 */
value = a; /* If true, assign 5 to value */
}
else {
value = -1; /* Otherwise, assign -1 to value */
}
Assignment

Syntax:

PrimaryExpression "=" Expression

Example:

a = 5; // Assign 5 to variable a
a = b + c; // Assign sum of b and c to a
Markup Attributes

Table 3-3 illustrates a fully commented section from markup.xml. See also "Cisco UGCA Markup: markup.xml and call_record.discid."

Table 3-3   Markup Attributes and Explanations

Markup Attribute Explanation
<MarkupAttribute Name = "cr_dur_bucket"
Type = "INTEGER"
Unique = "false"
 
 
Default = "1"
Rule = "
if(call_record.duration &gt; 300) {
value = 3;
}
 
else if(call_record.duration &gt; 60) {
value = 2;
}
else {
value = 1;
}
">
<MarkupAttrEnumType DefaultName = "0-60"
DefaultValue = "1">
<Pair Name="0-60" Value="1"/>
<Pair Name="60-300" Value="2"/>
<Pair Name="300-" Value="3"/>
</MarkupAttrEnumType>
</MarkupAttribute>

 

Open an new MarkupAttribute element and set Name to "cr_dur_bucket"
Set Type to SQL INTEGER
Set Unique to false, this column is then not used as a unique key
Set default value to 1
 
If call duration defined in table call_record is greater than 300, set cr_dur_bucket value to enumeration value 3 (300-).
 
Otherwise, if call duration defined in table call_record is greater than 60, set cr_dur_bucket value to enumeration value 2 (60-300).
 
Otherwise, set cr_dur_bucket value to enumeration value 1 (0-60)
 
 
Open an new MarkupAttrEnumType element with the default name "0-60" and default value 1.
Add pair "0-60" - 1
Add pair "60-300" - 2
Add pair "300-" - 3
Close MarkupAttrEnumType element
Close MarkupAttribute element
 

The first column represents bucketized call duration in the call_record according to the following criteria:

Maintaining Markup Data

You can manually invoke the script check_markup.sh to perform markup data maintenance.


Caution   You must stop the system first before performing maintenance. See Stopping Cisco UGCA.

Under normal circumstances, no maintenance is required. During system startup, the system performs checks on markup data and determines if maintenance of markup data is required. If system decides, that maintenance of markup data must be performed, it prints out a warning message. However, it does not perform markup data maintenance automatically.

Note the following example:

# /etc/init.d/ugca start
Starting UGCA
[1] 22901
[1] 22906
[1] 22908
UGCA started
# WARNING:
Inconsistency in markup data has been detected. It's strongly
suggested to stop the system and run the command-line utility
/opt/CSCOugca/bin/check_markup.sh.

The script install/CSCOugca/bin/check_markup.sh tries to detect the following:

If maintenance of the markup data is required, the script performs one of the following actions:

The following example illustrates markup data being repaired:

# /etc/init.d/ugca stop
Stopping UGCA
UGCA stopped
# /opt/CSCOugca/bin/check_markup.sh
Start checking markup data ...
Detected markup data inconsistency.
Repairing markup data ...
Regenerated markup data for 150 row(s).
Markup checking completed successfully.
# /etc/init.d/ugca start
Starting UGCA
[1] 23047
[1] 23052
[1] 23054
UGCA started

Note   Currently, Cisco UGCA provides mostly error checking of the file markup.xml at the syntax level. Logical errors such as invalid enumeration values may not be detected.

Managing the Volume of Log Files

The logging facility of Cisco UGCA captures information about the state of the system. This information is stored as text files in the directory install/CSCOugca/logs. As these files increasingly consume space on the hard disk, memory consumption must be managed.

Two parameters, or "pair keys," in the configuration file install/CSCOugca/etc/config/ugca.xml control the logging files volume:

These pair keys are found under the section "Module logger" in the file. See "Cisco UGCA Configuration File: ugca.xml."

For example, if limit is set to 500000 (500 KB) and count is set to 5, the total cumulative size of the log files will be no more than 2.5 MB.

Editing Logging Parameters

To edit the limit and count log file parameters (pair keys), do the following:


Step 1   Edit and save the file install/CSCOugca/etc/config/ugca.xml.

Step 2   Stop and restart the system.



Accessing and Reading Raw Data

Cisco UGCA provides a limited read-only access to the historical data the application stores. For more information and a presentation of the database schema, see "Cisco UGCA Database Schema."

Changing Database Account Passwords

Cisco UGCA contains two database accounts, a system account that is used by Cisco UGCA and a user account for read-only access to the raw data. See the Accessing and Reading Raw Data section in this chpater.


Note   Before changing the database account passwords, shut down the Cisco UGCA server. See the Stopping Cisco UGCA section in this chapter.

To change the system password, enter the following:

install/CSCOugca/bin/db_passwd.sh -system

To change the user password, enter the following:

install/CSCOugca/bin/db_passwd.sh -user

In both cases, follow the prompts to complete the changes.

Using Cisco UGCA Utility Tools

Cisco UGCA provides a variety of utility tools, or scripts, to assist you in general maintenance as well as in troubleshooting:

Script to Correct Certain Cisco Call Tracker Messages

Some releases of Cisco IOS have Cisco Call Tracker syslog messages that need repair. The following are currently known issues:

A scripting tool has been developed to address these issues, by correcting malformed Cisco Call Tracker syslog messages into correct ones that can be loaded into the Cisco UGCA application. The scripting tool is on the application CD-ROM, in the directory /utils/tools. The scripting file name is repairSyslog.awk.

Launching the Script

You can launch the script from the directory /utils/tools, or you can copy it to a working directory and launch from there.

Usage is as follows:

# ./repairSyslog.nawk <input_file_name> <output_file_name>

where

input_file_name is the input syslog file to be fixed, and output_file_name is the output (fixed) syslog file that can be loaded into the Cisco UGCA application.

The script provides a summary containing information about the following:

Example

# ./repairSyslog.nawk /opt/newcisco.log.1.new /opt/newcisco.log.1.new.out
The script is running. Please wait...
Running Script Results
=================================================
Total Input Records: 160373
Total Output Records: 160373
Total Modem Records: 79998
Total Call Records: 80375
Modem Records Changed: 757
Call Records Changed: 769
Input Syslog File: /opt/newcisco.log.1.new
Output Syslog File: /opt/newcisco.log.1.new.out

Example Scripts to Schedule the Loading of syslog Files

Two example scripts, push_syslog.sh and pull_syslog.sh, are provided to schedule the loading of syslog files by means of the UNIX cron utility. These scripts address the following scenario:


Caution   The environment setup and configuration may vary considerably from customer to customer. Consequently, these scripts should be used only as a starting point, and should be modified according to the actual environment.

push_syslog.sh

This script takes two parameters: input_file_name and output_file_name. It reads the input file (in this example, /var/log/syslog7.log), repairs the syslog files, and saves the verified files to the output file. It then clears the input file after the result file is created, in preparation for the next invocation. The output file can be accessed by the Cisco UGCA system.

pull_syslog.sh

This script takes one parameter: input_file_name. It invokes CDRLoader to load the input file. CDRLoader automatically provides the output file name, which is the input file name plus the time stamp of the invocation. The output file is created in the same directory as the input file.


Note   Reserve sufficient time between the input and output files, so that push_syslog.sh can create its output file completely.

Both scripts can be invoked as cron tasks.

Example

The following example creates a cron entry for each script to process syslog once a day at 01:00 UTC, with 15 minutes between the input and output files:

0 1 * * * /opt/CSCOugca/bin/push_syslog.sh /var/log/local7.log /tmp/local7.log >/dev/null 2>&1
15 1 * * * /opt/CSCOugca/bin/pull_syslog.sh /tmp/local7.log >/dev/null 2>&1

The scripts are located on the application CD-ROM, in the directory /utils/sample.

Script to Schedule Report Generation

A sample script, run_sch_report.sh is provided to schedule report generation by means of the UNIX cron utility. By default, the content of this script is completely commented out. You can modify or add new entries to this script, as well as create a cron entry for it.


Caution   Because the environment setup and configuration may vary considerably from customer to customer, this script should be used only as a starting point.

Example

0 2 * * * /opt/CSCOugca/bin/run_sch_report.sh >/dev/null 2>&1

Note   If you want to generate a report after CDR data is loaded to the system, make sure to leave enough time between CDRLoader's loading of the cron entry and the report generation. Also, during report generation, make sure no other maintenance activities or CDR loading are running.

The script is located on the application CD-ROM, in the directory /utils/sample.

Script to Repair Database Corruption

In case the database becomes corrupt, it is possible to repair it.

Determining Database Corruption

If the database is corrupt, console and syslog messages so indicate during a backup. In addition, the following error message appears when the application starts. The message also appears in the log files.

com.cisco.nm.ugca.common.db.DatabaseException: java.sql.SQLException: General error: Can't open file: 'call_record.MYD'. (errno: 144)

Also, other database error messages may appear in the log files. Check these files for messages if all other possible causes of database corruption have been eliminated. However, the absence of messages is not an indication of database integrity.

Repairing Database Corruption

Once you have determined that the database is corrupted, you must repair it. To do so, run the script myisamchk script, as indicated below.


Caution   Stop the system before proceeding. See Stopping Cisco UGCA. If you do not stop the system first, bogus errors are reported. If you try to fix these bogus errors, further corruption results.


Step 1   To check for database corruption, use the following command:

install/CSCOugca/mysql/bin/myisamchk --silent --fast --key_buffer=128M --sort_buffer=128M --read_buffer=2M --write_buffer=2M <install>/CSCOugca/mysql/data/ugca/*.MYI

This checks for errors in all .MYI files.

Step 2   If errors are reported, repeat Step 1, but add --recover to the list of options only for the .MYI file reported to have errors.



Troubleshooting

This section contains known techniques that can resolve problems and improve performance.


Tip See also Using Cisco UGCA Utility Tools.

Optimizing System Performance

Exploiting Parallelism

The report engine can execute multiple reports in parallel. In turn, the maximum number of reports that are executable in parallel is determined by the configuration parameter nThreads in the following file:

install/CSCOugca/etc/config/ugca.xml

The default value for nThreads has been set to 1. This number optimizes performance on the minimum recommended hardware, the Sun Ultra 10. However, in some cases, on powerful multi-CPU machines with large memory and fast disks, it is beneficial to increase this default value to run parallel report-engine threads.

Where the machine is sufficiently capable, the user is free to experiment with the configuration parameter nThreads. If performance appears not to be affected, you can adjust this parameter and evaluate its effects. The file, presented in "Cisco UGCA Configuration File: ugca.xml,", should provide sufficient comments to enable you to understand the various parameters.


Note   Although the system has been tuned for the hardware specified, a Sun Ultra 10, it scales well to higher-end hardware. Because CDR loading is multithreaded and limited by CPU speed, using multiple or faster processors speeds up loading. However, report running is disk bound, so using a machine with sufficient memory (2 GB or more) for the operating system to cache the database files can dramatically improve the performance of running individual reports. Once a report is running in memory and not off the hard disk, it is limited by CPU speed. In this case, faster processors help, and adding more processors and increasing the parameter nThreads increases parallel processing.

It is recommended that you do not run multiple reports in parallel (change nThreads > 1) while reports are still running off the disk. The system is disk bound, and this slows down report generation.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Mar 27 17:19:43 PST 2003
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.