Personal tools
You are here: Home Documentation dCache Installing the Billing Graphs
Document Actions

Installing the Billing Graphs

by admin last modified 2008-08-15 03:55

A work in progress for how to display the billing graphs featured at Nebraska

On this page, we will focus on how to deploy the billing graphs to mine the dCache Billing DB for information. This page has been used successfully at LHC T1 and T2 sites.

Steps:

  • Install the dCacheNebraska RPMs.
  • Set up the billing DB for dCache, if it is not already set up.
  • Alter Apache's httpd.conf (you'll need to change your hostname where appropriate, or substitute code which does something equivalent). You will find the necessary additions here. Restart Apache afterward, of course. If you do not use Apache, you must access the billing DB using this URL format:
    http://hostname.unl.edu:8098/billing/xml/
    Note the trailing slash and the port number.
  • Load the schema found here into the billing DB.  If the database is on localhost, this can be done easily from the command line with this command:
    curl http://t2.unl.edu:8092/browser/dCacheNebraska/python_src/dCacheNebraska/billing/config/billing_additions.sql?format=raw > /tmp/new_schema
    psql -U postgres billing < /tmp/new_schema
    • The last line above may need to be altered to match your Postgres login settings. I.e., you may have to provide a hostname, a password, or change the user name.
  • Copy /etc/DBSrm.xml.rpmnew to /etc/DBSrm.xml and edit it to reflect your site:
    <graphtool-config>

    <import module="graphtool.database.connection_manager"> ConnectionManager </import>

    <class name="BillingConnMan" type="ConnectionManager" default="billing">

    <attribute name="default"> billing </attribute>

    <connection name="billing">
    <attribute name="Interface"> Postgres </attribute>
    <attribute name="Database"> billing </attribute>
    <attribute name="Host">myhost.unl.edu</attribute>
    <attribute name="AuthDBUsername"> postgres </attribute>
    <!-- attribute name="AuthDBPassword"> blah </attribute -->
    </connection>

    </class>

    </graphtool-config>
  • Add the dCacheNebraskaWeb script to the system startup, then start it by hand:
    chkconfig --add dCacheNebraskaWeb
    service dCacheNebraskaWeb start
    • If there is a problem, you can start the daemon manually from the command line using the command "billing_web".
  • Restart the cell with the billing cell; usually, it can be done as:
    /opt/d-cache/jobs/httpd stop && /opt/d-cache/jobs/httpd start
  • Enjoy! Please provide me with feedback if you get hung up somewhere.

Powered by Plone, the Open Source Content Management System