Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7416711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:33:10+00:00 2026-05-29T07:33:10+00:00

I want to extract some hourly data from rrdtool databases in order to create

  • 0

I want to extract some hourly data from rrdtool databases in order to create some graphs within a dashboard system.

These databases don’t have an hourly datasource, the closest is a 30-min datasource (they are generated by munin)

Now, I can use rrdfetch, but that doesn’t do the nice averaging that rrdgraph would do, so something like this

rrdtool fetch xxx-apache_accesses-accesses80-d.rrd AVERAGE \
   --resolution 3600 -s 1328458200 -e 1328544600

Might give me 30 min data points like this

2012-Feb-05 16:30:00 3.5376357135e+00
2012-Feb-05 17:00:00 3.4655067194e+00
2012-Feb-05 17:30:00 4.0483210375e+00
2012-Feb-05 18:00:00 4.3210061422e+00
....

I could average those, but it seems that rrdgraph can output parsable text, but I can’t figure out the correct incantation. Here’s what I’ve tried

 rrdtool graph dummy.png -s 1328523300 -e 1328609700 \
     DEF:access=xxx-apache_accesses-accesses80-d.rrd:42:AVERAGE \
     "PRINT:access:AVERAGE: %5.1lf %S"

outputs

0x0
   4.7

Now I think that’s simply the average for the period given, but is there any way to get rrdtool to spit out an average for particular chunks or step sizes? I tried --step but this did not change the output.

I could call rrdtool graph for each data point I need, but that seems rather wasteful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:33:11+00:00Added an answer on May 29, 2026 at 7:33 am

    No sooner had I posted than I hit upon the right approach!

    rrdtool xport -s 1328523300 -e 1328609700 --step 3600 \
        DEF:access=xxx-apache_accesses-accesses80-d.rrd:42:AVERAGE \
        XPORT:access:"average"
    

    This gives me the dump I need…

    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    <xport>
      <meta>
        <start>1328526000</start>
        <step>3600</step>
        <end>1328612400</end>
        <rows>25</rows>
        <columns>1</columns>
        <legend>
          <entry>average</entry>
        </legend>
      </meta>
      <data>
        <row><t>1328526000</t><v>2.1949556516e+00</v></row>
        <row><t>1328529600</t><v>2.0074586816e+00</v></row>
        <row><t>1328533200</t><v>2.4574720485e+00</v></row>
        <row><t>1328536800</t><v>3.4861890250e+00</v></row>
        <row><t>1328540400</t><v>4.2725023347e+00</v></row>
        <row><t>1328544000</t><v>6.2119548259e+00</v></row>
        <row><t>1328547600</t><v>5.6709432075e+00</v></row>
        <row><t>1328551200</t><v>6.1214185470e+00</v></row>
        <row><t>1328554800</t><v>8.1137357347e+00</v></row>
        <row><t>1328558400</t><v>5.8345894022e+00</v></row>
        <row><t>1328562000</t><v>6.2264732776e+00</v></row>
        <row><t>1328565600</t><v>6.1652113350e+00</v></row>
        <row><t>1328569200</t><v>5.8851025574e+00</v></row>
        <row><t>1328572800</t><v>5.4612112119e+00</v></row>
        <row><t>1328576400</t><v>6.3908056120e+00</v></row>
        <row><t>1328580000</t><v>6.0361776174e+00</v></row>
        <row><t>1328583600</t><v>6.3164590113e+00</v></row>
        <row><t>1328587200</t><v>6.0902986521e+00</v></row>
        <row><t>1328590800</t><v>4.6756445168e+00</v></row>
        <row><t>1328594400</t><v>3.9461916905e+00</v></row>
        <row><t>1328598000</t><v>2.9449490046e+00</v></row>
        <row><t>1328601600</t><v>2.4011760751e+00</v></row>
        <row><t>1328605200</t><v>2.2187817639e+00</v></row>
        <row><t>1328608800</t><v>2.1775208736e+00</v></row>
        <row><t>1328612400</t><v>NaN</v></row>
      </data>
    </xport>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use ADO.net to extract some data from an Excel file. This
I want to extract some data from the database without refreshing a page. What
I'm new to python. I want to extract some text from the CNN website.
Let's assume I extract some set of data. i.e. SELECT A, date FROM table
Currently, I'm developing a system which will extract some files from an SFX archive
I've got a xml that I'm parsing and trying to extract some data from.
I am trying to extract some data from an XML input with 6 lines,
I have a chunk of data from which I need to extract some strings
Using PHP Regular Expression I want to extract some value from code <?xml version=1.0
I need to extract some data from a webpage with php. The part that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.