Skip to content

Commit

Permalink
Back off RRD version to 3
Browse files Browse the repository at this point in the history
This is the default in upstream rrdtool, unless the RRD needs special
features.  ALso fix a bug in the dump_file function.

With these fixes, I successfully made a graph using:

 $ rrdtool graph -s now-10m -e now test.png DEF:foo=test.rrd:foo:AVERAGE AREA:foo#00ff00
  • Loading branch information
wingo committed Jun 12, 2018
1 parent 6e7b988 commit bfe4f3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/rrd.lua
Expand Up @@ -18,7 +18,7 @@ end
local RRD = {}

local rrd_cookie = "RRD\0"
local rrd_version = "0005\0"
local rrd_version = "0003\0"
local float_cookie = 8.642135E130

local fixed_header_t = ffi.typeof [[struct {
Expand Down Expand Up @@ -298,7 +298,7 @@ function dump(rrd, stream)
end

function dump_file(rrd, filename)
local f = file:open(filename, 'w')
local f = file.open(filename, 'w')
dump(rrd, f)
f:close()
end
Expand Down

0 comments on commit bfe4f3d

Please sign in to comment.