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

"lfs quota" output is difficult to read

Details

    • Improvement
    • Resolution: Done
    • Minor
    • None
    • None
    • 2.12.9 on my VM
    • 9223372036854775807

    Description

      Sometime I need to work with customer on quota issue.

      And all time I need to think twice on the way the command display things.

      For example on a simple test : 

       

      root@es522vm0:/lustre/testfs/client/test/ lfs setquota   -u user1000 -b 100m -B 200M -i 10000  -I 20000  /lustre/testfs/client/   
      
      root@es522vm0:/lustre/testfs/client/test/ lfs quota -h -u user1000 /lustre/testfs/client/                                                           
      Disk quotas for usr user1000 (uid 1000):
           Filesystem    used   quota   limit   grace   files   quota   limit   grace
      /lustre/testfs/client/
                          16k    100M    200M       -       2   10000   20000       - 

      Here, if you are not familiar with quota ( and I'm not ). 

      Having some hint from the banner which say "block" are on the left, inode are on the right, grace is in "time" could help lots and lots of people like me.

       

      The following function display the title : lustre/utils/lfs.c

       

      static void print_quota_title(char *name, struct if_quotactl *qctl,
                                    bool human_readable, bool show_default)
      {
              if (show_default) {
                      printf("Disk default %s quota:\n", qtype_name(qctl->qc_type));
                      printf("%15s %8s%8s%8s %8s%8s%8s\n",
                             "Filesystem", "bquota", "blimit", "bgrace",
                             "iquota", "ilimit", "igrace");
              } else {
                      printf("Disk quotas for %s %s (%cid %u):\n",
                             qtype_name(qctl->qc_type), name,
                             *qtype_name(qctl->qc_type), qctl->qc_id);
                      printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n",
                             "Filesystem", human_readable ? "used" : "kbytes",
                             "quota", "limit", "grace",
                             "files", "quota", "limit", "grace");
              }
      }

      Is it possible in the future to standardized the display like it is done with "Default User", "Default Group", "Default Project". Because here, we know we are talking about inode or block.

      To be honnest, it's hard to read if you don't do that daily.

      At the same time, it could allow to fix the allignment of the "printf" between "defaultUser/Group/Project"  and the standard output.

       

      Attachments

        Issue Links

          Activity

            [LU-18220] "lfs quota" output is difficult to read
            fdilger Fred Dilger made changes -
            Resolution New: Done [ 10000 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            adilger Andreas Dilger made changes -
            Labels Original: easy New: easy utils
            adilger Andreas Dilger made changes -
            Assignee Original: Hongchao Zhang [ hongchao.zhang ] New: Fred Dilger [ fdilger ]
            adilger Andreas Dilger made changes -
            Labels New: easy
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-17702 [ LU-17702 ]
            adilger Andreas Dilger made changes -
            Environment Original: ES5.2.2 on my VM New: 2.12.9 on my VM
            adilger Andreas Dilger made changes -
            Key Original: EX-4354 New: LU-18220
            Workflow Original: Software Simplified Workflow for Project EX [ 84997 ] New: Sub-task Blocking [ 105122 ]
            Project Original: Exascaler [ 12911 ] New: Lustre [ 10000 ]
            Status Original: To Do [ 10206 ] New: Open [ 1 ]
            adilger Andreas Dilger made changes -
            Summary Original: ES5.2.2 MYVM lfs quota is difficult to read New: "lfs quota" output is difficult to read
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-18079 [ LU-18079 ]
            pjones Peter Jones made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Hongchao Zhang [ hongchao.zhang ]

            People

              fdilger Fred Dilger
              jpeyrard Johann Peyrard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: