Last Update 2000-05-07 by kcarlson


ARSC Project tree hierarchy


Overview (conventions, re-generation)

ARSC resource accounting uses a project tree file which defines the project accounting hierarchy. The file contains two columns, the numeric acid and a slash ("/") delimited hierarchy:
$HOST: head -5 /allsys/support/acct/summary/tree 
204     DOD
215     DOD/AF
2036    DOD/AF/AFIFRZEN
1635    DOD/AF/ARMST006
2087    DOD/AF/ASCWP032
In the above, the AFIFRZEN project is a member of the AF project which is a member of the DOD project. The file is sorted by the projects ("sort -k2"). Since the tree is a flat view, if project relationships change significantly one may want to preserve an older tree to re-generate historical reports with the older hierarchy.

This tree file can be maintained manually or via automated methods based on site conventions.


ARSC Project tree Conventions (overview, regeneration)

At ARSC a pre-existing project hierarchy existed in the fair share scheduling definitions of the UDB. Since this existed, the tree file can be automatically regenerated monthly or as needed. ARSC conventions for projects are:

  1. Project names are always upper case.
  2. Project names have UDB entries with uid the same as acid.
  3. The UDB resgrp field links a project to its parent project.
  4. Projects on the T3E (yukon) and J90 (chilkoot) are the same and use identical tree files.
This is a convenient means to map project relationships even though fair share scheduling is no longer used at ARSC. Example looking at the UDB and /etc/acid:
$HOST: udbsee -f update,uid,resgrp DOD AF AFIFRZEN 
update :DOD: uid :204: resgrp :0:
update :AF: uid :215: resgrp :204:
update :AFIFRZEN: uid :2036: resgrp :215:
$HOST: egrep '^DOD:|^AF:|^AFIFRZEN:' /etc/acid 
DOD:204
AF:215
AFIFRZEN:2036

Retired (deleted) or renamed project entries are manually maintained in a tree.lost file. A renamed project is given a negative acid. This is necessary because while most utilities retain the acid in numeric form, some maintain it in character form. Since this can cause considerable confusion for long term historical reporting, acids (numeric or alpha) should not be re-used. However, this capability does permit political renaming of projects where the numeric acid remains the same but the project name is changed. The tree.lost file has three colon (":") delimited fields, the 2nd field is a flag where "1" indicates a retired (deleted) acid. Current projects have a "0" in the 2nd field:

$HOST: head -5 tree.lost 
863:1:DOD/AF/USAFA
1372:1:DOD/AF/WPAFB001
348:1:DOD/ARMY/ATOC
-1804:1:DOD/ARMY/CECRLC93
1243:1:DOD/ARMY/CEWES
$HOST: grep 1804 tree.lost 
-1804:1:DOD/ARMY/CECRLC93
1804:0:DOD/ARMY/CECRL804
The above demonstrates that CECRLC93 was renamed CECRL804.

ARSC Project tree Regeneration: (overview, conventions)

The project tree is regenerated monthly by the csa_tree.ksh script executed by csa.ua_eom.ksh invoked by csa.user on the first of the month in csarun:USEREXIT. The csa_tree.ksh script pulls information from the UDB, /etc/acid, and merges the tree.lost file.

To automatically re-generate the tree file, which is required for mid-month reporting if a new project was added, do the following:

$HOST: cd $TMPDIR 
$HOST: cp /var/local/output/acct/tree/tree.lost /var/local/output/acct/tree/tree . 
$HOST: /usr/local/adm/sbin/csa.tree.ksh 
Generating 19990430.shrtree.chilkoot to create 19990430.outtree.chilkoot
Comparing 19990430.newtree.chilkoot with existing tree:
tree has been updated.
$HOST: diff tree /allsys/support/acct/summary/tree | grep "^<" 
< 2001  DOD/NAVY/ONR/ONRDC146
< 1999  UA/ACADEMIC/UAF/DINOBONE
< 1568  UA/FEDERAL/NOAANSSL/ELEVHEAT
< 1602  UA/FEDERAL/NOAANSSL/LOWWAKE
< 1721  UA/IARC
< 1722  UA/IARC/CIOM
< 1947  UA/IARC/NCARCCM
< 1969  UA/IARC/NONHYDRO
< 1123  UA/IARC/VORTEX
The file can be copied back as appropriate. Note, two copies exist at ARSC:
  1. Local copy: /var/local/output/acct/tree/tree
  2. Shared copy: /allsys/support/acct/summary/${HOST}/tree
The csa.ua_eom.ksh job does update both.