Previous Topic: Spool Files for UNIX WorkloadNext Topic: Clear UNIX Spool Files Using Scripts


Configure the Agent to Clear Spool Files Automatically

You can configure the agent to automatically clear the UNIX workload spool files by modifying the agentparm.txt file. You can also set parameters to specify a file expiration time and sleep time.

Note: The agent logs the spool-file cleanup activity in the runner_spool_cleaner.log log, located in the agent's log directory.

To configure the agent to clear spool files automatically

  1. Open a PASE terminal session.
  2. Change to the agent installation directory.
  3. Stop the agent.
  4. Open the agentparm.txt file located in the agent installation directory.
  5. Edit the the following parameter:
    runnerplugin.spool.clean.enable=true
    
  6. (Optional) Edit the following additional parameters:
    runnerplugin.spool.expire=n D|H|M|S

    Specifies the file expiration time. The agent deletes spool files that are older than this value.

    n

    Specifies the time period.

    D

    Specifies the time period unit as days.

    H

    Specifies the time period unit as hours.

    M

    Specifies the time period unit as minutes.

    S

    Specifies the time period unit as seconds.

    Default: 10D (10 days)

    runnerplugin.spool.sleep=n D|H|M|S

    Specifies the sleep interval. At every interval, the agent checks for spool files that meet the expiration time and deletes them.

    Default: 1D (1 day)

  7. Save and close the agentparm.txt file.
  8. Start the subsystem that runs the agent if it has stopped.
  9. Start the agent.

    The agent is configured to clear spool files automatically.

Example: Delete Spool Files Older Than 10 Days

Suppose that you want to configure the agent to check the spool files every 36 hours and delete spool files that are older than 10 days.

Add the indicated values to the following parameters in the agentparm.txt file:

runnerplugin.spool.clean.enable=true
runnerplugin.spool.expire=10D
runnerplugin.spool.sleep=36H

The agent deletes spool files that are older than 10 days.

Example: Check Spool Files When the Sleep Interval Is Greater Than the File Expiration Time

Suppose that you want to configure the agent to check the spool files every 50 minutes and delete spool files that are older than 50 minutes as specified by runnerplugin.spool.expire.

Add the indicated values to the following parameters in the agentparm.txt file:

runnerplugin.spool.clean.enable=true
runnerplugin.spool.expire=50M
runnerplugin.spool.sleep=2H

The agent ignores the two hour sleep interval set by runnerplugin.spool.sleep.