Managing the Database and Intermediate Files

prevnext

Managing the Database and Intermediate Files

 

The following sections describe how to manage the Log Central database and the Central Collector intermediate files:

Working with the Storage Maintenance Tool

Deleting Database Records

Deleting Intermediate Files

Creating a Processing Script

Processing Records on a One-Time Basis

Processing Records and Files on a Schedule

Working with the Storage Maintenance Tool

The Storage Maintenance tool enables you to delete and to execute processing scripts for database records and intermediate files.

The following sections explain how to use the Storage Maintenance tool:

Starting the Storage Maintenance Tool

Main Components of the Storage Maintenance Tool

Storage Maintenance Tool Toolbar

Storage Maintenance Tool Menus

Starting the Storage Maintenance Tool

To start the Storage Maintenance tool:

  1. Start the Log Central Console by running lc_launch on the central host.

    For detailed information about starting the Console, see Introducing the Log Central Console. For the lc_launch command syntax, see Commands.

  2. Click Storage Maint. Log Central displays the Storage Maintenance tool.

    Figure 7-1 Storage Maintenance Tool

Main Components of the Storage Maintenance Tool

The following table describes the main components of the Storage Maintenance tool.

Table 7-1 Main Components of the Storage Maintenance Tool

Component

Description

Menu bar

Provides the menus for the Storage Maintenance tool. For more information, see Storage Maintenance Tool Menus.

Toolbar

Provides access to frequently used actions. For more information, see Storage Maintenance Tool Toolbar.

Message Tabs

The Messages in Database tab displays the number of messages delivered to the database during each hour of the day. The Intermediate Message Files tab displays the names of the Central Collector's intermediate files.

Storage Maintenance Tool Toolbar

The following table describes the Storage Maintenance tool toolbar.

Table 7-2 Storage Maintenance Tool Toolbar

Button

Action


Displays the Operations Settings window. This window enables you to:

You can also use the Operations command in the Settings menu to display the Operations Settings window.


Refreshes the display to show the current database records and intermediate files.


Displays the Log Central Online Help. You can also use the commands in the Help menu to display the Log Central Online Help.

Storage Maintenance Tool Menus

The following table describes the Message Browser menus.

Table 7-3 Storage Maintenance Tool Menus

Menu

Commands

File

Process Records—Executes the process_dbrec script for the selected database records. This command is available only if the Messages in Database tab is selected. For more information about process_dbrec, see Creating a Processing Script.

Delete—Deletes the selected database records and intermediate files. You can delete an intermediate file only after all the associated messages have been uploaded to the Log Central database.

Close—Exits the Storage Maintenance tool.

Settings

Operations—Displays the Operations Settings window. This window enables you to:

You can also use the Settings button in the toolbar to display the Operations Settings window.

Help

Displays the Log Central Online Help for various Storage Maintenance tool help topics. You can also use the Help button in the toolbar to display the Log Central Online Help.

Deleting Database Records

To schedule the deletion of database records:

  1. Start the Storage Maintenance tool:

    1. Start the Log Central Console by running lc_launch on the central host.

      For detailed information about starting the Console, see Introducing the Log Central Console. For the lc_launch command syntax, see Commands.

    2. Click Storage Maint. Log Central displays the Storage Maintenance tool.

  2. Click Settings.

    The Storage Maintenance tool displays the Operations Settings window.

    Figure 7-2 Operations Settings Window

  3. Select the Messages in Database tab.

  4. Select the Delete Records checkbox.

  5. Set the start time for the deletion.

  6. Specify how often to repeat the deletion.

    To perform the deletion only once, deselect the Repeat Every checkbox.

  7. Specify which records to delete.

    You can instruct Log Central to delete records based on age or based on a range of dates.

  8. Click OK.

Deleting Intermediate Files

Log Central deletes intermediate files only after all their messages have been stored in the database.

