Usage files can be created in each user's home directory,
or they can be created in a central location for all users.
With utilization tracking enabled, when a compiler user compiles
a program, a
.cuf file is automatically created
in the user's home directory in case the file does not exist.
This is convenient for testing the utilization tracking feature because users already have write access to their own home directories,
which means no additional setup is required. However, this might have
the following issues:
- Compiler users might not know that the file has been created or
what it is when they see the file. In this case, they might delete
the file.
- Some users' home directories might be on file systems that are
mounted from a remote system. This causes utilization tracking to
use a remote file, which might affect performance.
- Compiler users might not want usage files to take up space in
the /home directory.
A good alternative is to set up a central location where the usage
files can be created, and provide appropriate access to that location
for both the compiler users and the utilization reporting tool users.
This can be set up by using the other/world permissions
or by using group permissions.
For example, if the central location is a directory named
/var/tmp/track_compiler_use,
you can modify the
-qusagefileloc entry
in the utilization tracking configuration file as follows:
-qusagefileloc=/var/tmp/track_compiler_use/$LOGNAME.cuf
This creates a .cuf file for each user in
the specified location, such as user1.cuf or user2.cuf.
It is easier to run the utilization reporting tool to generate the
usage report from the .cuf files in this central
location. You only need to pass the path of the location, /var/tmp/track_compiler_use to
the utilization reporting tool , and then the tool can read all the .cuf files
in that location.
If the compiler users are running the compiler on more than one
machine, you need to add
$HOSTNAME to the
-qusagefileloc entry
to ensure that there are no collisions in the file names. For example,
you can specify the
-qusagefileloc entry as follows:
-qusagefileloc=/var/tmp/track_compiler_use/$HOSTNAME_$LOGNAME.cuf
This creates a .cuf file for each user, and
the name of that .cuf file also contains the
name of the host on which the compiler is used, such as host1_user1.cuf.