Sys::Quota/README v0.3a Mar/96 tnzoerne Quota extension module for Perl ------------------------------- Author: Tom Zoerner IMMD4, CSD, University of Erlangen-Nuernberg Tom.Zoerner@informatik.uni-erlangen.de Version: 0.3a (alpha) Date: Nov/17/1996 DSLI-code: adcf Supported: SunOS 4.1.3, HP-UX 9.0 & 10.10, IRIX 5.3, Solaris 2.4&5, OSF/1 Linux 2.0 in work Location: http://www.perl.com/CPAN/authors/Tom_Zoerner/ Author: TOMZO Tom Zoerner Copyright: none / Public Domain This small module provides access to and utilities for disk quotas. In detail, the quotactl syscall (or ioctl) is used to query or set quotas on the local host, or RPC to send a query to a remote host. A "getdev" function is provided which uses getmntent(3) to translate paths to the block device of the according file system. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Usage: [Also read "CHANGES" if you used the 0.1a version!] ($block_curr, $block_soft, $block_hard, $block_timelimit, $inode_curr, $inode_soft, $inode_hard, $inode_timelimit) = query(dev[,uid]) Get current quota and limits for given filesystem and user. 'device' may be in form of "host:/path", uses RPC then Uses real UID of process if none given. setqlim(dev,uid,bs,bh,fs,fh[,tlo]) set quota limits for given user (block soft/hard, inode soft/hard) tlo decides if timelimit is set to "NOT STARTED" (0,default) or "7.0 days" (1) (more alternatives aren't available in most implementations) sync([$dev]) have the kernel update the quota file on disk or all quota files if no argument given (the latter doesn't work on all systems, namely HP-UX 10.10) ($block_curr, $block_soft, $block_hard, $block_timelimit, $inode_curr, $inode_soft, $inode_hard, $inode_timelimit) = rpcquery(host,path[,uid]) query quotas on a remote host via RPC call. Uses real UID of process if none given. $arg = getqcarg([$path]) Get the required "dev" argument for the filesystem you want to operate on with quota-functions. This differs from getdev only on systems, which do not have the quotactl syscall, but use an ioctl call instead. Paths in NFS file systems are allowed. !! For compatibility always use this function to get the device !! argument for Quota::query or Quota::setqlim $dev = getdev([$path]) Get the block device for filesystem of given path or "." For backwards compatibility only. setmntent() Open mtab file. If already open, automatically closed before. NOTE: doesn't exist in Solaris. See endmntent. ($dev, $path, $type, $opts) = getmntent() returns next entry in mtab or undef. endmntent() close mtab file, if open. Always returns undef. NOTE: the according library funtion does not exist in Solaris. This routine is simulated by reading with getmntent until EOF. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-