Sponsored Content
Full Discussion: RRD graph explain
Special Forums IP Networking RRD graph explain Post 302399056 by Scott on Friday 26th of February 2010 06:34:13 AM
Old 02-26-2010
Hi.

You can find the step using:

Code:
rrdtool info yourdbname.rrd | grep step

If the step is 300 (5 minutes) then rrdtool will average data (or whatever consolidation function your db is created with) given over any five minute period.

Unless I'm mistaken, the only way to change the step is to:
Code:
rrdtool dump yourdbname.rrd > yourdbname.xml
(edit the XML file)
rrdtool restore yourdbname.xml yourdbname.rrd

This link explains quite well how the step works.

Of course, this is all on the understanding that they provided you with the RRD database file, and not just the PNG graph file.
This User Gave Thanks to Scott For This Post:
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Graph generation

How can I generate graphs using perl in unix solaris environment? Please suggest. (2 Replies)
Discussion started by: wadhwa.pooja
2 Replies

2. AIX

Performance graph

Guru's I need to develop a graph which shows the CPU, memory and swap space utilization in a single graph against time I know of NMON but I am not able to make a single graph out of it. Does anyone know of any script or tool for data sampling and developing graph? Thanks in advance ... (1 Reply)
Discussion started by: balaji_prk
1 Replies

3. Infrastructure Monitoring

moving rrd data to mysql

All I currently run an application called OpenNMS. This is a free enterprise grade NMS. Its current framework uses RRDs to collect performance/node level data such as cpu load via snmp. all data is stored in these RRDs. I was wondering if anyone out there has had a chance or a need to move the... (2 Replies)
Discussion started by: pupp
2 Replies

4. Shell Programming and Scripting

Script that will be a cron job to export rrd files for cacti server

I wrote a quick little script that will eventually end up as a cron job to export rrd files for my cacti server. Here is the script: #!/bin/bash rm -rf /backup/cacti_xml/* cd /var/www/html/rra ls -1 *.rrd | awk '{print "rrdtool dump "$1" > /backup/cacti_xml/"$1".xml"}' | sh -x Is there... (5 Replies)
Discussion started by: TheBigAmbulance
5 Replies

5. Infrastructure Monitoring

JFFNMS: RRD files for imterface id 2190 has not been created by the Poller Process yet

hi, When we tried to add host in jffnms and marked all interfaces, it worked well with newly added hosts for linux. However if its solaris, we cannot see CPU interface. The error in the graph is RRD files for interface id 2190 has not been created by the Poller Process yet. Pls advise. ... (0 Replies)
Discussion started by: lhareigh890
0 Replies

6. Programming

Graph in java

Hello, Please how can represent this graph in java ? i have to apply an algorithm on this graphe, the first instruction of the algorithm is to verify if the three last vertices are dependent or not ? Thank you. (1 Reply)
Discussion started by: chercheur857
1 Replies

7. Shell Programming and Scripting

Rrdtool fetch traffic.rrd

Hi, i'm beginer in programmer I need a script for read file.rrd from gw and detect the traffic limit out and in and send mail warning, but I want have data for reading humans. I need convert numbers In, Out in Mbps/s I found this command with awk, but a want in shell Ex: > rrdtool... (4 Replies)
Discussion started by: tigo17
4 Replies
RRDLUA(1)							      rrdtool								 RRDLUA(1)

