Changing the temporary directory

There are multiple methods to change the temporary directory location.

  • Method 1: Edit the hpsum.ini file from a write-able directory. For more information, see Editing a default hpsum.ini file.


    [NOTE: ]

    NOTE: If the environmental variable TMPDIR is set, HP SUM does one of the following:

    • Create the directory localhpsum in the TMPDIR directory and copy HP SUM necessary files to the directory.

    • If you do not create the directory localhpsum, HP SUM uses the default directories, /tmp (Linux) and %temp% (Windows).


  • Method 2: Write a script to change the hpsum.ini file from a write-able directory.

    1. From a Windows system command line:

      Type:

      echo [Engine] > hpsum.ini
      echo temp_dir=c:/hpsum/logs >> hpsum.ini
      hpsum
      
    2. Exit the command line.

    1. From a Linux system command line:

      Type:

      echo "[Engine]" > hpsum.ini
      echo "temp_dir=/use/john/hpsum/logs" >> hpsum.ini
      ./hpsum
      
    2. Exit the command line.

  • Method 3: Generate the hpsum.ini file when you run HP SUM from a non-writeable directory that redirects other files to the new location.

    From a Windows system command line:

    Type:

    1. mkdir %temp%\HPSUM

      echo [Engine] > %temp%\HPSUM\hpsum.ini

      echo temp_dir=c:/hpsum/logs >> %temp%\HPSUM\hpsum.ini

      hpsum

    2. Exit the command line.

    From a Linux system command line:

    Type:

    1. mkdir /tmp/HPSUM

      echo "[Engine]" > /tmp/HPSUM/hpsum.ini

      echo "temp_dir=/use/john/hpsum/logs" >> /tmp/HPSUM/hpsum.ini

      ./hpsum

    2. Exit the command line.

  • Method 4: Set the TEMP directory before starting HP SUM on a Windows system.

    1. From a Windows system command line:

      Type:

      set TEMP=c:\hpsum\logs
      hpsum
      
    2. Exit the command line.

  • Method 5: (Linux only) Create a symbolic link from /tmp/HPSUM to another directory before launching HP SUM.

    • Type:

      -mkdir /opt/hp/HPSUM
      -ln —s /opt/hp/HPSUM /tmp/HPSUM