DBpulse Manual - rating_file


RATING file - format of RATING file used by DBpulse


RATING files are used by DBpulse to store benchmark information. They are created on a regular interval (default: every 15 minutes), thus they pertain to a certain period of activity. While each RATING file may be fairly small (< 10MB), they do add up quickly. Assuming the default run interval, 96 new files are generated in a given 24 hour period. In a month, that's almost 3000 files.

The contents of a RATING file are as follows:

     1. Query type  ([A]ttention, [L]ogin, [M]arker, [Q]uery, [R]PC)
     2. Query end time  (Unix epoch time to the microsecond)
     3. Query elapsed time  (float in seconds)
     4. Query status  (0 - success, 1 - error, 2 - cancelled)
     5. Source IP address
     6. Servername (Instance Name)
     7. Internal Session ID  (positive integer)
     8. Client host name
     9. Application name
    10. Server.Database.Username
    11. Marker name
    12. Marker start description
    13. Marker end description

The attributes are TAB delimited. The user information is single-quoted for the Servername, Database, and Username (e.g. `PROD.master.sa'). In general, any item that could have a space is quoted. Items 11, 12, and 13 are used when a Marker is found. A Marker is a SQL no-op that delineates the start or end of a transaction.

The most important items in the RATING file are Query elapsed time, Query end time, and Query status. These three items are used to calculate Rating and Load values. See the white paper entitled Foresight Automation's Performance Management Service Using DBpulse for more information about Rating and Load values.


    Q 1101634206.288717 0.014274 0 DBMS2 147  unimatrix2 'DBMS2.fsconsole.fsadmin'

This record indicates that a query (Q) finished on Nov 28, 2004 at 01:30:06.288717, with a success (0) status, and took 14.274 milliseconds to run between client and server DBMS2 with an internal session_id of 147 logged in as `fsadmin' to database `fsconsole'.


Tells where the head of the software distribution is. Typically this is /foresight for Unix and C:/foresight for Windows. Without this value set, dbpulse does not know where to store the RATING files.


The Work In Progress directory. This is where the current RATING file is stored. RATING files in wip are typically still open and being updated to. When the run interval is reached, the RATING file is moved to the `fg' directory.

The Finished Goods directory. This is where all completed RATING files reside. They wait here to be processed for Rating and Load Values. Once the Rating and Load Values are calculated, the RATING files are moved to the `done' directory.

The Done directory. This is where RATING files that are no longer needed (i.e. all available processing has been done to them) are stored. The RATING files here should be pruned on a nightly basis.

The file naming convention of the actual RATING file is as follows:

    RATING#I<{Unique Name}>#I<{Interval}>.

The field separator is the pound (#) sign.

For example: RATING#SQL_PROD#1218333