Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Performing server tasks using Longview Administrator Console

You can interact with the Longview Data Server in two ways:

  • Longview Server Manager—A Graphical User Interface (GUI)-based component, which is available from Longview Component Manager.
  • Longview Administrator Console—A line mode-based tool, which you can use to enter commands and parameters manually.

Users must have authorization for Longview Server Manager to work with Longview Administrator Console.

For information on creating and configuring users, see the Longview Application Administrator’s Guide.

For information on configuring Longview Administrator Console for a Windows authenticated user, see “Accessing the Longview Administrator Console”.

System Administrators can perform the following tasks in Longview Administrator Console:

Accessing the Longview Administrator Console

To simplify the process of accessing Longview Administrator Console, you should create a customized batch file for your system.

To create a batch file for Longview Administrator Console:

  1. Open your preferred text editor.
  2. Add the following lines to your file:

    @ECHO OFF

    SET KHALIXSERVERPATH=.\bin

    SET PATH=%PATH%;%KHALIXSERVERPATH%

    CLS

    ECHO The KHALIXSERVERPATH has been set to: %KHALIXSERVERPATH%

    @ECHO ON

    lvmgrl "bind serverhost adminport" "user userID pwd"

  3. Replace the following parameters:
    ParameterReplace with...

    serverhost

    the host name or address of the Data Server that Longview Administrator Console should connect to.

    For example, localhost or SQL0934.

    adminport

    the Data Server Administrator port. For example: 27999.

    userID

    the user ID. For example, jgordon. If you are using Windows Authentication, type system.

    pwd

    the user’s password. If you are using Windows Authentication, delete this parameter.

  4. Save the file as LongviewAdministratorConsole.bat.
  5. Double-click the file you created to open Longview Administrator Console.

Working with general commands

You can use Longview Administrator Console to perform several tasks related to connections and help.

For commands related to server status, see the table below.

Command

Parameter

Description

bind

host port

To bind to the server host and port.

user

userID password

User authorization to start and stop the server.

help

help ALL or help [Command Name]

To view online help for line mode commands.

ALL—To view a list of all line mode commands. Command Name—To view help for the specified command.

exit

 

To exit.

Working with server status

You can use Longview Administrator Console to perform several tasks related to server status.

For commands related to server status, see the table below.

Command

Parameter

Description

getid

 

To view the Longview Identifier (LID) of the Longview server, as specified in the SERVER_NAME parameter in the server configuration file (lvsrvr.cfg).

getport

 

To view the server listener port, as specified in the LISTENER_PORT parameter in the server configuration file (lvsrvr.cfg).

getrecalcdir

 

To view the current restatement folder for the set of data servers being managed by this lvmgr, as specified in the RECALC_FILE parameter in the server configuration file (lvsrvr.cfg).

getworkdir

 

To view the current working folder for the set of data servers being managed by this lvmgr, as specified in the WORK_DIRECTORY parameter in the server configuration file (lvsrvr.cfg).

reset

[restate]

To reset the restatement error code or to reset error codes.

When you reset the restatement error code or the servers error codes, users may be able to continue to work even while those errors still exist (depending on the type of error).

For example, if a command fails because there is not enough database space for its database to expand, the Longview data server sends an error message to every user who connects to the server. You may be able to use this command to clear the error message so that subsequent users do not see an error message while you are fixing the error.

However, in some cases, you need to correct the error before users can continue.
The optional parameter restate will reset the restatement error code, reset without a parameter will reset the server error codes.

Note: When resetting the restatement error code, exclusive mode will remain on. The restatement error code is set when a restatement fails.

start

 

To start the servers.

status

 

To view the status of the servers. Once you know the status of the servers, you can turn them on or off as necessary.
In addition, the status will indicate the state of the servers and whether they have encountered any errors.

stop

[immediate]

To stop the server, subject to warnings. Any submissions complete before the server stops.

The optional parameter immediate stops the server at once, regardless of connected users or jobs being processed. If you use stop immediate, you should have a business administrator check the data submission batches to ensure all the data was submitted.

Note: For more information on the server configuration file, see the Longview Installation Guide.

Working with queues

When a user submits data to the Longview database, each submission is logged in batch tables. When an error occurs during a batch submission, you can use Longview Administrator Console to check the batch tables for the status of the submission queues, and resume processing any outstanding submissions after the issues have been resolved. You can also use Longview Administrator Console to clear any outstanding batches.

For line mode commands related to queues, see the table below.

CommandParameterDescription

queue

show subm | math | writ | elim | all

To view the status of server queues. For more information, see “Viewing the status of server queues”.

recover

[queue | status | clear] 

[| subm | math | writ | elim | all]

queue—To recover the status of submission queues and resume processing. For more information, see “Recovering the status of submission queues (resume processing)”.

status—To recover the status of submission queues. For more information, see “Recovering the status of submission queues (do not resume processing)”.

clear—To clear outstanding batch submissions. For more information, see “Clearing outstanding batch submissions”.

Analyzing system data

You can use Longview Administrator Console to analyze various types of data and activity in your Longview system. The Longview data server tracking can help identify specific activities performed by users. For example, symbol maintenance and server model maintenance activities are listed in the Longview Data Server Log file.

For line mode commands related to system data, see the table below.

Command

Parameter

Description

archive

monitor | [filename]

To rename the Longview Data

Server Log (lv_dataserver.log) with a date/time stamp extension while servers are running. A new lv_dataserver.log file will automatically be created.

To use a name other than the default date/time stamp extension, provide the filename parameter. Archived log files are stored in the logs folder.

get

user all | connected | active n

To retrieve the following information about users: user all—user IDs of all users connected—all connected users active n—all users currently connected to the data server

get

node connected

To retrieve information on all grid nodes connected to the data server.

For more information, see “Polling the grid environment (Get Node Connected)”.

get

server id

To retrieve the server ID.

collect

statistics

To collect statistics.

Checking for duplicate data

Due to user error or other reasons, you may sometimes have duplicate data in your system. You can use Longview Administrator Console to check for duplicate data before you perform a data export or a restatement.

To check for duplicate data, type the following command in Longview Administrator Console:

CHECKDUPLICATE [FAMILY] [DATAOPTION] [PARTITION_LIST]

where:

  • FAMILY can be one of the following:
    ValueDescription

    BASE

    regular data

    SCHEDULE

    schedule data

    ALL

    both schedule and base data

    Note: If you omit FAMILY, all data is checked.

  • DATAOPTION can be one of the following:
    ValueDescription

    CALCULATED

    leaf and calculated data

    PARENT

    leaf and parent data

    ALL

    leaf, calculated, and parent data

    Note: If you omit DATAOPTION, all types of data are checked.

  • PARTITION_LIST is an optional parameter to specify the list of partitions you want to check. If you omit PARTITION_LIST, all partitions are checked.

    For example, to check for duplicate data in base calculated data in partitions P01 and P02, the syntax is:

    CHECKDUPLICATE BASE CALCULATED P01,P02

    To check for duplicate data in both data types and all partitions, the syntax is:

    CHECKDUPLICATE ALL

    ALL or simply:

    CHECKDUPLICATE

    When you run this command, a message identifying the number of duplicates appears on screen. The output of the duplicate values is saved to a file called duplicates.out in the server’s working directory. The output appears as follows:

Exporting and importing data in database tables

You can use Longview Administrator Console to export and import the data in database tables. (However, you cannot export or import the structure of the tables.) You can use these export and import utilities to perform several tasks.

Task

Description

clean up leaf data

You can use the export and import utilities to clean up:

  • data corresponding to deleted symbols
  • data corresponding to symbol indexes out of the valid range
  • non-static parent data in the leaf tables
  • data with a value of 0.0
  • data with empty character strings

repartition leaf data

You can redistribute leaf data properly.

reorganize symbol indexes

You can collapse deleted symbol gaps, and then reorganize existing symbol lists, collapse out deleted symbols, and re-index all existing data to use the new index coordinates.

perform data transfers across platforms

The import and export utilities provide flexible data transfers by creating Longview-related binary files independent of the Longview data server platform.

For line mode commands related to importing and exporting, see the table below.

Command

Description

export [system [affectedonly | raw] | systemdata [affectedonly | raw] | affectedonly | raw] [TO Name]

To export your Longview data server data to a binary file.

import system | systemdata | data [FROM Name]

To import your Longview data server data from binary files to a table.

Exporting database tables

The Export utility extracts the appropriate Longview data server tables, creating multiple binary files that can be stored or subsequently imported. (It does not export any tables whose name starts with klx_ic or calculated and parent data.)

The Export utility does not alter any data on the actual tables. The server must be running before you can use the Export utility.

The Export utility performs the following tasks.

  1. Based on the Master Symbol table (lv_master_symbol), it creates new temporary index mappings to eliminate deleted symbols and out of range symbols.

    Using the new mapping and specified options, it converts data from the existing tables to an output file. The name of the export file is exp_data.nnnn, where nnnn is 0001 to 9999. The file is saved in the folder specified by the RECALC_FILES parameter in the server configuration file (lvsrvr.cfg).

  2. The size of each output file cannot exceed the size specified in the MAX_EXPORT_FILE_SIZE parameter in the server configuration file (lvsrvr.cfg). If the amount of data exceeds the specified size, the data is saved in multiple output files.

    Note: Note For more information on the server configuration file, see the Longview Installation Guide.

  3. It eliminates data as follows:

    1. If data in the output files is from data tables, it eliminates data with empty strings or a numeric value of 0.

    2. If data in the output files is from leaf tables, it eliminates non-static parent data.

  4. It creates an import control file for referencing the output files to the original tables. The name of the import control file is exp_cntl.lv. The import control file is created in the RECALC_FILES folder as specified in the server configuration file (lvsrvr.cfg).

  5. It creates a log file which contains details of the specific tables and number of rows exported. The name of the log file is export.log. The export log file is created in the RECALC_FILES folder as specified in the server configuration file (lvsrvr.cfg).

To run the Export utility, use the following command:

export [system [affectedonly | raw] | systemdata [affectedonly | raw] | affectedonly | raw] [TO name]

where:

FieldDescription

No parameter

Export all system, system data, and leaf data tables with the default export name exp.

  • Do not specify a parameter for ExportType to:
  • reorganize the Longview data server database structure and optimize performance
  • export system tables and leaf data for the purpose of leaf-level repartitioning
  • copy the database to another Longview instance
  • create an exact backup of your database. However, Longview recommends that for disaster recovery procedures, you use the RDBMS software.

system

To export main system tables in the Longview data server database, including metadata tables such as the dimension and symbol tables.

Use this option to:

  • copy the symbols and hierarchy of a database to another database
  • reorganize the Longview data server database structure and optimize performance when no data exists

systemdata

To export as system, but with the addition of journal entry, batch, locking, symbol statistics, shared files, and models. Use this option to copy the symbols and hierarchy of a database to another database, along with the additional tables.

affectedonly

To export only tables that would be affected by symbol reindexing. Use this option to reduce the number of tables to export and import. However, it is not suitable if you are using the Export utility to create a backup.

raw

To export the database in its raw state without removing and resequencing deleted symbols. Use this option when you want to have an exact snapshot of a database.

name

Use this parameter to provide a name for the export. This parameter allows you to create multiple exports. The default name of the export if not provided is exp. If an export of the same name already exists it will overwrite the export with the same name.

The export name cannot:

  • be more than 64 characters long.

  • cannot contain characters \ / * ? “ < > | % $ or spaces.

Command example

export TO Full_Export_Backup

Importing database tables

The Import utility reads binary files created by the Export utility and restores the appropriate data server tables. If you want to change the number of partitions, prior to using the import data command, use the DBScript utility to add the additional data tables or delete data tables.

Caution: After you export data, you must import the system/system data as your first step, before you import data. Otherwise, your data may refer to invalid symbol references. If you choose to make subsequent imports with the same export file, you don’t need to import the system again (until a new export is made).

To run the Import utility, type the following line mode command:

Import system | systemdata | data [FROM name]

where:

ValueDescription

system

To import the main system tables into the Longview database.

All non-data tables are truncated according to the information provided in the export control file. The data is then loaded into the appropriate system tables.

You must stop the Longview server before you select this option.

systemdata

To import as system, but with the addition of journal entry, batch, locking, symbol statistics, shared files, models, and intercompany tables. You must stop the Longview server before you select this option.

data

Use this option to:

  • import data tables into the Longview database.
  • import leaf data into the Longview database for the purpose of repartitioning and switching parent symbols.

All leaf data tables are truncated according to the information provided in the export control file. The data is then loaded into the appropriate leaf data tables.

You must start the Longview server before you select this option.

nameUse this option to provide the name of the export file to import.

Caution: After you import data, stop, and start the servers and run an enterprise restatement. If you don’t stop and start the servers first, data may not calculate correctly.

Command example:

import systemdata FROM Full_Export_Backup

import data FROM Full_Export_Backup

Using importing and exporting to change partitioning

One of the main uses for the import and export utilities is to allow for easier repartitioning of an existing data server database.

To repartition a data server database, follow these steps.

  1. Export the data server database.
  2. Shut down the server.
  3. Using the system or the systemdata option, import the output files created in step 1.
  4. Change partition strategy by changing information in the Partitions table (lv_partitions) and the sym_partition column in the Master Symbol table (lv_master_symbol).
  5. Start the server.
  6. Import the contents of the output files using the data option.
  7. After the import data leaf has completed successfully, stop, and start the servers, and perform an enterprise restatement.
    For more information, see “Working with restatements and recalculations”.

Working with restatements and recalculations

An enterprise restatement is a mode of calculation in which a rollup of the entire data server database is performed to make all values current. An enterprise restatement is required to calculate the effect of major changes throughout the database.

A partition recalculation is a mode of calculation in which a recalculation of one partition is performed to make all values current. A partition recalculation is required to calculate the effect of changes confined to a single partition.

You can use Longview Administrator Console to create, edit, run, and delete enterprise restatements and partition recalculations.

For line mode commands related to restatements and recalculations, see the table below.

Command

Parameter

Description

begin

restate | recalc

To begin a restatement or recalculation.

end

restate | recalc

To end a restatement or recalculation.

This command must be used if the begin command was used.

recalc

[loadonly] unadjusted | adjusting | partition(s)

To perform a partition recalculation. All is not a valid parameter for partitions. To recalculate all partitions, use the restate command.

recalc

eliminations all | Partition

[,Partition[,...]] [[ignore unchanged]]

To perform a recalculation for eliminations. To perform a partition recalculation for eliminations, specify the Partition option.

recalc

journals

To perform a recalculation for journal entries.

recalc

audit recover

This command is used to recover data from audit tables, and it can only be performed when there is no one connected to the Longview system. This feature also behaves directly according to the value in USE_DATA_AUDIT_TRAIL.

Note: For more information on USE_DATA_AUDIT_TRAIL, see the Longview Installation Guide.

recalc

audit reset

The command is used to reset the information in audit tables, and it behaves differently according to the value in USE_DATA_AUDIT_TRAIL

Note: For more information on USE_DATA_AUDIT_TRAIL, see the Longview Installation Guide.

restate

[loadonly] unadjusted | adjusting

To perform an enterprise restatement.

Partition recalculation does not guarantee data integrity under the following scenarios:

  • If the specified partition or partitions do not cover all input leaf data needed to generate data for the specified partition or partitions.
  • If there is output data generated not within the specified partition or partitions. A warning message appears in the Data Server Log file:

The output data generated to the following partitions were filtered out during partition recalc on specified_partition_name: list_of_partitions.