To schedule the deletion of intermediate files:

  1. Start the Storage Maintenance tool:

    1. Start the Log Central Console by running lc_launch on the central host.

      For detailed information about starting the Console, see Introducing the Log Central Console. For the lc_launch command syntax, see Commands.

    2. Click Storage Maint. Log Central displays the Storage Maintenance tool.

  2. Click Settings.

    The Storage Maintenance tool displays the Operations Settings window.

    Figure 7-3 Operations Settings Window

  3. Select the Intermediate Message Files tab.

  4. Set the start time for the deletion.

  5. Specify how often to repeat the deletion.

  6. Set the age of the files to delete.

  7. Click OK.

Creating a Processing Script

Log Central can execute a script on its intermediate files and on messages in the database. Log Central provides the process_dbrec script as a sample file. The file is a shell script on UNIX machines or a batch file on Windows NT. The file includes comments that describe how to use it. The script does not do anything as shipped. The Storage Maintenance tool lets you specify how frequently to run the script. You can also run the script one time by using the Process Records command in the File menu. See Processing Records on a One-Time Basis.

Some of the things you can modify the script to do include:

  • Generating an email message that lists which messages were deleted and the date and time of the deletion

  • Copying the archive file to a tape

  • Using an SQL statement to move records to a different table in the Log Central database

The script uses the following syntax:

process_dbrec starttime endtime

The following table describes the input arguments.

Table 7-4 Input Arguments for process_dbrec

Argument

Description

starttime

The time to start running the script. A value of 0 specifies to process all records before endtime.

endtime

The time to quit running the script.

Your script can use these arguments as needed. To set these arguments, set the From and To fields in the Message in Database tab in the Operations Settings window.

Do not put any commands in the script, such as echo, that write to the standard output terminal. The standard output terminal is not available in this context.

Log Central expects the script to return -1 if there is an error or 0 it if runs successfully. Records are deleted only after the script runs successfully, even if you selected the Delete Records option.

To create a processing script:

  1. With a text editor, open the file install_dir/bin/process_dbrec.bat (NT) or install_dir/bin/process_dbrec (UNIX), where install_dir is the directory where you installed Log Central.

  2. Modify the script.

  3. Save the script.

Processing Records on a One-Time Basis

You can run the processing script on selected database records on a "one shot" basis. This operation is not valid for intermediate files.

To run the processing script one time:

  1. Create a processing script as described in Creating a Processing Script.

  2. Start the Storage Maintenance tool:

    1. Start the Log Central Console by running lc_launch on the central host.

      For detailed information about starting the Console, see Introducing the Log Central Console. For the lc_launch command syntax, see Commands.

    2. Click Storage Maint. Log Central displays the Storage Maintenance tool.

  3. Select the Messages in Database tab.

    Figure 7-4 Messages in Database Tab

  4. Select the records to process.

  5. From the File menu, choose Process Records.

Processing Records and Files on a Schedule

To schedule the processing script:

  1. Create a processing script as described in Creating a Processing Script.

  2. Start the Storage Maintenance tool:

    1. Start the Log Central Console by running lc_launch on the central host.

      For detailed information about starting the Console, see Introducing the Log Central Console. For the lc_launch command syntax, see Commands.

    2. Click Storage Maint. Log Central displays the Storage Maintenance tool.

  3. Click Settings.

    The Storage Maintenance tool displays the Operations Settings window.

    Figure 7-5 Operations Settings Window

  4. Select the Messages in Database tab.

  5. Select the Process Records checkbox.

  6. Optionally, select the Delete Records checkbox.

    Log Central will delete database records after running the script. Log Central deletes intermediate files only after all their messages have been stored in the database.

  7. Set the start time for the script.

  8. Specify how often to run the script.

    To run the script only once, deselect the Repeat Every checkbox.

  9. Specify which records to run the script on.

    You can tell Log Central to run the script on records based on age or based on a range of dates.

  10. Click OK.

prevnext

 

Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.