Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7688437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:55:14+00:00 2026-05-31T19:55:14+00:00

Are there any Python modules that will let me get access to NFS quota

  • 0

Are there any Python modules that will let me get access to NFS quota information without having to parse the output of the quota command? I am aware that if I were sufficiently motivated I could write my own ONC/RPC code using Python’s xdrlib module, but I am hoping with all my heart that I do not have to get that intimately involved with the innards of NFS.

Ideally, I am hoping for an existing RPC implementation, or some higher-level module (like a wrapper for an existing C library or something).

An acceptable substitute would be something like the quota command that produces more machine-readable output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:55:15+00:00Added an answer on May 31, 2026 at 7:55 pm

    This question was spawned originally by problems with version 3.13 of the quota command, which is essentially useless as a tool for the end user to determine quota information. For example, if alice runs quota, she might see output like this:

    Disk quotas for user alice (uid 100): 
         Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
    fileserver.example.com:/staff/b/bob
                    9254720  9728000 10240000          119768       0       0       
    

    Alice would rightly wonder what this had to do with her account.

    It turns out that the minds behind the quota-utils package at long last realized the problems inherent in the tool; with version 4.00 (available in Fedora 16) there are several new options available that turn the quota command into something that actually produces useful information.

    Of particular interest is the -f option:

    -f, --filesystem-list     display quota information only for given filesystems
    

    So now, a user can run:

    quota -f ~
    

    And get the quota information for their home directory. Additionally, the -s option will display “human readable” numbers instead of displaying everything as blocks.

    For Alice, this might look like:

    $ quota -s -f ~
    Disk quotas for user alice (uid 100): 
         Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
    fileserver.example.com:/staff/a/alice
                  9038M   9500M  10000M            120k       0       0        
    

    Additionally, there are two options that make it much easier to process the output from quota in a script:

    • The -w option inhibits the line wrapping when the “filesystem” name is too long.
    • The -p option displays 0 for the grace time if the user is not in an over-quota situation. This means that there are always the same number of fields (whereas with the previous version of quota the number of fields could vary depending on the situation).

    Combining all of the above, we get something like this:

    $ quota -wp -f ~
    Disk quotas for user alice (uid 100): 
         Filesystem   space   quota   limit   grace   files   quota   limit   grace
    fileserver.example.com:/staff/a/alice 9254720  9728000 10240000       0  119768 0
    

    Which is much more useful for automation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any api/lib for python that will get me the synonyms of a
Are there any modules for Python, that can be used as a TFTP server?
Is there any way to install Setuptools for Python 2.6 in Windows without having
Is there any python library to get a list of countries for a specific
Is there any way to get Python to use my ActiveTcl installation instead of
Is there any compiler which will help me convert my python code to proper
Is there a way to make Python ignore any .pyc files that are present
Is there any python module to convert PDF files into text? I tried one
Are there any python libraries for data trees? I mean a tree as a
Is there any Ruby equivalent for Python's builtin zip function? If not, what is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.