release notes | Book: 1.9.5, 1.9.12 (opt, FHS), 2.11 (FHS), 2.12 (FHS), 2.13 (FHS), 2.14 (FHS), | Wiki | Q&A black_bg
Web: Multi-page, Single page | PDF: A4-size, Letter-size | eBook: epub black_bg

How to activate the statistics module in 1.6.6

[return to top]

General remarks

The statistics module collects parts of its information in memory of cells within the httpDomain and the statisticsDomain. Consequently this information is lost if one or all of those components are restarted. As a result, the day statistics may be significantly wrong if the restart happens at the end of the day. We hope to overcome this problem with 1.6.7 and higher.

Moreover, because the module can only add up pool space for those pools which are up during the inquery phase, disk space of pools which are down during that time is not counted.

[return to top]

How to activate the statistics module in 1.6.6

Create a file in the dCache config directory with the following content:

set printout default 2
set printout CellGlue none

onerror shutdown

#
check -strong setupFile
#
copy file:${setupFile} context:setupContext

#  import the variables into our $context.
#  don't overwrite already existing variables.
#
import context -c setupContext
#
#   Make sure we got what we need.
#
check -strong serviceLocatorHost serviceLocatorPort
check -strong statistics

create dmg.cells.services.RoutingManager  RoutingMgr

create dmg.cells.services.LocationManager lm \
   "${serviceLocatorHost} ${serviceLocatorPort}"


create diskCacheV111.services.PoolStatisticsV0 PoolStatistics  \
   "${statistics}  \
    -export \
#      -create  \
#      -htmlBase=${statistics}  \
    -domain=${thisFqHostname}"

The name of the file should be statistics.batch. Switch to the dCache jobs directory and run

[root] # ./initPackage.sh

Ignore possible error messages. All necessary links will be created.

Find a local disk area with sufficient space available to store the statistics data. The subdirectory should be empty and will be subsequently called (/<StatBase>).

Add the following line to the context httpdSetup section of the config/httpd.batch file.

set alias statistics directory /<StatBase>

Add the following line to the config/dCacheSetup file:

statistics=/<StatBase>

Make sure there is no other statistics=.. entry.

Edit the file docs/skins/home-skin-basic.html : At two locations within this file, the statistics link is commented out. Undo this.

Important

The statistics link has to be called href="/statistics/". Make sure the trailing / (slash) is present. This is not correcty done in the docs/skins/home-skin-basic.html file.

Finally restart the httpd and start the statistics module.

[root] # cd /opt/d-cache/jobs
[root] # ./httpd stop
[root] # ./httpd start
[root] # ./statistics start

Statistics is calculated once per hour at <HH>:55. The daily stuff is calculated at 23:55. Without manual intervention, it takes two midnights before all html statistics pages are available. There is a way to get this done after just one midnight. After the first midnight following the first startup of the statistics module, log into the PoolStatistics cell and run the following commands in the given sequence. The specified date has to be the Year/Month/Day of today.

create html <Year> <Month> <Day>
create html <Year> <Month>
create html <Year>
create html

Example (assuming today is April,11 2006)

create html 2006 04 11
create html 2006 04
create html 2006
create html

The statistics URL is

http://<headnode>:2288/statistics/

(Don’t forget the trailing slash)