Tracking Module Usage

From HPC users
Revision as of 14:33, 16 February 2023 by Harfst (talk | contribs)
Jump to navigationJump to search

Instruction are available from https://lmod.readthedocs.io/en/latest/300_tracking_module_usage.html

Trying to implement on master04:

  • for testing created SitePackage.lua in /user/lees4820/lmod
  • executed export LMOD_PACKAGE_PATH=/user/lees4820/lmod
  • checked if setup works:
$ module --config 2>&1 | grep 'Site Pkg'
Site Pkg location                  /user/lees4820/lmod/SitePackage.lua
  • test if logging works:
$ module load foss
# grep ModuleUsageTracking /var/log/messages | grep foss
Feb 16 12:10:05 master01 ModuleUsageTracking[1427074]: user=lees4820 module=foss/2022a path=/cm/shared/uniol/modules/11.3/toolchain/foss/2022a.lua host=master01 time=1676545805.459937
  • added the groupname to the log output (after user= with account=)
  • for some reason module loading works but unloading gives a strange error (related to hpc-env). Problem disappears when LMOD_PACKAGE_PATH is unset.
  • step2: added
if $programname contains 'ModuleUsageTracking' then @master:514
&~
and restarted daemon with
# systemctl restart rsyslog