Note: When a restatement or recalculation fails, the system will remain in exclusive mode and the restate error code will be set. In addition, a restate_recalc_errors log file is created containing the errors that occurred during the restatement or recalculation.
To clear the exclusive mode a successful restatement or recalculation needs to be ran or stopping and re-starting of the servers.

Creating a manual grid environment for restatements

Longview applications on Windows platforms can run the math portion of restatements across a grid environment, consisting of a grid server and several grid node machines. This feature introduces an enhanced degree of scalability to restatement functionality, allowing several computers to participate in the calculation process, greatly increasing performance.

To create a manual grid environment, follow these steps:

  1. Set the following server configuration file (lvsrvr.cfg) parameters in the Data Server:
    • USE_GRID_PROCESSING must be set to TRUE.Optionally, you can set the name of the grid server using the GRID_SERVICE_NAME parameter (by default, the grid server name is ks_math).
    • GRID_PROCESSING_TYPE must be set to LVGRID.
    • GRID_LISTENER_PORT must be configured with a port number. The GRID_LISTENER_PORT set in each of the grid node machines must match this value.
    • GRID_CURSORS_MAX must be set to an integer between 1 and 12 (the default value is 4)

    Note: If you change any of the LVGRID parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

  2. Install the grid node software on the machines to participate in the grid. For more information on installing grid software and working with the server configuration file (lvsrvr.cfg) file, see the Longview Installation Guide.
  3. Use the line mode command GET NODE CONNECTED to get all connected grid node machines involved in the restatement.
    For more information, see “Polling the grid environment (Get Node Connected)”.

When a restatement runs in a grid environment, a lv_dataserver.log is created on each grid node machine. As jobs are sent to the grid node machines, messages in the master lv_dataserver.log file (on the grid server) are sent to indicate that a calculation job was sent and when the job was completed. Once all of the math jobs have completed, the writers merge all records together and load as usual. If an error occurs on any of the grid node machines, the restatement process is terminated and must be run again.

Note: The grid restatement functionality supports Oracle and SQL on the Windows operating system.

For more information on this feature, contact Longview Support Services.

Polling the grid environment (Get Node Connected)

It is possible to get an overall view of what is going on in the grid environment and how it is composed by issuing the Get Node Connected command. This command will return a table with the following information for each grid node machine:

FieldDescription

Node ID

The ID number of a computer participating in the grid environment.

Node Host

The network address of the grid node machine.

Num Math

The number of math servers running on the grid node machine.

Num Jobs

The number of jobs that the grid node machine has queued up on it, running or pending.

Creating a DataSynapse grid environment for restatements

DataSynapse is a third-party application for managing a grid environment (a network consisting of a grid server and several grid node machines) and can be used in conjunction with Longview for restatements. DataSynapse creates a dynamic environment that responds to changes in workload and resource availability to make efficient use of computers, networks, and grids to more quickly perform time and resource intensive processes. Effectively, Longview continues to administer the higher processes of the restatement, such as sending math jobs to DataSynapse and writing the output files to the grid server, while DataSynapse oversees the distribution of math jobs over the grid. For more information, see the DataSynapse documentation.

To create a DataSynapse grid environment, follow these steps.

  1. DataSynapse must be installed and configured. For more information, see the DataSynapse documentation.
  2. Set the following server configuration file (lvsrvr.cfg) parameters in the Data Server:
    • USE_GRID_PROCESSING must be set to TRUE.
    • GRID_PROCESSING_TYPE must be set to DATASYNAPSE.
    • GRID_LISTENER_PORT must be configured with a port number. The GRID_LISTENER_PORT set in each of the grid node machines must match this value.
    • GRID_OUTPUT_MAX_THREADS must be set to an integer between 1 and 80 (the default value is 5).
    • GRID_CURSORS_MAX must be set to an integer between 1 and 12 (the default value is 4).

      Note: If you change any of the LVGRID parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

    • Optionally, you can set the name of the grid server using the GRID_SERVICE_NAME parameter (by default, the grid server name is ks_math).

For more information on the server configuration file (lvsrvr.cfg) parameters, see the Longview Installation Guide.

While the grid server continues to log the sending and receiving of jobs (in this case, to DataSynapse), in this configuration, it will not log the actual activity of the math jobs to a lv_dataserver.log file. Logs of math job activity are managed by each grid node machine and stored in the log file structure established to serve DataSynapse.

Improving performance with asynchronous IO

It is possible to significantly improve the performance of the writers by making use of asynchronous IO during read operations. The asynchronous IO process makes use of RAM to create buffers that enable the writers to continue with merge-sort operations during input-output processes, rather than having to wait for them to complete.

Requirements to use this feature:

  • You must have a grid environment set up for your restatements and recalculations.
    To implement asynchronous IO for your environment, set the following parameters in the server configuration (lvsrvr.cfg) file:
    • In the GENERAL SYSTEM PARAMETERS section, set the value of the parameter WRITER_ASYNC_IO to TRUE.
    • In the MEMORY CONFIGURATION section, set the value of the parameter WRITER_SERVER_RAM to a positive integer. This is the amount of memory, in kilobytes, that will be allotted to the process (only when asynchronous IO is in use).

Note: If you change any of the parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

For more information on the server configuration file (lvsrvr.cfg) parameters, see the Longview Installation Guide.

Published:

Performing server tasks using Longview Administrator Console

You can interact with the Longview Data Server in two ways:

  • Longview Server Manager—A Graphical User Interface (GUI)-based component, which is available from Longview Component Manager.
  • Longview Administrator Console—A line mode-based tool, which you can use to enter commands and parameters manually.

Users must have authorization for Longview Server Manager to work with Longview Administrator Console.

For information on creating and configuring users, see the Longview Application Administrator’s Guide.

For information on configuring Longview Administrator Console for a Windows authenticated user, see “Accessing the Longview Administrator Console”.

System Administrators can perform the following tasks in Longview Administrator Console:

Accessing the Longview Administrator Console

To simplify the process of accessing Longview Administrator Console, you should create a customized batch file for your system.

To create a batch file for Longview Administrator Console:

  1. Open your preferred text editor.
  2. Add the following lines to your file:

    @ECHO OFF

    SET KHALIXSERVERPATH=.\bin

    SET PATH=%PATH%;%KHALIXSERVERPATH%

    CLS

    ECHO The KHALIXSERVERPATH has been set to: %KHALIXSERVERPATH%

    @ECHO ON

    lvmgrl "bind serverhost adminport" "user userID pwd"

  3. Replace the following parameters:
    ParameterReplace with...

    serverhost

    the host name or address of the Data Server that Longview Administrator Console should connect to.

    For example, localhost or SQL0934.

    adminport

    the Data Server Administrator port. For example: 27999.

    userID

    the user ID. For example, jgordon. If you are using Windows Authentication, type system.

    pwd

    the user’s password. If you are using Windows Authentication, delete this parameter.

  4. Save the file as LongviewAdministratorConsole.bat.
  5. Double-click the file you created to open Longview Administrator Console.

Working with general commands

You can use Longview Administrator Console to perform several tasks related to connections and help.

For commands related to server status, see the table below.

Command

Parameter

Description

bind

host port

To bind to the server host and port.

user

userID password

User authorization to start and stop the server.

help

help ALL or help [Command Name]

To view online help for line mode commands.

ALL—To view a list of all line mode commands. Command Name—To view help for the specified command.

exit

 

To exit.

Working with server status

You can use Longview Administrator Console to perform several tasks related to server status.

For commands related to server status, see the table below.

Command

Parameter

Description

getid

 

To view the Longview Identifier (LID) of the Longview server, as specified in the SERVER_NAME parameter in the server configuration file (lvsrvr.cfg).

getport

 

To view the server listener port, as specified in the LISTENER_PORT parameter in the server configuration file (lvsrvr.cfg).

getrecalcdir

 

To view the current restatement folder for the set of data servers being managed by this lvmgr, as specified in the RECALC_FILE parameter in the server configuration file (lvsrvr.cfg).

getworkdir

 

To view the current working folder for the set of data servers being managed by this lvmgr, as specified in the WORK_DIRECTORY parameter in the server configuration file (lvsrvr.cfg).

reset

[restate]

To reset the restatement error code or to reset error codes.

When you reset the restatement error code or the servers error codes, users may be able to continue to work even while those errors still exist (depending on the type of error).

For example, if a command fails because there is not enough database space for its database to expand, the Longview data server sends an error message to every user who connects to the server. You may be able to use this command to clear the error message so that subsequent users do not see an error message while you are fixing the error.

However, in some cases, you need to correct the error before users can continue.
The optional parameter restate will reset the restatement error code, reset without a parameter will reset the server error codes.

Note: When resetting the restatement error code, exclusive mode will remain on. The restatement error code is set when a restatement fails.

start

 

To start the servers.

status

 

To view the status of the servers. Once you know the status of the servers, you can turn them on or off as necessary.
In addition, the status will indicate the state of the servers and whether they have encountered any errors.

stop

[immediate]

To stop the server, subject to warnings. Any submissions complete before the server stops.

The optional parameter immediate stops the server at once, regardless of connected users or jobs being processed. If you use stop immediate, you should have a business administrator check the data submission batches to ensure all the data was submitted.

Note: For more information on the server configuration file, see the Longview Installation Guide.

Working with queues

When a user submits data to the Longview database, each submission is logged in batch tables. When an error occurs during a batch submission, you can use Longview Administrator Console to check the batch tables for the status of the submission queues, and resume processing any outstanding submissions after the issues have been resolved. You can also use Longview Administrator Console to clear any outstanding batches.

For line mode commands related to queues, see the table below.

CommandParameterDescription

queue

show subm | math | writ | elim | all

To view the status of server queues. For more information, see “Viewing the status of server queues”.

recover

[queue | status | clear] 

[| subm | math | writ | elim | all]

queue—To recover the status of submission queues and resume processing. For more information, see “Recovering the status of submission queues (resume processing)”.

status—To recover the status of submission queues. For more information, see “Recovering the status of submission queues (do not resume processing)”.

clear—To clear outstanding batch submissions. For more information, see “Clearing outstanding batch submissions”.

Analyzing system data

You can use Longview Administrator Console to analyze various types of data and activity in your Longview system. The Longview data server tracking can help identify specific activities performed by users. For example, symbol maintenance and server model maintenance activities are listed in the Longview Data Server Log file.

For line mode commands related to system data, see the table below.

Command

Parameter

Description

archive

monitor | [filename]

To rename the Longview Data

Server Log (lv_dataserver.log) with a date/time stamp extension while servers are running. A new lv_dataserver.log file will automatically be created.

To use a name other than the default date/time stamp extension, provide the filename parameter. Archived log files are stored in the logs folder.

get

user all | connected | active n

To retrieve the following information about users: user all—user IDs of all users connected—all connected users active n—all users currently connected to the data server

get

node connected

To retrieve information on all grid nodes connected to the data server.

For more information, see “Polling the grid environment (Get Node Connected)”.

get

server id

To retrieve the server ID.

collect

statistics

To collect statistics.

Checking for duplicate data

Due to user error or other reasons, you may sometimes have duplicate data in your system. You can use Longview Administrator Console to check for duplicate data before you perform a data export or a restatement.

To check for duplicate data, type the following command in Longview Administrator Console:

CHECKDUPLICATE [FAMILY] [DATAOPTION] [PARTITION_LIST]

where:

  • FAMILY can be one of the following:
    ValueDescription

    BASE

    regular data

    SCHEDULE

    schedule data

    ALL

    both schedule and base data

    Note: If you omit FAMILY, all data is checked.

  • DATAOPTION can be one of the following:
    ValueDescription

    CALCULATED

    leaf and calculated data

    PARENT

    leaf and parent data

    ALL

    leaf, calculated, and parent data

    Note: If you omit DATAOPTION, all types of data are checked.

  • PARTITION_LIST is an optional parameter to specify the list of partitions you want to check. If you omit PARTITION_LIST, all partitions are checked.

    For example, to check for duplicate data in base calculated data in partitions P01 and P02, the syntax is:

    CHECKDUPLICATE BASE CALCULATED P01,P02

    To check for duplicate data in both data types and all partitions, the syntax is:

    CHECKDUPLICATE ALL

    ALL or simply:

    CHECKDUPLICATE

    When you run this command, a message identifying the number of duplicates appears on screen. The output of the duplicate values is saved to a file called duplicates.out in the server’s working directory. The output appears as follows:

Exporting and importing data in database tables

You can use Longview Administrator Console to export and import the data in database tables. (However, you cannot export or import the structure of the tables.) You can use these export and import utilities to perform several tasks.

Task

Description

clean up leaf data

You can use the export and import utilities to clean up:

  • data corresponding to deleted symbols
  • data corresponding to symbol indexes out of the valid range
  • non-static parent data in the leaf tables
  • data with a value of 0.0
  • data with empty character strings

repartition leaf data

You can redistribute leaf data properly.

reorganize symbol indexes

You can collapse deleted symbol gaps, and then reorganize existing symbol lists, collapse out deleted symbols, and re-index all existing data to use the new index coordinates.

perform data transfers across platforms

The import and export utilities provide flexible data transfers by creating Longview-related binary files independent of the Longview data server platform.

For line mode commands related to importing and exporting, see the table below.

Command

Description

export [system [affectedonly | raw] | systemdata [affectedonly | raw] | affectedonly | raw] [TO Name]

To export your Longview data server data to a binary file.

import system | systemdata | data [FROM Name]

To import your Longview data server data from binary files to a table.

Exporting database tables

The Export utility extracts the appropriate Longview data server tables, creating multiple binary files that can be stored or subsequently imported. (It does not export any tables whose name starts with klx_ic or calculated and parent data.)

The Export utility does not alter any data on the actual tables. The server must be running before you can use the Export utility.

The Export utility performs the following tasks.

  1. Based on the Master Symbol table (lv_master_symbol), it creates new temporary index mappings to eliminate deleted symbols and out of range symbols.

    Using the new mapping and specified options, it converts data from the existing tables to an output file. The name of the export file is exp_data.nnnn, where nnnn is 0001 to 9999. The file is saved in the folder specified by the RECALC_FILES parameter in the server configuration file (lvsrvr.cfg).

  2. The size of each output file cannot exceed the size specified in the MAX_EXPORT_FILE_SIZE parameter in the server configuration file (lvsrvr.cfg). If the amount of data exceeds the specified size, the data is saved in multiple output files.

    Note: Note For more information on the server configuration file, see the Longview Installation Guide.

  3. It eliminates data as follows:

    1. If data in the output files is from data tables, it eliminates data with empty strings or a numeric value of 0.

    2. If data in the output files is from leaf tables, it eliminates non-static parent data.

  4. It creates an import control file for referencing the output files to the original tables. The name of the import control file is exp_cntl.lv. The import control file is created in the RECALC_FILES folder as specified in the server configuration file (lvsrvr.cfg).

  5. It creates a log file which contains details of the specific tables and number of rows exported. The name of the log file is export.log. The export log file is created in the RECALC_FILES folder as specified in the server configuration file (lvsrvr.cfg).

To run the Export utility, use the following command:

export [system [affectedonly | raw] | systemdata [affectedonly | raw] | affectedonly | raw] [TO name]

where:

FieldDescription

No parameter

Export all system, system data, and leaf data tables with the default export name exp.

  • Do not specify a parameter for ExportType to:
  • reorganize the Longview data server database structure and optimize performance
  • export system tables and leaf data for the purpose of leaf-level repartitioning
  • copy the database to another Longview instance
  • create an exact backup of your database. However, Longview recommends that for disaster recovery procedures, you use the RDBMS software.

system

