php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59575 rrd_fetch? can't access ds0
Submitted: 2011-01-13 22:54 UTC Modified: 2011-03-02 04:26 UTC
From: pablo dot costa at gmail dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.2 OS: ubuntu 10.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pablo dot costa at gmail dot com
New email:
PHP Version: OS:

 

 [2011-01-13 22:54 UTC] pablo dot costa at gmail dot com
Description:
------------
I have a rrd file with in,out data, but rrd_fetch just access ds1.

Reproduce code:
---------------
<?

 $opts = array ( "AVERAGE", "--start", "1262311200", "--end", "1293847200");

  $ret = rrd_fetch("file.rrd", $opts);

print_r($ret);

?>




Expected result:
----------------
    
rrdtool fetch file.rrd AVERAGE --start 1262311200 --end 1293847199
                                                 ds0                 ds1

1262311500: 2,7027842712e+08 2,7552525894e+08
1262311800: 2,7259682962e+08 2,7844700175e+08
1262312100: 2,7178275150e+08 2,7702571926e+08
1262312400: 2,6799471103e+08 2,7306513939e+08
1262312700: 2,7352661764e+08 2,7832972723e+08
1262313000: 2,8804216759e+08 2,9270359373e+08
1262313300: 2,8301600992e+08 2,8801180484e+08


Actual result:
--------------
Array
(
    [start] => 1262311200
    [end] => 1293847200
    [step] => 300
    [ds_cnt] => 2
    [ds_navm] => Array
        (
            [0] => ds0
            [1] => ds1
        )

    [data] => Array
        (
            [1262311500] => 275525258.94
            [1262311800] => 278447001.75
            [1262312100] => 277025719.26
            [1262312400] => 273065139.39
            [1262312700] => 278329727.23
            [1262313000] => 292703593.73
            [1262313300] => 288011804.84
...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-02 04:26 UTC] koubel at seznam dot cz
thank you, rrd_fetch rewritten, there were a bug in filling the returned array. Nowadays all data sources are supported (trunk code). I made a litte bit BC break, no more ds_cnt, ds_namv keys in result array from fetch. I think these are completely useless.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC