\Hazaar\File
RRD
Summary
Methods Properties Constants
No constants
Properties
$archiveCFs
$archiveCFs
$archives
$archives
$data
$data
$dataSourceTypes
$dataSourceTypes
$dataSources
$dataSources
$lastTick
$lastTick
$lastWrite
$lastWrite
$rrdfile
$rrdfile
$tickSec
$tickSec
$version
$version
Methods
__construct()
__construct($rrdfile, $tickSec = 60)

Parameters

$rrdfile

No description

$tickSec

No description

addArchive()
addArchive($archiveID, $cf, $xff = null, $ticks = null, $rows = null, $description = null)

Parameters

$archiveID

No description

$cf

No description

$xff

No description

$ticks

No description

$rows

No description

$description

No description

addDataSource()
addDataSource($dsname, $type, $heartbeat = null, $min = null, $max = null, $description = null)

Parameters

$dsname

No description

$type

No description

$heartbeat

No description

$min

No description

$max

No description

$description

No description

consolidate()
consolidate($cf, $dataPoints)

Parameters

$cf

No description

$dataPoints

No description

create()
create()
exists()
exists()
getArchiveOffset()
getArchiveOffset($archiveID = 0)

Parameters

$archiveID

No description

getArchiveRowLength()
getArchiveRowLength()
getArchives()
getArchives()
getDataSources()
getDataSources()
getRRDFile()
getRRDFile()
getTick()
getTick($time = null)

Parameters

$time

No description

getTickSec()
getTickSec()
graph()
graph($dsname, $archiveID = 0)

Parameters

$dsname

No description

$archiveID

No description

hasDataSource()
hasDataSource($name)

Parameters

$name

No description

restoreOptions()
restoreOptions()
setTickSec()
setTickSec($tickSec)

Parameters

$tickSec

No description

setValue()
setValue($dsname, $value)

Parameters

$dsname

No description

$value

No description

update()
update()
The update function stores a consolidated data point in the archive for each data source based on the settings

supplied when defining the archive.

  • A primary data point is a single value stored for each ‘tick’.
  • A consolidated data point is a value calculated based on 1 or more primary data points using the consolidation function specified when defining the archive.

How this works is as follows:

  • Step 1: Make sure there are data points for all ticks from lastTick to currentTick
  • Step 2: Check if there are enough primary data points to create a consolidated data point.
  • Step 3: If so, apply the consolidation function
  • Step 4: Update the starting point in the archive definition
  • Step 5: Store the consolidated data point value in the archive.
writeArchiveHeader()
writeArchiveHeader($h, $archive)

Parameters

$h

No description

$archive

No description

writeArchiveRow()
writeArchiveRow($h, $tick, $values)

Parameters

$h

No description

$tick

No description

$values

No description

writeDataSource()
writeDataSource($h, $ds)

Parameters

$h

No description

$ds

No description