PHPackages                             aldas/rrd-php-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aldas/rrd-php-reader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aldas/rrd-php-reader
====================

read rrd files purely using php

v0.1.0(7y ago)13.3k2MITPHPPHP ^7.0

Since Nov 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/aldas/rrd-php-reader)[ Packagist](https://packagist.org/packages/aldas/rrd-php-reader)[ RSS](/packages/aldas-rrd-php-reader/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Pure PHP RRDtool file reader
============================

[](#pure-php-rrdtool-file-reader)

[![Build Status](https://camo.githubusercontent.com/605c855fbe50065fa0c0e72cd90185b68ae477d6d54236771b2c02dce861a8b1/68747470733a2f2f7472617669732d63692e6f72672f616c6461732f7272642d7068702d7265616465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aldas/rrd-php-reader)[![codecov](https://camo.githubusercontent.com/2809e1aa8ad6ea79e8505cc55d7bf3415fe1b85a3b32c142b98c0f778b038600/68747470733a2f2f636f6465636f762e696f2f67682f616c6461732f7272642d7068702d7265616465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/aldas/rrd-php-reader)

> Because on windows php ext-rrd can not read rrd files created on unix and vice versa. See [oetiker/rrdtool-1.x#759](https://github.com/oetiker/rrdtool-1.x/issues/759)

This library supports reading:

- rrds created on 64bit linux from 64bit Windows
- rrds created on 64bit Windows from 64bit Linux

**Only meant to export/dump data out of rrd file.**

This library is based on [javascriptRRD](http://javascriptrrd.sourceforge.net/)

Example
-------

[](#example)

Convert RRD to CSV: [rrd\_to\_csv.php](examples/rrd_to_csv.php)

```
$reader = RrdReader::createFromPath('path/to/my_rrd.rrd');

$fp = fopen('output.csv', 'wb');
$reader->outputAsCsv($fp, [
    'ds' => 'value'
]);
fclose($fp);

```

Filter rrd: [read\_rrd.php](examples/read_rrd.php)

```
$reader = RrdReader::createFromPath('path/to/my_rrd.rrd');

$traversable = $reader->getAll([
    'ds' => 'value',
    'row_filter_callback' => function (int $timestamp, float $value, RrdDs $ds, RraInfo $rra) {
        return $value < 8;
    }
]);

/** @var RrdRowValue $value */
foreach ($traversable as $value) {
    echo $value . PHP_EOL;
}

```

Output would be:

```
timestamp=1521054891, value=6.000000, cf=AVERAGE, ds=value, step=1
timestamp=1521054892, value=7.000000, cf=AVERAGE, ds=value, step=1
timestamp=1521054891, value=6.000000, cf=MAX, ds=value, step=1
timestamp=1521054892, value=7.000000, cf=MAX, ds=value, step=1

```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance56

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/701db8b9f90e314e74d35cf5b2a88f5308eb036aa74d08bb4b7a54a04055d53d?d=identicon)[aldas](/maintainers/aldas)

---

Top Contributors

[![aldas](https://avatars.githubusercontent.com/u/2320301?v=4)](https://github.com/aldas "aldas (10 commits)")[![dev97](https://avatars.githubusercontent.com/u/1125391?v=4)](https://github.com/dev97 "dev97 (1 commits)")

---

Tags

phprrdrrdtool

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aldas-rrd-php-reader/health.svg)

```
[![Health](https://phpackages.com/badges/aldas-rrd-php-reader/health.svg)](https://phpackages.com/packages/aldas-rrd-php-reader)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
