1 02/20/84  charge_disk
 2 
 3 Syntax:  charge_disk {path} {-control_arg}
 4 
 5 
 6 Function:  is used by the daily disk accounting job (diskreport in the
 7 master.ec segment) to record the disk usage figures for each project in
 8 the project's projfile entry.  The figures are obtained from the
 9 disk_stat file that is produced by the sweep command.  Figures are
10 recorded only for directories in the subtree below >udd.  Within that
11 subtree, charging may be enabled or disabled on a per-logical-volume
12 basis.
13 
14 
15 Arguments:
16 path
17    is the pathname of the disk_stat file from which the disk usage
18    figures are obtained.  The default is the segment, disk_stat, in the
19    working directory.
20 
21 
22 Control arguments:
23 -logical_volume names, -lv names
24    where names is one or more logical volumes for which charging is to
25    be enabled.  Charging for all other logical volumes is disabled.  If
26    this argument is not given, it is assumed that all directories under
27    >udd have their segments on the same logical volume, and charging
28    for this volume is enabled.  The sons logical volume identifier of
29    the first project directory encountered is used as the logical
30    volume identifier of the volume for which charging is enabled.
31 
32 
33 Notes:  Dollar charges are not computed by charge_disk.  It records the
34 total month-to-date time-page product (tpp) for all directories
35 inferior to each project directory in the project's projfile entry.
36 The corresponding dollar charge is computed by the print_disk command
37 for printing only.  The disk charge actually billed is computed during
38 monthly billing, using the disk price in effect at that time.  (Thus a
39 change in the disk price made before billing is retroactive to the
40 beginning of the billing period.)
41 
42 
43 If the total tpp for a project, as computed from the figures in
44 disk_stat, is less than the previous day's month-to-date tpp recorded
45 in projfile, an error message is printed, and the projfile figure is
46 not changed.  This situation can arise in several ways, through system
47 or human error.  If a project directory is destroyed and then
48 re-created in a way that sets its tpp integrator back to zero instead
49 of to the previous value, charges start accruing from the date of the
50 re-creation and the charges for the portion of the month preceding the
51 destruction are lost.  When this happens, the set_tpp command can be
52 used to add the charge in projfile to the tpp integrator of the project
53 directory.  Before this is done, however, the system administrator
54 should analyze the situation carefully, to be sure that adding this
55 charge to the project is the correct thing to do.  If it is determined
56 that the projfile figure is the one in error, the edit_projfile command
57 can be used to correct it.