Usage file location

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:

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.