NAME
RRDLua - Lua binding for RRDTool SYNOPSIS
require 'rrd' rrd.create(...) rrd.dump(...) rrd.fetch(...) rrd.first(...) rrd.graph(...) rrd.graphv(...) rrd.info(...) rrd.last(...) rrd.resize(...) rrd.restore(...) rrd.tune(...) rrd.update(...) rrd.updatev(...) DESCRIPTION
Calling Sequence This module accesses RRDtool functionality directly from within Lua. The arguments to the functions listed in the SYNOPSIS are explained in the regular RRDtool documentation. The command-line call rrdtool update mydemo.rrd --template in:out N:12:13 gets turned into rrd.update ("mydemo.rrd", "--template", "in:out", "N:12:13") Note that --template=in:out is also valid. Using with Lua 5.1 Start your programs with: --------------------------------------------------------------- package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.1/?.so;' .. package.cpath require 'rrd' --------------------------------------------------------------- OBS: If you configured with --enable-lua-site-install, you don't need to set package.cpath like above. Using with Lua 5.0 The Lua binding for RRDtool needs the Lua module compat-5.1 to work with Lua 5.0. Some Linux distros, like Ubuntu gutsy and hardy, have it already integrated in Lua 5.0 -dev packages, so you just have to require it: require 'compat-5.1' For other platforms, the compat-5.1 module that comes with this binding will be installed for you in the same dir where RRDtool was installed, under the subdir .../lib/lua/5.0. In this case, you must tell your Lua programs where to find it by changing the Lua var LUA_PATH: -- compat-5.1.lua is only necessary for Lua 5.0 ---------------- -- try only compat-5.1 installed with RRDtool package local original_LUA_PATH = LUA_PATH LUA_PATH = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.lua' require 'compat-5.1' LUA_PATH = original_LUA_PATH original_LUA_PATH = nil --- end of code to require compat-5.1 --------------------------- Now we can require the rrd module in the same way we did for 5.1 above: --------------------------------------------------------------- package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' .. package.cpath require 'rrd' --------------------------------------------------------------- Error Handling The Lua RRDTool module functions will abort your program with a stack traceback when they can not make sense out of the arguments you fed them. However, you can capture and handle the errors yourself, instead of just letting the program abort, by calling the module functions through Lua protected calls - 'pcall' or 'xpcall'. Ex: program t.lua --- compat-5.1.lua is only necessary for Lua 5.0 ---------------- -- uncomment below if your distro has not compat-5.1 -- original_LUA_PATH = LUA_PATH -- try only compat-5.1.lua installed with RRDtool package -- LUA_PATH = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.lua' -- here we use a protected call to require compat-5.1 local r = pcall(require, 'compat-5.1') if not r then print('** could not load compat-5.1.lua') os.exit(1) end -- uncomment below if your distro has not compat-5.1 -- LUA_PATH = original_LUA_PATH -- original_LUA_PATH = nil --- end of code to require compat-5.1 --------------------------- -- If the Lua RRDTool module was installed together with RRDTool, -- in /usr/local/rrdtool-1.3.2/lib/lua/5.0, package.cpath must be -- set accordingly so that 'require' can find the module: package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' .. package.cpath local rrd = require 'rrd' rrd.update ("mydemo.rrd","N:12:13") If we execute the program above we'll get: $ lua t.lua lua: t.lua:27: opening 'mydemo.rrd': No such file or directory stack traceback: [C]: in function `update' t.lua:27: in main chunk [C]: ? Return Values The functions rrd.first, rrd.last, rrd.graph, rrd.info and rrd.fetch return their findings. rrd.first returns a single INTEGER representing the timestamp of the first data sample in an RRA within an RRD file. Example returning the first timestamp of the third RRA (index 2): local firstdate = rrd.first('example.rrd', '--rraindex', 2) rrd.last returns a single INTEGER representing the last update time. local lastupdate = rrd.last('example.rrd') rrd.graph returns the x-size and y-size of the created image and a table with the results of the PRINT arguments. local xsize, ysize, averages = rrd.graph ... print(string.format("Image size: %dx%d", xsize, ysize) print("Averages: ", table.concat(averages, ', ')) rrd.info returns a table where the keys and the values represent property names and property values of the RRD. local info = rrd.info("test.rrd") for key, value in pairs(info) do print(key, ' = ', value) end rrd.graphv takes the same parameters as rrd.graph but it returns a table only. The table returned contains meta information about the graph, like its size as well as the position of the graph area on the image. When called with and empty filename, the contents of the graph will be returned in the table as well (key 'image'). rrd.updatev also returns a table. The keys of the table are strings formed by the concatenation of timestamp, RRA index and data source name for each consolidated data point (CDP) written to disk as a result of the current update call. The key values are CDP values. rrd.fetch is the most complex of the pack regarding return values. It returns 5 values: the initial timestamp, the step, two parallel arrays containing the data source names and their data points respectively, and the final timestamp. --require compat-5.1 if necessary package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' .. package.cpath local rrd = require "rrd" local first, last = rrd.first("test.rrd"), rrd.last("test.rrd") local start, step, names, data = rrd.fetch("test.rrd", "--start", first, "--end", last, "AVERAGE") io.write(string.format("Start: %s (%d) ", os.date("%c", start),start)) io.write("Step size: ", step, " seconds ") io.write("DS names: ", table.concat(names, ', '), " ") io.write("Data points: ", #data[1], " ") io.write("Data: ") for i,dp in ipairs(data) do io.write(os.date("%t", start), " (", start, "): ") start = start + step for j,v in ipairs(dp) do io.write(v, " ") end io.write(" ") end AUTHOR
Fidelis Assis <fidelis@pobox.com> 1.4.8 2013-05-23 RRDLUA(1)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy