Since: PECL rrd >= 0.9.0

class RRDCreator (View source)

Class for creation of RRD database file.

Methods

void
addArchive(string $description)

Adds RRA - archive of data values for each data source.

Archive consists of a number of data values or statistics for each of the defined data-sources (DS). Data sources are defined by method RRDCreator::addDataSource(). You need call this method for each requested archive.

void
addDataSource(string $description)

Adds data source definition for RRD database.

RRD can accept input from several data sources (DS), e.g incoming and outgoing traffic. This method adds data source by description. You need call this method for each data source.

__construct(string $path, string $startTime = '', int $step = 0)

Creates new RRDCreator instance.

bool
save()

Saves the RRD database into file, which name is defined by RRDCreator::__construct()

Details

void addArchive(string $description)

Since: PECL rrd >= 0.9.0

Adds RRA - archive of data values for each data source.

Archive consists of a number of data values or statistics for each of the defined data-sources (DS). Data sources are defined by method RRDCreator::addDataSource(). You need call this method for each requested archive.

Parameters

string $description

Class for creation of RRD database file.

Return Value

void

See also

RRDCreator::addDataSource

void addDataSource(string $description)

Since: PECL rrd >= 0.9.0

Adds data source definition for RRD database.

RRD can accept input from several data sources (DS), e.g incoming and outgoing traffic. This method adds data source by description. You need call this method for each data source.

Parameters

string $description

Definition of data source - DS. This has same format as DS definition in rrd create command. See man page of rrd create for more details.

Return Value

void

__construct(string $path, string $startTime = '', int $step = 0)

Since: PECL rrd >= 0.9.0

Creates new RRDCreator instance.

Parameters

string $path

Path for newly created RRD database file.

string $startTime

Time for the first value in RRD database. Parameter supports all formats which are supported by rrd create call.

int $step

Base interval in seconds with which data will be fed into the RRD database.

bool save()

Since: PECL rrd >= 0.9.0

Saves the RRD database into file, which name is defined by RRDCreator::__construct()

Return Value

bool

TRUE on success or FALSE on failure.

See also

RRDCreator::__construct