~ubuntu-branches/ubuntu/raring/eucalyptus/raring

« back to all changes in this revision

Viewing changes to clc/modules/reporting/src/main/java/com/eucalyptus/reporting/modules/instance/package.html

  • Committer: Package Import Robot
  • Author(s): Brian Thomason
  • Date: 2011-11-29 13:17:52 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 185.
  • Revision ID: package-import@ubuntu.com-20111129131752-rq31al3ntutv2vvl
Tags: upstream-3.0.999beta1
ImportĀ upstreamĀ versionĀ 3.0.999beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<p>The instance reporting module tracks and records statistics of instance
 
3
usage. It tracks instance running time, instance type, disk IO usage,
 
4
and network IO usage.
 
5
 
 
6
<p>This module gathers usage statistics by receiving events every <i>n</i>
 
7
seconds for each instance then recording a series of snapshots of total
 
8
usage for each instance to the database. It does not necessarily record a
 
9
snapshot for every event received; generally it aggregates several events
 
10
and then writes a single snapshot per instance every few hours; the
 
11
interval can be adjusted via a runtime property.
 
12
 
 
13
<p>When a report is generated, this module aggregates database snapshots
 
14
into a series of statistics which are returned as a list of <i>Report Lines</i>
 
15
to be displayed in a visual report. The statistics are aggregated by the
 
16
<i>InstanceUsageLog</i> class, which proceeds using the following algorithm.
 
17
First it scans through all snapshots relevant to the report, starting with
 
18
the snapshot immediately before the report beginning and ending at the
 
19
snapshot immediately after the report end. Then it constructs an
 
20
<i>InstanceDataAccumulator</i> object for each instance and feeds in
 
21
every snapshot for the relevant instance to that accumulator. The accumulator
 
22
keeps track of the first and last snapshots for that instance and subtracts
 
23
the first usage from the last, including timestamp, extrapolating those values
 
24
according to the partial periods at the beginning and end of the report. At
 
25
this point, we have aggregate statistics for each instance. Then, we
 
26
<i>summarize</i> that data based upon the criteria which the user selected
 
27
for his report (by account, by availability zone, etc), which means
 
28
that we add up all usage of all instances within the given account or
 
29
availability zone etc. Then we return the <i>ReportLines</i> to be displayed
 
30
in a visual report.
 
31