Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No input b/w for aggregate graph: first input line skipped erroneously #25

Open
sthen opened this issue Mar 30, 2016 · 0 comments
Open

Comments

@sthen
Copy link

sthen commented Mar 30, 2016

I'm trying to use this to give a "max traffic of last 24 hours" map:

SET rrd_start now-1day
SET rrd_period 86400
SET rrd_aggregate_function MAXIMUM

At least with rrdtool 1.5.5 this is only showing traffic in one direction, the other is 0. This is because WeatherMapDataSource_rrd.php is skipping the first (supposedly blank) line. Removing the skip fixes it for me and doesn't seem to cause additional problems (it's checking for IN/OUT strings anyway and skipping other lines).

--- lib/datasources/WeatherMapDataSource_rrd.php.orig   Wed Mar 30 11:26:34 2016
+++ lib/datasources/WeatherMapDataSource_rrd.php    Wed Mar 30 11:26:42 2016
@@ -281,7 +281,6 @@ class WeatherMapDataSource_rrd extends WeatherMapDataS

        if (isset($pipe))
        {
-           fgets($pipe, 4096); // skip the blank line
            $buffer='';
            $data_ok = FALSE;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant