Setting disk space capacity for data snapshot files using the command line

You can use wsadmin to query and set a disk space capacity to be used as a trigger for automatically deleting data snapshot files that are captured as a result of Cross-Component Trace operations.

Before you begin

For a description of Cross-Component Trace, see Cross-component trace overview.

About this task

This task describes how to use the wsadmin command to set a disk space capacity as a threshold for initiating an automated clean-up operation of the disk holding the data snapshot files that are captured as a result of Cross-Component Trace operations.

The system deletes the data snapshot files periodically based on a disk space use parameter.

Procedure

  1. To determine the maximum allowed disk space capacity, perform the following steps:
    1. Open a command window.

      The wsadmin command can be found at the <WPS>/profiles/<dmgr profile>/bin directory or the <WPS>>/bin directory.

    2. At the command prompt, enter the wsadmin command to enter the wsadmin environment.
    3. Query the Cross-component trace Resources MBean:
      set xctBean [$AdminControl queryNames *:*,type=XCTResourcesMBean] 
    4. Call the getSnapshotCapacity command on the MBean
      $AdminControl invoke $xctBean getSnapshotCapacity
  2. To set disk space capacity, perform the following steps:
    1. At the command prompt, enter the wsadmin command to enter the wsadmin environment.

      The wsadmin command can be found at the <WPS>/profiles/<dmgr profile>/bin directory or the <WPS>>/bin directory.

    2. At the command prompt, enter the wsadmin command to enter the wsadmin environment.
    3. Query the Cross-component trace Resources MBean:
      set xctBean [$AdminControl queryNames *:*,type=XCTResourcesMBean] 
    4. Call the setSnapshotCapacity command on the MBean:
      $AdminControl invoke $xctBean setSnapshotCapacity limit
      Where limit is the disk space use allowed in megabytes.
      Note: There is a minimum level of 50 MB. Settings below this minimum are converted to the minimum. Setting of 0 or less than 0 (-1, -2...) results in 0 and turns off the automatic delete feature.

      The value you enter represents a threshold. When the threshold is exceeded, the system automatically deletes data snapshot files from the disk. The files are deleted in a sequential fashion, from oldest to most recent, until the system achieves the disk space required to write the next data snapshot, while remaining below the disk use threshold.

Example

The following command is an example of setting the disk capacity for data snapshot files at 500 MB:
wsadmin -connType SOAP -host myDmgr -port 8879 -user dmgradmin -password dmgrpass 
> set xctBean [$AdminControl queryNames *:*,type=XCTResourcesMBean] 
> $AdminControl invoke $xctBean setSnapshotCapacity 500