Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-17343

mechanism to resolve 'lctl get_param' parameters to pathnames

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Lustre 2.16.0
    • 3
    • 9223372036854775807

    Description

      The "lctl get_param" and "lctl list_param" commands allow resolving and dumping Lustre parameters and statistics in a simple manner, as it handles the internal details of where the parameters are stored.

      Due to ongoing changes in the kernel policies on where parameters are located, the actual pathname of a parameter/stats file may change by kernel and Lustre release. Originally, parameters were all under "/proc/fs/lustre" and "/proc/net/lnet", but then "/proc" usage was deprecated so many parameters moved to "/sys/fs/lustre", but this is constrained to being simple "name=value" pairs, and "complex" (multi-value, multi-line) parameters were moved to "/sys/kernel/debug/lustre" and "/sys/kernel/debug/lnet". Unfortunately, the kernel changed the access policy for "/sys/kernel/debug" to be accessible only to the root user, and as such any data collection tools must also run as root in order to access these statistics, until such a time we create our own "lprocfs" to hold statistics and allow them to be accessed by non-root users.

      In the meantime, for tools that monitor Lustre statistics, it is desirable to avoid the overhead of "lctl get_param" trying to do multiple pathname resolutions each time a parameter is accessed, which might be once per second or more. This drives the tools to hard-code the direct parameter pathnames into the tool instead of using "lctl get_param" to access the parameters, which is fragile and may break between releases.

      It is desirable to have a mechanism to "resolve" parameter/stats pathnames for the currently-running Lustre version so that they can be used directly, without hard coding them. To do this, it would be useful to have an option "lctl list_param [-p|--path] PARAM" that prints the actual pathname(s) for PARAM instead of the value.

      There is already a function "llapi_param_get_paths()" that is available to resolve the parameter name to one or more pathnames, but it needs the "[-p|--path]" option implemented to allow printing these pathnames to stdout for use by the monitoring tools.

      Attachments

        Issue Links

          Activity

            [LU-17343] mechanism to resolve 'lctl get_param' parameters to pathnames
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-16931 [ LU-16931 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-14442 [ LU-14442 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.16.0 [ 15190 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones added a comment -

            Merged for 2.16

            pjones Peter Jones added a comment - Merged for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/55202/
            Subject: LU-17343 utils: added --path option for lctl list_param
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e1a9d08351721d280faed51a2061e3e16f25a6b2

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/55202/ Subject: LU-17343 utils: added --path option for lctl list_param Project: fs/lustre-release Branch: master Current Patch Set: Commit: e1a9d08351721d280faed51a2061e3e16f25a6b2

            "Frederick Dilger <fdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55202
            Subject: LU-17343 utils: added -p option for lctl list_param
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 490602c1b7350735295f13ca20609db45b8a59b7

            gerrit Gerrit Updater added a comment - "Frederick Dilger <fdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55202 Subject: LU-17343 utils: added -p option for lctl list_param Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 490602c1b7350735295f13ca20609db45b8a59b7
            fdilger Fred Dilger made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Fred Dilger [ fdilger ]
            adilger Andreas Dilger made changes -
            Link New: This issue is duplicated by LU-17237 [ LU-17237 ]
            adilger Andreas Dilger made changes -
            Labels Original: easy New: easy lug24dd
            adilger Andreas Dilger made changes -
            Description Original: The "{{lctl get_param}}" and "{{lctl list_param}}" commands allow resolving and dumping Lustre parameters and statistics in a simple manner, as it handles the internal details of where the parameters are stored.

            Due to ongoing changes in the kernel policies on where parameters are located, the actual pathname of a parameter/stats file may change by kernel and Lustre release. Originally, parameters were all under "{{/proc/fs/lustre}}" and "{{/proc/net/lnet}}", but then "{{/proc}}" usage was deprecated so many parameters moved to "{{/sys/fs/lustre}}", but this is constrained to being simple "{{name=value}}" pairs, and "complex" (multi-value, multi-line) parameters were moved to "{{/sys/kernel/debug/lustre}}" and "{{/sys/kernel/debug/lnet}}". Unfortunately, the kernel changed the access policy for "{{/sys/kernel/debug}}" to be accessible only to the {{root}} user, and as such any data collection tools must also run as root in order to access these statistics, until such a time we create our own "{{lprocfs}}" to hold statistics and allow them to be accessed by non-root users.


            In the meantime, for tools that monitor Lustre statistics, it is desirable to avoid the overhead of "{{lctl get_param}}" trying to do multiple pathname resolutions each time a parameter is accessed, which might be once per second or more. This drives the tools to hard-code the direct parameter pathnames into the tool instead of using "{{lctl get_param}}" to access the parameters, which is fragile and may break between releases.

            It is desirable to have a mechanism to "resolve" parameter/stats pathnames for the currently-running Lustre version so that they can be used directly, without hard coding them. To do this, it would be useful to have an option "{{lctl get_param [-p|--path] PARAM}}" and "{{lctl list_param [-p|--path] PARAM}}" that prints the actual pathname(s) for {{PARAM}} instead of the value.

            There is already a function "{{llapi_param_get_paths()}}" that is available to resolve the parameter name to one or more pathnames, but it needs the "{{[-p|--path]}}" option implemented to allow printing these pathnames to stdout for use by the monitoring tools.
            New: The "{{lctl get_param}}" and "{{lctl list_param}}" commands allow resolving and dumping Lustre parameters and statistics in a simple manner, as it handles the internal details of where the parameters are stored.

            Due to ongoing changes in the kernel policies on where parameters are located, the actual pathname of a parameter/stats file may change by kernel and Lustre release. Originally, parameters were all under "{{/proc/fs/lustre}}" and "{{/proc/net/lnet}}", but then "{{/proc}}" usage was deprecated so many parameters moved to "{{/sys/fs/lustre}}", but this is constrained to being simple "{{name=value}}" pairs, and "complex" (multi-value, multi-line) parameters were moved to "{{/sys/kernel/debug/lustre}}" and "{{/sys/kernel/debug/lnet}}". Unfortunately, the kernel changed the access policy for "{{/sys/kernel/debug}}" to be accessible only to the {{root}} user, and as such any data collection tools must also run as root in order to access these statistics, until such a time we create our own "{{lprocfs}}" to hold statistics and allow them to be accessed by non-root users.


            In the meantime, for tools that monitor Lustre statistics, it is desirable to avoid the overhead of "{{lctl get_param}}" trying to do multiple pathname resolutions each time a parameter is accessed, which might be once per second or more. This drives the tools to hard-code the direct parameter pathnames into the tool instead of using "{{lctl get_param}}" to access the parameters, which is fragile and may break between releases.

            It is desirable to have a mechanism to "resolve" parameter/stats pathnames for the currently-running Lustre version so that they can be used directly, without hard coding them. To do this, it would be useful to have an option "{{lctl list_param [-p|--path] PARAM}}" that prints the actual pathname(s) for {{PARAM}} instead of the value.

            There is already a function "{{llapi_param_get_paths()}}" that is available to resolve the parameter name to one or more pathnames, but it needs the "{{[-p|--path]}}" option implemented to allow printing these pathnames to stdout for use by the monitoring tools.

            People

              fdilger Fred Dilger
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: