Norbert Gruener > AFS-2.4.0 > afsperlcm

Download:
AFS-2.4.0.tar.gz

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: AFS-2.4.1

NAME ^

afsperlcm - Cache Manager functions

SYNOPIS ^

  use AFS;              # import all AFS names
  use AFS @AFS::CM;     # import just the cache manager names

  cm_access
  checkconn
  checkservers
  checkvolumes
  flush
  flushcb
  flushvolume
  getcacheparms
  getcellstatus
  getcrypt
  getfid
  getquota
  getvolstats
  isafs
  lsmount
  mkmount
  pioctl(path,setpath,op,in,setin,setout,follow)
  rmmount
  setcachesize
  setcellstatus
  setcrypt
  setquota
  sysname
  unlog
  whereis
  whichcell
  wscell

DESCRIPTION ^

This document describes the Cache Manager functions (fs command suite) available from the AFS module.

$volstats = getvolstats($path [,$follow=1]); ^

  Emulates the VIOCGETVOLSTAT pioctl function. Blocks are returned
  in 1K values. Type is ReadWrite or ReadOnly.

  Returns an associative array containg the following values:

             Blessed  1
         BlocksInUse  38790
           InService  1
            MaxQuota  105000
            MinQuota  0
                Motd  
                Name  user.schemers
        NeedsSalvage  0
              OffMsg  
              Online  1
            ParentId  669036111
     PartBlocksAvail  255972
       PartMaxBlocks  1161063
                Type  ReadWrite
                 Vid  669036111

$quota = getquota($path [,$follow=1]); ^

   Returns current volume quota (MaxQuota from Volume Status).

$ok = setquota($path, $quota [,$follow=1]); ^

   Sets volume's quota.

@hosts = whereis($path[,$ip=0 [,$follow=1]]); ^

   Returns the location of $path. If $ip is set to 1 then IP addresses
   will be returned instead of hostnames. Example:

   @hosts = whereis("/afs",1);
   # @hosts = ( 36.21.0.73, 36.21.0.108, 36.83.0.11, 36.83.0.227);

$name = sysname([$newname]); ^

   Gets (or sets) the value of @sys. 

$cell = whichcell($path [,$follow=1]); ^

   Returns the cell hosting $path. Returns undef and sets CODE on error.

$mount = lsmount($path [,$follow=1]); ^

   Returns mount point for $path. Returns undef and sets CODE on error.

$ok = rmmount($path); ^

   Removes given mount point. Returns 0 and sets CODE on error.

$ok = mkmount($mountp, $volume [, $rw=0 [, $cell=0]]); ^

   Creates given mount point. 

$ok = flushvolume($path [,$follow=1]); ^

   Flushes the volume containing path.

$ok = flush($path [,$follow=1]); # flush the file ^

   Flushes $path from the cache.

$ok = flushcb($path [,$follow=1]); # flush the callbacks on the file ^

   Remove any callbacks on $path kept by the Cache Manager.

$ok = checkvolumes; ^

   Check validity of all cached volume information.

$ok = checkservers; ^

   Check status of file server machines.

$ok = checkconn; ^

   Check status of all the Callers tokens held by the Cache Manager.
   Returns success if the caller has tokens, and all those tokens
   are valid (i.e, not expired).

($max, $inuse) = getcacheparms; ^

   Returns the current cache parameters. All values are expressed as
   1K blocks. $max is the maximum size of the cache and $inuse is the number
   of blocks in use.

$ok = setcachesize($size); ^

   Sets the maximum cache size. 

$ok = unlog; ^

   Discard all tokens.

($cell, $volume, $vnode, $unique ) = getfid($path [,$follow=1]);

   Get the internal augmented file identifier for $PATH. 
   See also "struct VenusFID".

$ok = isafs($path [,$follow=1]); ^

   Returns 1 if $path is in AFS.

$ok = cm_access($path [, $perm="read" [,$follow=1]]); ^

   Returns 1 if caller has access to given path.

$crypt_flg = getcrypt; ^

   Get the Cache Manager encryption flag.  This function is only
   supported under OpenAFS.

$ok = setcrypt('on'); ^

   Set the Cache Manager encryption flag 'on' or 'off'.  This function
   is only supported under OpenAFS.

$setuid = getcellstatus([$cell=0]); ^

   Returns 1 if setuid programs are allowed for given (default local) cell.

$ok = setcellstatus($setuid_allowed[,$cell=0]); ^

   Sets the setuid flag for the given (default local) cell.

$cell = wscell; ^

   Returns local cell.

pioctl(path,setpath,op,in,setin,setout,follow) ^