Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

Deleting Outdated Records With dbwriter

To delete outdated records in the reporting database, you must specify a deletion rule in the delete tag. The following table lists the attributes of the delete tag:

Attribute

Description

scope

The type of data to delete. Valid entries are the following:

  • job

  • job_log

  • share_log

  • host_values

  • queue_values

  • project_values

  • department_values

  • user_values

  • group_values

time_range

The unit of time_amount:

time_amount

Number of units (time_range) during which a record is to be kept.

The following table lists a subelement of the delete tag:

sub_scope

For certain scopes, a subscope can be configured. The subscope specifies an additional condition for deletion. A subscope can be configured for all *_values scopes and for the share_log scope.

If a subscope is configured for a *_values rule, it contains a list of variables to delete, separated by spaces.

If a subscope is specified for the share_log, it contains a list of share-tree nodes to delete, separated by spaces.

If subscope are used, you should always have a fallback rule without subscope, which will delete all objects that are not explicitly named by the subscope.

Here is an example of a delete tag:

<?xml version="1.0" encoding="UTF-8"?>
<DbWriterConfig>
  <!-- keep host values for 2 years -->
  <delete scope="host_values" time_range="year" time_amount="2"/>

  <!-- keep queue values one month -->
  <delete scope="queue_values" time_range="month" time_amount="1">
    <sub_scope>slots</sub_scope>
    <sub_scope>state</sub_scope>
  </delete>
</DbWriterConfig>

Accounting and Usage Statistics (qacct)

You can use the qacct command to generate alphanumeric accounting statistics. If you specify no options, qacct displays the aggregate usage on all machines of the cluster, as generated by all jobs that have finished and that are contained in the cluster accounting file sge-root/cell/common/accounting. In this case, qacct reports three times, in seconds:

  • Real time - Wall clock time, which is the time between when the job starts and when it finishes

  • User time - CPU time spent in user processes

  • System time - CPU time spent in system calls

Several options are available for reporting accounting information about queues, users, and the like. In particular, you can use the qacct -l command to request information about all jobs that have finished and that match a resource requirement specification.

Use the qacct -j [job-id | job-name] command to get direct access to the complete resource usage information stored by the grid engine system. This information includes the information that is provided by the getrusage system call.

The -j option reports the resource usage entry for the jobs with job-id or with job-name. If no argument is given, all jobs contained in the referenced accounting file are displayed. If a job ID is specified, and if more than one entry is displayed, one of the following is true:

  • Job ID numbers have wrapped around. The range for job IDs is 1 through 999999.

  • A checkpointing job that migrated is displayed.

See the qacct(1) man page for more information.

Backing Up the Grid Engine System Configuration

You can back up your grid engine system configuration files automatically. The automatic backup process uses a configuration file called backup_template.conf. The backup configuration file is located by default in sge-root/util/install_modules/backup_template.conf.

The backup configuration file must define the following elements:

  • The grid engine system root directory.

  • The grid engine system cell directory.

  • The grid engine system backup directory.

  • Type of backup. Your backup can be just the grid engine system configuration files, or the backup can be a compressed tar file that contains the configuration files.

  • The file name of the backup file.

The backup template file looks like the following example:

##################################################
# Autobackup Configuration File Template
##################################################

# Please, enter your SGE_ROOT here (mandatory)
SGE_ROOT=""

# Please, enter your SGE_CELL here (mandatory)
SGE_CELL=""

# Please, enter your Backup Directory here
# After backup you will find your backup files here (mandatory)
# The autobackup will add a time /date combination to this dirname
# to prevent an overwriting!
BACKUP_DIR=""

# Please, enter true to get a tar/gz package
# and false to copy the files only (mandatory)
TAR="true"

# Please, enter the backup file name here. (mandatory)
BACKUP_FILE="backup.tar" 

Previous Previous     Contents     Index     Next Next