Print Quota

Here we can gather notes on managing print quotas within CS

This is being edited by Bill and Wendy (and Lawrence (and Adrian)). However, we're finding this stuff annoying enough that we're not done yet.

Introduction

An overview of the printing architecture is available.

We have two frown print quota systems in use. One of them is used for some specialized printers, the other for everything else. Eventually, we'll be moving to a single system (PyKota, described below).

CS only charges undergraduate students for printing. Student print quotas are handled automatically, and described elsewhere (if at all). Faculty and staff quotas are generally set once, to unlimited. The print quota mechanism exists primarily to avoid accidents and abuse, and mostly affects graduate students. Initial graduate student print quotas are assigned automatically, based upon whether they are masters or PhD students.

There are two parts to a print quota, for an individual. The first part is the names of the machines that they'll be printing from. The second part is how much printing is allowed.

In practice, there are two kinds of print quota updates:

  • providing access to a printer
  • topping up a graduate student's existing print quota

Providing Access to a Printer

A complication in providing printer access is that it may involve either of the print quota mechanisms.

Updating the Old Quota System

  • determine the account number that will be used. This is largely a comment, however we're still using it. For graduate students, it's easy:
    • cs8 for a masters student
    • cs9 for a PhD student

    For others, consult the sponsors data on cscf.cs, by:

    • login to the machine cscf.cs using ssh
    • as root or a member of group accounts, type: userinfo userid
    • pick the Sponsored: line that appears to most closely reflect the role that the person is printing for. Each Sponsored line is of the form
      Sponsored: resource resource_name: account ...
      
      e.g.
      Sponsored: printer ljp_cs: Admin(-1),Rkms002(10000)
      

      which has two account names, Admin and Rkms002

      If no line mentions printer as the sponsored resource, then arguably you should create such documentation by adding sponsorship for printing in the appropriate sponsor's file in the sponsors data database.

  • login to the machine print.cs using ssh

  • type: cd /software/lpr_quota/data/quotas

  • type: ls to see a list of printers that are quota controlled by this system.

  • select one of the printers that you wish to provide access to and/or a quota change.

  • type:
      lpquota_update_sucks -u userid -p printer -a account -q +cents +0
    

    Where userid is the WatIAM userid of the person in question, and account was determined above. The correct quota increase should be specified in cents, and the prepaid field must be specified as +0. For an unlimited quota, specify unlimited rather than +cents.

    If direct access from other than the "standard" set of hosts is required (print.cs:/software/lpr_quota/config/admin/hostname_groups/_mfcf can lead to the list for the curious), then add the -h option:

      lpquota_update_sucks -u userid -p printer -a account -h hostname -q +cents +0
    
    E.g.
      lpquota_update_sucks -u wlrush -p ljp_cs -a Admin -h scsmac29.cs -q unlimited +0
    

    Rumour has it that Jennifer Keir always used edit_lpr_quotas instead.

    To be continued ...

    Check current quotas

    On most of our CS Core or student unix systems, you can type:
    lpquota uwuserid
    

    e.g.:

    [97]% lpquota lfolland
    Printer         Host                 User         Account         Free  Prepaid
    lp_db           mfcf-group           lfolland     CSCF600      NoLimit    0.00
    lp_db           turtledove.cscf      lfolland     CSCF604      NoLimit    0.00
    lpc_db          turtledove.cscf      lfolland     CSCF604      NoLimit    0.00
    ps_mfcf         mfcf-group           lfolland     -               0.00    0.00
    ps_mfcf         mfcf-group           lfolland     NonMath-CSCF NoLimit    0.00
    lj_2062 -> ps_mfcf
    ljp_3016 -> ps_mfcf
    lp1_cm -> ps_mfcf
    lp1_mathgrad -> ps_mfcf
    lp1_statsgrad -> ps_mfcf
    lp2_statsgrad -> ps_mfcf
    ljp_cs          mfcf-group           lfolland     CSCF600      NoLimit    0.00
    ljp_cs          clarke.cscf          lfolland     CSCF600       200.00    0.00
    ljp_cs          heinlein             lfolland     CSCF600      NoLimit    0.00
    ljp_cs          turtledove.cscf      lfolland     CSCF600      NoLimit    0.00
    ljp_cs          verne.cscf           lfolland     CSCF600      NoLimit    0.00
    lp_cscf-private mfcf-group           lfolland     CSCF600      NoLimit       0
    lj_2062 -> ljp_cs
    lj_cs -> ljp_cs
    lj_cs-1 -> ljp_cs
    lj_cs-2 -> ljp_cs
    lj_cs-special -> ljp_cs
    lj_csgrad -> ljp_cs
    lj_dc2305 -> ljp_cs
    lj_dc2319 -> ljp_cs
    lj_dc2326 -> ljp_cs
    lj_dc3624 -> ljp_cs
    lj_r2d2 -> ljp_cs
    lj_walter -> lp_cscf-private
    lp2_dc3507 -> ljp_cs
    lp7_cs -> ljp_cs
    

    Update quotas

    • ssh print.cs

    Tools

    • lpquota_update_sucks

    Example - increase a grad student's print quota

    In this example, we are increasing a Master's Student (userid imauser) on the standard Master's account (cs8) by $200.00 (the usual Master's quota, in cents) on the set of CS core printers (ljp_cs):
    # ssh print.cs (should work on any CS core machine)
    # tcsh  (make sure that you have all the right paths)
    # lpquota imauser      (check out their existing quota, if any, to see account used)
    # lpquota_update_sucks -u imauser -p ljp_cs -a cs8 -q +20000 +0
    
    If the path isn't set properly, try:
     /.software/local/.admin/bins/maintenance/lpquota_update_sucks -u imauser -p ljp_cs -a cs8 -q +20000 +0
    

    For a PhD, the account is usually cs9 and the amount is $800.00 (80000)

    Note that the account will be shown in lpquota output. For user lfolland above, the account would be CSCF600. ljp_cs is nearly always the correct printer; even if the requester mentions a different printer name, it probably uses the ljp_cs quota file, as lpquota output tries to indicate.

    Documentation

Topic revision: r17 - 2010-09-28 - LawrenceFolland
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback