Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba0af9d
commit 1e5c795
Showing
6 changed files
with
125 additions
and
430 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
/* | |||
Example HTML/javascript file that display the | |||
content of a RRD archive file | |||
Part of the javascriptRRD package | |||
Copyright (c) 2009 Frank Wuerthwein, fkw@ucsd.edu | |||
Original repository: http://javascriptrrd.sourceforge.net/ | |||
MIT License [http://www.opensource.org/licenses/mit-license.php] | |||
*/ | |||
|
|||
/* | |||
This example will print out RRD content in integer format. | |||
Make sure all RRD values can fit in an integer | |||
*/ | |||
var bf = require('../lib/binaryFile.js') | |||
var rrf = require('../lib/rrdFile.js') | |||
|
|||
console.log('RRD Raw Content') | |||
var fname = 'example1.rrd' | |||
|
|||
bf.FetchBinaryURLAsync(fname, function(binfile){ | |||
var rrd_data = new rrf.RRDFile(binfile) | |||
var nrDSs=rrd_data.getNrDSs() | |||
|
|||
for (var i=0; i<nrDSs; i++) { | |||
var ds=rrd_data.getDS(i) | |||
var rra=rrd_data.getRRA(i) | |||
console.log(ds.getName()) | |||
for(var j=0; j<rra.getNrRows(); j++) { | |||
console.log(Math.round(rra.getElFast(j, i))) | |||
} | |||
} | |||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.