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

mechanism to resolve 'lctl get_param' parameters to pathnames

    XMLWordPrintable

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: