From: SMTP%"udaa055@bay.cc.kcl.ac.uk" 26-NOV-1994 13:00:19.62 To: EVERHART CC: Subj: Re: Lexical equiv to SHOW QUOTA? From: "Andy Harper, KCL Systems Manager" X-Newsgroups: comp.os.vms Subject: Re: Lexical equiv to SHOW QUOTA? Message-Id: <00987F0F.4F084A00.9@bay.cc.kcl.ac.uk> Date: Thu, 24 Nov 1994 10:33:38 GMT Organization: Info-Vax<==>Comp.Os.Vms Gateway X-Gateway-Source-Info: Mailing List Lines: 138 To: Info-VAX@Mvb.Saic.Com Andrew Brennan writes: > Ok ... I've looked about a bit and can't seem to find it. Is there a > lexical that would contain a user's quota information for a device? > > F$GETDVI seemed to be the logical place to hide something like this > (IMHO), or possibly F$GETJPI (less likely) ... HELP doesn't list any > item that I would recognize as "the" one. I can script up something > to dump SHOW QUOTA's output to a file, read it in and make a little > bar graph (trying to find a way to indicate quota information in the > menu display our users are already seeing :^) - but it seemed to be > counter-productive to create files to tell them they need to delete > some of their files ... Yes, I wrote a utility called GETQUO a while back and it's available for public consumption on my ftp server or via mail. Details below. I've enclosed a copy of the help file so you can see if it's what you require. BTW, it know works on both VAX and ALPHA! Regards, Andy Harper Kings College London How to get GETQUO URL: ftp://ftp.kcl.ac.uk/default/getquo.* (VMS_SHARE format) By Mail: send the line: SEND GETQUO.PACKAGE (in the body NOT the subject field!) to the site: VMSSERV @ KCL.AC.UK You'll receive it several VMS_SHARE'd parts. 1 GETQUO Obtains disk quota information about a user and writes it into user specified DCL symbols. Format: $ GETQUO [/qual=symbol] [...] [Username] 2 Errors Error returns from a number of system services can potentially be returned in the $STATUS symbol. The only exception is the QFNOTACT status indicating that quotas are not active. The status of this (TRUE or FALSE) can be returned to the user with the /ENABLED qualifier but the status is never signalled as an error. The most common errors are these: 3 RNF %RMS-F-RNF, record not found Indicates that a username was specified that is not valid on the system. 3 DEVNOTMOUNT %SYSTEM-E-DEVNOTMOUNT, Device not mounted The user's default device has not been mounted and so the quota record cannot be read. 3 DEVOFFLINE %SYSTEM-E-DEVOFFLINE, Device off-line The user's default device is off-line and so the quota record cannot be read. 2 Examples $ GETQUO /USAGE=DISK_IN_USE Obtains the disk quota usage information about the current user and stores it in the local DCL symbol called `DISK_IN_USE'. $ GETQUO SYSTEM /USAGE=USAGE /PERMANENT_QUOTA=PERM Obtains the disk quota usage and permanent allocation information for the user `SYSTEM' and stores it in the symbols `USAGE' and `PERM'. 2 Operation The utility locates the default login device and UIC code for the specified user, then picks up the qualifier corresponding to this UIC on the device. If quotas are not enabled, zero values are returned and the enabled flag is set to false (if specified - see the /ENABLED qualifier). Privileges (SYSPRV or SYSNAM) are required to see the quotas for another user. This version of the utility will not return values for arbitrary UIC codes on arbitrary volumes. This will be included in a future enhancement. 2 Parameters The single parameter specifies the user for whom disk quota information is required. It defaults to the current user. Privileges (SYSPRV or SYSNAM) are required to see the quotas for another user. 2 Qualifiers /DEVICE /DEVICE=symbol Returns the user's default device in the specified symbol. This is the device selected at initial login. /ENABLED /ENABLED=symbol Returns the string "TRUE" or "FALSE" in the specified symbol, depending on whether quotas are enabled on the volume. Note that, if quotas are not enabled, any quota value requested by other qualifiers will be returned as 0. /OVERDRAFT /OVERDRAFT=symbol Returns the user's overdraft limit in the specified symbol. /PERMANENT_QUOTA /PERMANENT_QUOTA=symbol Returns the user's permanent quota limit in the specified symbol. /UIC /UIC=symbol Returns the user's default UIC code in the specified symbol. /USAGE /USAGE=symbol Returns the user's current disk usage in the specified symbol.