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?
Component: Dollar Universe Application Server (DUAS)
Release: 6.x, 7.x
OS: Linux (Red Hat)
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
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
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.
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