Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Mar 15, 2018
1 parent cc984fd commit 729b684
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
# Pure PHP RRDtool file reader

> Because on windows php ext-rrd can not read rrd files created on unix.
> Because on windows php ext-rrd can not read rrd files created on unix and vice versa.
> See https://github.com/oetiker/rrdtool-1.x/issues/759
**Only meant to export data out of rrd file. Not support for consolidation function etc**
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. No support for consolidation function etc**

Original repository: http://javascriptrrd.sourceforge.net/

## Example

```
use RrdPhpReader\RrdReader;
$reader = RrdReader::createFromPath('path/to/my_rrd.rrd');
$data = $reader->setDs('value')->setRraIndex(0)->getAsArray();
```
```

`$data` structure would be
```
[
'value' => [ <--- datasource as first level keys
0 => [ <--- rra index as key
1521054891 => 6, <--- timestamp => value
1521054892 => 7,
1521054893 => 8,
1521054894 => 9,
]
]
];
```

0 comments on commit 729b684

Please sign in to comment.