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

add 'lfs df --output' option to print specific fields

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      As with "df", it would be useful to allow specifying "lfs df --output=FIELD_LIST" to print only specific fields from the output:

      FIELD_LIST is a comma-separated list of columns to be included. Valid
      field names are: 'source', 'itotal' (alias 'inodes'), 'iused', 'iavail' (alias 'ifree'),
      'ipcent' (alias 'iusepct'), 'size', 'used', 'free', 'avail', 'pcent' (alias 'usepct'), 'file' and 'target'

      This allows printing only specific fields, and would avoid a lot of "lfs df | awk '/OST0000/ { print $4 }'" kind of usage in test scripts, and is likely similarly useful for end users. The aliases are added to match the column headings reported by "df".

      It would also be useful to have long options for these, like "lfs df --itotal" or "lfs df --size" or "lfs df --usepct" so that they are accessible in an intuitive manner as needed.

      Attachments

        Issue Links

          Activity

            [LU-18243] add 'lfs df --output' option to print specific fields
            There are no comments yet on this issue.

            People

              core-lustre-triage Core Lustre Triage
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: