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

Prefix each lctl get_param output line with -H

    XMLWordPrintable

Details

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

    Description

      Add a new '-H' option to 'lctl get_param' that will prefix each output line with the parameter name instead of only the first line by default.
          
      That makes grepping lctl get_param with wildcards much easier as you can now easily now which parameter returns which value:

      $ lctl get_param -H osc.*.state | grep current
      osc.lustre-OST0000-osc-ff1148c0.state=current_state: FULL
      osc.lustre-OST0001-osc-ff1248c0.state=current_state: DISCONN
      osc.lustre-OST0002-osc-ff1348c0.state=current_state: FULL
      osc.lustre-OST0003-osc-ff1448c0.state=current_state: FULL
      osc.lustre-OST0004-osc-ff1548c0.state=current_state: FULL

      It could be combined with clubak from ClusterShell by example, to compare connection tunings, ie:

      # lctl get_param -H osc.*.srpc_info | grep -v id: | clubak -bS=
      ---------------
      osc.lustre-OST[0002-0009]-osc-ff1348a7.srpc_info (8)
      ---------------
      rpc flavor:     krb5n
      bulk flavor:    krb5n
      flags:          rootonly,bulk,
      refcount:       3
      nctx:   1
      gc internal     3600
      gc next 3459
      ---------------
      osc.lustre-OST[0000-0001]-osc-ff1348a7.srpc_info (2)
      ---------------
      rpc flavor:     null
      bulk flavor:    null
      flags:          -,
      refcount:       416
      nctx:   1
      gc internal     0
      gc next 0

       

      • It could also be useful even with 1 line of output as it does not force a line feed if the value is larger than 80 chars.
      • It also prints an output line even for empty values. That also makes life easier for admins.

      Open to use another option name if you prefer.

       

      Attachments

        Activity

          People

            adegremont_nvda Aurelien Degremont
            adegremont_nvda Aurelien Degremont
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: