unibatchenv file not getting deleted in temp directory
search cancel

unibatchenv file not getting deleted in temp directory

book

Article ID: 383157

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

On some of the Linux servers we observed that the unibatchenv.* files created under temp directories are not getting removed, automatically. Due to this the temp directory size on these nodes increased to 25GB.

Can you please help us with below information

1: Why unibatchenv files are created under temp directory?

2: Can we remove the files in temp directory which are from last 2/3 years or the one which are unused without restarting the node?

3: What can be the cause that these files are not getting removed?

Environment

Component: Dollar Universe Application Server (DUAS)

Release: 6.x, 7.x

OS: Linux (Red Hat)

Cause

With review of the logs it looks like that the node is unable to remove the file in the temp directory, as there are sticky bit set on /temp directory. It can be validated by running below command

ls -ld $U_INSTALL_DIR/temp

#output  

> drwxrwxrwt     #### owner group ####### $U_NODE_INSTALL_DIR/temp 

Resolution

1: Why unibatchenv files are created under temp directory?

These files are created for each job submission as part of product design and creation of these files can't be skipped. These files ideally should be removed after the Job execution is completed.

2: Can we remove the files in temp directory which are from last 2/3 years or the one which are unused without restarting the node?

The files under temp directory can be removed as below

A: With Node Stopped 

    1. Load the environment
    2. Stop the Node
    3. Remove the files under $U_INSTALL_DIR/temp/
    4. Start the Node

B: Without Node Stopped 

Note: Please do it with caution to make sure you only selecting and removing the files which are not related/referenced by any running Jobs.

    1. Navigate to $U_INSTALL_DIR/temp directory
    2. Have a filter to select files which are very old and not being referenced in any running job
    3. Remove the selected files identified by filter in step 2

3: What can be the cause that these files are not getting removed?

The setting of sticky bit on temp directory is preventing the deletion of unibatchenv.* files from temp directory on Job completion. Remove the sticky bit on /$U_INSTALL_DIR/temp directory 

         Command to remove sticky bit

         chmod -t /$U_INSTALL_DIR/temp