To export main system tables in the Longview data server database, including metadata tables such as the dimension and symbol tables.

Use this option to:

  • copy the symbols and hierarchy of a database to another database
  • reorganize the Longview data server database structure and optimize performance when no data exists

systemdata

To export as system, but with the addition of journal entry, batch, locking, symbol statistics, shared files, and models. Use this option to copy the symbols and hierarchy of a database to another database, along with the additional tables.

affectedonly

To export only tables that would be affected by symbol reindexing. Use this option to reduce the number of tables to export and import. However, it is not suitable if you are using the Export utility to create a backup.

raw

To export the database in its raw state without removing and resequencing deleted symbols. Use this option when you want to have an exact snapshot of a database.

name

Use this parameter to provide a name for the export. This parameter allows you to create multiple exports. The default name of the export if not provided is exp. If an export of the same name already exists it will overwrite the export with the same name.

The export name cannot:

  • be more than 64 characters long.

  • cannot contain characters \ / * ? “ < > | % $ or spaces.

Command example

export TO Full_Export_Backup

Importing database tables

The Import utility reads binary files created by the Export utility and restores the appropriate data server tables. If you want to change the number of partitions, prior to using the import data command, use the DBScript utility to add the additional data tables or delete data tables.

Caution: After you export data, you must import the system/system data as your first step, before you import data. Otherwise, your data may refer to invalid symbol references. If you choose to make subsequent imports with the same export file, you don’t need to import the system again (until a new export is made).

To run the Import utility, type the following line mode command:

Import system | systemdata | data [FROM name]

where:

ValueDescription

system

To import the main system tables into the Longview database.

All non-data tables are truncated according to the information provided in the export control file. The data is then loaded into the appropriate system tables.

You must stop the Longview server before you select this option.

systemdata

To import as system, but with the addition of journal entry, batch, locking, symbol statistics, shared files, models, and intercompany tables. You must stop the Longview server before you select this option.

data

Use this option to:

  • import data tables into the Longview database.
  • import leaf data into the Longview database for the purpose of repartitioning and switching parent symbols.

All leaf data tables are truncated according to the information provided in the export control file. The data is then loaded into the appropriate leaf data tables.

You must start the Longview server before you select this option.

nameUse this option to provide the name of the export file to import.

Caution: After you import data, stop, and start the servers and run an enterprise restatement. If you don’t stop and start the servers first, data may not calculate correctly.

Command example:

import systemdata FROM Full_Export_Backup

import data FROM Full_Export_Backup

Using importing and exporting to change partitioning

One of the main uses for the import and export utilities is to allow for easier repartitioning of an existing data server database.

To repartition a data server database, follow these steps.

  1. Export the data server database.
  2. Shut down the server.
  3. Using the system or the systemdata option, import the output files created in step 1.
  4. Change partition strategy by changing information in the Partitions table (lv_partitions) and the sym_partition column in the Master Symbol table (lv_master_symbol).
  5. Start the server.
  6. Import the contents of the output files using the data option.
  7. After the import data leaf has completed successfully, stop, and start the servers, and perform an enterprise restatement.
    For more information, see “Working with restatements and recalculations”.

Working with restatements and recalculations

An enterprise restatement is a mode of calculation in which a rollup of the entire data server database is performed to make all values current. An enterprise restatement is required to calculate the effect of major changes throughout the database.

A partition recalculation is a mode of calculation in which a recalculation of one partition is performed to make all values current. A partition recalculation is required to calculate the effect of changes confined to a single partition.

You can use Longview Administrator Console to create, edit, run, and delete enterprise restatements and partition recalculations.

For line mode commands related to restatements and recalculations, see the table below.

Command

Parameter

Description

begin

restate | recalc

To begin a restatement or recalculation.

end

restate | recalc

To end a restatement or recalculation.

This command must be used if the begin command was used.

recalc

[loadonly] unadjusted | adjusting | partition(s)

To perform a partition recalculation. All is not a valid parameter for partitions. To recalculate all partitions, use the restate command.

recalc

eliminations all | Partition

[,Partition[,...]] [[ignore unchanged]]

To perform a recalculation for eliminations. To perform a partition recalculation for eliminations, specify the Partition option.

recalc

journals

To perform a recalculation for journal entries.

recalc

audit recover

This command is used to recover data from audit tables, and it can only be performed when there is no one connected to the Longview system. This feature also behaves directly according to the value in USE_DATA_AUDIT_TRAIL.

Note: For more information on USE_DATA_AUDIT_TRAIL, see the Longview Installation Guide.

recalc

audit reset

The command is used to reset the information in audit tables, and it behaves differently according to the value in USE_DATA_AUDIT_TRAIL

Note: For more information on USE_DATA_AUDIT_TRAIL, see the Longview Installation Guide.

restate

[loadonly] unadjusted | adjusting

To perform an enterprise restatement.

Partition recalculation does not guarantee data integrity under the following scenarios:

  • If the specified partition or partitions do not cover all input leaf data needed to generate data for the specified partition or partitions.
  • If there is output data generated not within the specified partition or partitions. A warning message appears in the Data Server Log file:

The output data generated to the following partitions were filtered out during partition recalc on specified_partition_name: list_of_partitions.

