Difference between revisions of "Tracking Module Usage"

From HPC users
Jump to navigationJump to search
Line 16: Line 16:
  if $programname contains 'ModuleUsageTracking' then @master:514
  if $programname contains 'ModuleUsageTracking' then @master:514
  &~
  &~
and restarted daemon with
: and restarted daemon with
  # systemctl restart rsyslog
  # systemctl restart rsyslog

Revision as of 15:33, 16 February 2023

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