Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    RRD Graphs for Queues?

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    19 Posts 4 Posters 7.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jwrascoe
      last edited by

      just for the record.. this is what I am running..

      pfSense-2.0-BETA1-4g-20091228-0825-nanobsd.img.gz

      2.0-BETA1
      built on Sat Dec 26 03:11:15 EST 2009
      FreeBSD pfSense.local 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #0: Sat Dec 26 03:07:26 EST 2009 sullrich@FreeBSD_8.0_pfSense_2.0-snaps.pfsense.org:/usr/obj.pfSense/usr/pfSensesrc/src/sys/pfSense_wrap.8.i386 i386

      1 Reply Last reply Reply Quote 0
      • J
        jlepthien
        last edited by

        After you rm the files please type an ls -l /var/db/rrd/ and look if the files are really deleted. And also do not forget to click save on the rrd settings tab in the GUI.

        | apple fanboy | music lover | network and security specialist | in love with cisco systems |

        1 Reply Last reply Reply Quote 0
        • J
          jwrascoe
          last edited by

          yes.. it actually deletes the files…

          Here is the trace below.. and of course the system, traffic & packets graphs all reset so I know the files have been deleted and recreated... its just the queue graphs that never seem to want to generate...

          Here is the trace that shows my steps...

          Anything else I can do to assist in the debug process?

          Jim

          [2.0-BETA1]                                                                                                                       
          [admin@pfSense.local]/root(7): ls /var/db/rrd/
          ipsec-packets.rrd      lan-queuedrops.rrd      system-memory.rrd      updaterrd.sh            wan-queues.rrd
          ipsec-traffic.rrd      lan-queues.rrd          system-processor.rrd    wan-packets.rrd        wan-traffic.rrd
          lan-packets.rrd        lan-traffic.rrd        system-states.rrd      wan-queuedrops.rrd

          [2.0-BETA1]                                                                                                                       
          [admin@pfSense.local]/root(8): rm /var/db/rrd/*.rrd

          [2.0-BETA1]                                                                                                                       
          [admin@pfSense.local]/root(9): ls /var/db/rrd/
          updaterrd.sh

          I went to the web interface and pressed save on Status -> RRD Graphs -> Settings

          [2.0-BETA1]                                                                                                                       
          [admin@pfSense.local]/root(10): ls /var/db/rrd/
          ipsec-packets.rrd      lan-queuedrops.rrd      system-memory.rrd      updaterrd.sh            wan-queues.rrd
          ipsec-traffic.rrd      lan-queues.rrd          system-processor.rrd    wan-packets.rrd        wan-traffic.rrd
          lan-packets.rrd        lan-traffic.rrd        system-states.rrd      wan-queuedrops.rrd

          1 Reply Last reply Reply Quote 0
          • S
            stephenyeong
            last edited by

            @jwrascoe:

            jlepthlen,

            Yes.. I saw that post and hoped it would fix…

            First I removed the traffic & packets .rrd files as outlined in the post... that did not work..

            So I then removed all .rrd files  rm /var/db/rrd/*.rrd ... and still the same problem...

            The actual log message says that it "could not parse color" .. I am not sure how to resolve this.. do you have any insight in this department?

            --JR

            php: /status_rrd_graph_img.php: Failed to create graph with error code 1, the error is: ERROR: Could not parse color in ''/usr/bin/nice -n20 /usr/local/bin/rrdtool graph /tmp/wan-queues.rrd-4y.png --start -126489600 -e -86400 --vertical-label "bits/sec" --color SHADEA#eeeeee --color SHADEB#eeeeee --title "hostname - WAN :: Queues - 4 years - 1 day average" --height 200 --width 620 -x "MONTH:1:YEAR:1:MONTH:3:0:%b" DEF:"wan=/var/db/rrd/wan-queues.rrd:wan:AVERAGE" CDEF:"wan-bytes_out=wan,0,114176,LIMIT,UN,0,wan,IF" CDEF:"wan-bits_out=wan-bytes_out,8," AREA:"wan-bits_out#:wan" DEF:"qInternet=/var/db/rrd/wan-queues.rrd:qInternet:AVERAGE" CDEF:"qInternet-bytes_out=qInternet,0,114176,LIMIT,UN,0,qInternet,IF" CDEF:"qInternet-bits_out=qInternet-bytes_out,8," AREA:"qInternet-bits_out#7B0000:qInternet" DEF:"qACK=/var/db/rrd/wan-queues.rrd:qACK:AVERAGE" CDEF:"qACK-bytes_out=qACK,0,114176,LIMIT,UN,0,qACK,IF" CDEF:"qACK-bits_out=qACK-bytes_out,8,*" AREA:"qACK-bits_out#990000:qACK" DEF:"qDefault=/var

            it seems related to

            AREA:"wan-bits_out#:

            missing color value.
            I found many lines of this error in my system.log
            just copy one line and replace the color with a valid color code, a valid png produced.

            1 Reply Last reply Reply Quote 0
            • S
              stephenyeong
              last edited by

              Solution found
              file /usr/local/www/status_rrd_graph_img.php
              at about line 677
              missing initialize of $t = 0

              1 Reply Last reply Reply Quote 0
              • J
                jwrascoe
                last edited by

                Humm….

                Mine seems to have it in it already.. but still does not work....

                Here is the code section that you are talking about in that file...

                could it be something else?

                Let me know..

                Jim

                elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
                        /* define graphcmd for queue stats /
                        $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$interval.png ";
                        $graphcmd .= "--start -$seconds -e -$average ";
                        $graphcmd .= "--vertical-label "bits/sec" ";
                        $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
                        $graphcmd .= "--title "hostname - {$prettydb} - {$hperiod} - {$havg} average" ";
                        $graphcmd .= "--height 200 --width 620 -x "$scale" ";
                        if ($altq) {
                                $a_queues =& $altq->get_queue_list();
                        } else {
                                $a_queues = array();
                                $i = 0;
                                $t = 0;
                        }
                        foreach ($a_queues as $name => $q) {
                                $color = "$colorqueuesup[$t]";
                                if($t > 0) { $stack = ":STACK"; }
                                $graphcmd .= "DEF:"$name=$rrddbpath$curdatabase:$name:AVERAGE" ";
                                $graphcmd .= "CDEF:"$name-bytes_out=$name,0,$speedlimit,LIMIT,UN,0,$name,IF" ";
                                $graphcmd .= "CDEF:"$name-bits_out=$name-bytes_out,8,
                " ";
                                $graphcmd .= "$AREA:"$name-bits_out#${color}:$name" ";
                                $t++;
                                if($t > 7) { $t = 0; }
                        }
                        $graphcmd .= "COMMENT:"\n" ";
                        $graphcmd .= "COMMENT:"\t\t\t\t\t\t\t\t\t\t\t\t\tdate +\"%b %d %H\:%M\:%S %Y\"" ";
                }

                1 Reply Last reply Reply Quote 0
                • J
                  jwrascoe
                  last edited by

                  After I actually read the code it was obvious where it was supposed to be… the code is below

                  All works fine now...

                  Thanks again for your help..

                  Happy New Year!

                  Jim

                  if ($altq) {
                                  $a_queues =& $altq->get_queue_list();
                                  $t = 0; // This is the line that needs to be added!
                          } else {
                                  $a_queues = array();
                                  $i = 0;
                                  $t = 0;
                          }

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenyeong
                    last edited by

                    Queue-Drop got same problem ( same solution )

                    1 Reply Last reply Reply Quote 0
                    • C
                      cmb
                      last edited by

                      @jwrascoe:

                      if ($altq) {
                                      $a_queues =& $altq->get_queue_list();
                                      $t = 0; // This is the line that needs to be added!

                      I committed this fix, thanks

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenyeong
                        last edited by

                        Also line 705, for the queuedrop, same case, $t need initialize to 0

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.