Note: When a restatement or recalculation fails, the system will remain in exclusive mode and the restate error code will be set. In addition, a restate_recalc_errors log file is created containing the errors that occurred during the restatement or recalculation.
To clear the exclusive mode a successful restatement or recalculation needs to be ran or stopping and re-starting of the servers.

Creating a manual grid environment for restatements

Longview applications on Windows platforms can run the math portion of restatements across a grid environment, consisting of a grid server and several grid node machines. This feature introduces an enhanced degree of scalability to restatement functionality, allowing several computers to participate in the calculation process, greatly increasing performance.

To create a manual grid environment, follow these steps:

  1. Set the following server configuration file (lvsrvr.cfg) parameters in the Data Server:
    • USE_GRID_PROCESSING must be set to TRUE.Optionally, you can set the name of the grid server using the GRID_SERVICE_NAME parameter (by default, the grid server name is ks_math).
    • GRID_PROCESSING_TYPE must be set to LVGRID.
    • GRID_LISTENER_PORT must be configured with a port number. The GRID_LISTENER_PORT set in each of the grid node machines must match this value.
    • GRID_CURSORS_MAX must be set to an integer between 1 and 12 (the default value is 4)

    Note: If you change any of the LVGRID parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

  2. Install the grid node software on the machines to participate in the grid. For more information on installing grid software and working with the server configuration file (lvsrvr.cfg) file, see the Longview Installation Guide.
  3. Use the line mode command GET NODE CONNECTED to get all connected grid node machines involved in the restatement.
    For more information, see “Polling the grid environment (Get Node Connected)”.

When a restatement runs in a grid environment, a lv_dataserver.log is created on each grid node machine. As jobs are sent to the grid node machines, messages in the master lv_dataserver.log file (on the grid server) are sent to indicate that a calculation job was sent and when the job was completed. Once all of the math jobs have completed, the writers merge all records together and load as usual. If an error occurs on any of the grid node machines, the restatement process is terminated and must be run again.

Note: The grid restatement functionality supports Oracle and SQL on the Windows operating system.

For more information on this feature, contact Longview Support Services.

Polling the grid environment (Get Node Connected)

It is possible to get an overall view of what is going on in the grid environment and how it is composed by issuing the Get Node Connected command. This command will return a table with the following information for each grid node machine:

FieldDescription

Node ID

The ID number of a computer participating in the grid environment.

Node Host

The network address of the grid node machine.

Num Math

The number of math servers running on the grid node machine.

Num Jobs

The number of jobs that the grid node machine has queued up on it, running or pending.

Creating a DataSynapse grid environment for restatements

DataSynapse is a third-party application for managing a grid environment (a network consisting of a grid server and several grid node machines) and can be used in conjunction with Longview for restatements. DataSynapse creates a dynamic environment that responds to changes in workload and resource availability to make efficient use of computers, networks, and grids to more quickly perform time and resource intensive processes. Effectively, Longview continues to administer the higher processes of the restatement, such as sending math jobs to DataSynapse and writing the output files to the grid server, while DataSynapse oversees the distribution of math jobs over the grid. For more information, see the DataSynapse documentation.

To create a DataSynapse grid environment, follow these steps.

  1. DataSynapse must be installed and configured. For more information, see the DataSynapse documentation.
  2. Set the following server configuration file (lvsrvr.cfg) parameters in the Data Server:
    • USE_GRID_PROCESSING must be set to TRUE.
    • GRID_PROCESSING_TYPE must be set to DATASYNAPSE.
    • GRID_LISTENER_PORT must be configured with a port number. The GRID_LISTENER_PORT set in each of the grid node machines must match this value.
    • GRID_OUTPUT_MAX_THREADS must be set to an integer between 1 and 80 (the default value is 5).
    • GRID_CURSORS_MAX must be set to an integer between 1 and 12 (the default value is 4).

      Note: If you change any of the LVGRID parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

    • Optionally, you can set the name of the grid server using the GRID_SERVICE_NAME parameter (by default, the grid server name is ks_math).

For more information on the server configuration file (lvsrvr.cfg) parameters, see the Longview Installation Guide.

While the grid server continues to log the sending and receiving of jobs (in this case, to DataSynapse), in this configuration, it will not log the actual activity of the math jobs to a lv_dataserver.log file. Logs of math job activity are managed by each grid node machine and stored in the log file structure established to serve DataSynapse.

Improving performance with asynchronous IO

It is possible to significantly improve the performance of the writers by making use of asynchronous IO during read operations. The asynchronous IO process makes use of RAM to create buffers that enable the writers to continue with merge-sort operations during input-output processes, rather than having to wait for them to complete.

Requirements to use this feature:

  • You must have a grid environment set up for your restatements and recalculations.
    To implement asynchronous IO for your environment, set the following parameters in the server configuration (lvsrvr.cfg) file:
    • In the GENERAL SYSTEM PARAMETERS section, set the value of the parameter WRITER_ASYNC_IO to TRUE.
    • In the MEMORY CONFIGURATION section, set the value of the parameter WRITER_SERVER_RAM to a positive integer. This is the amount of memory, in kilobytes, that will be allotted to the process (only when asynchronous IO is in use).

Note: If you change any of the parameters in the lvsrvr.cfg file, you must stop and restart the servers and the Longview_LID service.

For more information on the server configuration file (lvsrvr.cfg) parameters, see the Longview Installation Guide.

For an optimal Community experience, Please view on Desktop