Linux Data Collector Prerequisites: Changing the Linux Temporary Directory for Collection
IT Analytics uses temporary files on the target server for command output. The location of the temporary files is controlled by the TMPDIR environment variable, defaulting to /tmp.
IT Analytics executes commands on the target NetBackup server using a non-interactive Bourne login shell (/bin/sh -l). On most systems this means that the /etc/profile (when a login type of connection like ssh or scp is used) and ${HOME}/.bashrc (when non-interactive connection like shell exec is used) files will be sourced and can be used to set the TMPDIR environment variable.
Log into the collection account on the target server.
Modify ${HOME}/.bashrc, set and export TMPDIR:
TMPDIR=/path/to/tmp export TMPDIR
For the NetBackup appliance: all CLI users share the
/home/nbusersdirectory. To only change theTMPDIRdirectory for the collection user, you must first check the logged-in user. For example:if [ "${USER}" = "itanalytics" ] ; then TMPDIR=/path/to/tmp export TMPDIR fiTo test, run the following command and verify that it returns the configured TMPDIR:
$ ssh <username>@127.0.0.1 '/bin/sh -l -c "echo \${TMPDIR}"' /path/to/tmpNote:
There may be additional output before the TMPDIR path, for example the NBU appliance displays a banner.
The TMPDIR can be set either for all or a select set of target servers in a collector using the advanced parameter: NBU_SSH_TMPDIR. This value will be overridden if TMPDIR is set in the profile on the target server.
NBU_SSH_TMPDIR=/path/to/tm