glite-lb-bkindex man page

glite-lb-bkindex — dump or rebuild bookkeeping server indices


glite-lb-bkindex [-mrv] [FILE]
glite-lb-bkindex [-dmv]


The bookkeeping server glite-lb-bkserverd uses database indices to support various types of user queries efficiently. glite-lb-bkindex is a tool for dumping and manipulating the indices. Both single- and multiple-column indices are supported.

Due to performance reasons (reindexing may take rather long time) the default invocation performs only "dry run" - the input is checked and intended actions reported but not really performed. The option -r has to be specified to do the real work.

glite-lb-bkindex should not be run while there is a running glite-lb-bkserverd on top of the same database.

By default the L&B server indexes data according to JobId only. Because the querying capabilities of L&B release 2 were considerably extended, the server refuses to process a query which would not utilize any index. This prevent overloading the underlying database engine. Consequently, even a trivial query 'give me all my jobs' results in an error in the default setup  because under certain conditions processing such query may require handling gigabytes of data.

The server administrator can create and modify the set of indices and control the set of supported queries. The description of columns to be indexed is given to glite-lb-bkindex utility via FILE that  follows this syntax (subset of ClassAd syntax):

FILE ::= [ JobIndices = { index-description [, index-description]* } ]
index-description ::= column-description | list-of-columns
list-of-columns ::= { column-description + }
column-description ::= [ column-type; column-name; prefix-len ? ]
column-type ::= type = "user" | type = "system" | type = "time"
column-name ::= name = "actual_column_name"
prefix-len ::= prefixlen = integer

The only top-level attribute JobIndices is a list (possibly empty) of index descriptions. Each index description is either a single column or a list of columns (where the order is important). The column is described by mandatory attributes type and name, and an optional attribute prefixlen. Possible values of type are "system" (L&B internal attributes) "time" ("state entered" timestamps), and   "user" (user tags). Currently supported system column names are owner, destination and location. and valid timestamps are the job states, i.e. submitted, waiting, ready, scheduled, running, done, cleared, cancelled, aborted. Names of user tags are arbitrary as long as their length is less than 60 characters and they contain only ASCII printable characters excluding backtick (`). The prefixlen value may be used to restrict indexing of columns, which may grow rather long, to a fixed size. This becomes necessary with compound indices as MySQL limits the total size of index to 250 bytes only.

In the following example the index file contains two indices, the first one on a single system attribute -- <job owner>, the second one composed from system attribute (job) <destination> and user tag called <experiment number>:

  JobIndices = {
    [ type = "system"; name = "owner" ],
      [ type = "system"; name = "destination";
        prefixlen = 100 ],
      [ type = "user"; name = "experiment number";
        prefixlen = 100 ]


-d, --dump

Print current setup on stdout.

-m STRING, --mysql STRING

STRING is the database connect string in the form


It defaults to lbserver/@localhost:lbserver20 (common with glite-lb-bkserverd).

-r, --really

Really perform reindexing.

-R, --remove

Remove all indexes from server.

-v, --verbose

Increase verbosity.


Please report all bugs to CESNET gLite L&B issue tracker available at

See Also

glite-lb-purge(1), glite-lb-bkserverd(8)



Referenced By

glite-lb-bkserverd(8), glite-lb-dump(1), glite-lb-load(1), glite-lb-mon(1), glite-lb-purge(1), glite-lb-setup(8).

April 2008 EU EGEE Project Logging&Bookkeeping