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

    Issues with RRD Graphs in v1.2-BETA-1

    webGUI
    3
    8
    4.0k
    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.
    • B
      Borage
      last edited by

      Yesterday, I downloaded pfSense 1.2-BETA-1 and installed the system to a harddisk drive. I find out that only the "Quality" graph shows some information, the other tabs is empty. I'm quite sure that it worked from the live cd, but not after the installation.

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

        This means it has not accumulated enough data to present the graphs.  Give it a day or so.

        1 Reply Last reply Reply Quote 0
        • B
          Borage
          last edited by

          You were right, now I have some charts displaying. What is still missing is the chart for the WAN interface. I have had a constant 2 Mbit/s stream of data from my LAN through the WAN interface the last 24 hours, but still no charts for the interface.

          1 Reply Last reply Reply Quote 0
          • D
            databeestje
            last edited by

            This would mean the update script could be broken.

            can you show me what databases you have in /var/db/rrd?
            ls -lh /var/db/rrd

            and the contents from the updaterrd.sh script please.

            Are you using a traffic shaper? Bridged interfaces? Vlans?

            1 Reply Last reply Reply Quote 0
            • B
              Borage
              last edited by

              @databeestje:

              can you show me what databases you have in /var/db/rrd?
              ls -lh /var/db/rrd

              $ ls -lh /var/db/rrd
              total 3660
              -rw-r–r--  1 root  wheel  128K May 14 19:23 ipsec-packets.rrd
              -rw-r--r--  1 root  wheel  128K May 14 19:23 ipsec-traffic.rrd
              -rw-r--r--  1 root  wheel  128K May 14 19:23 lan-packets.rrd
              -rw-r--r--  1 root  wheel  128K May 14 19:23 lan-traffic.rrd
              -rw-r--r--  1 root  wheel  476K May 14 19:23 system-processor.rrd
              -rw-r--r--  1 root  wheel  476K May 14 19:23 system-states.rrd
              -rw-r--r--  1 root  wheel  2.5K May 14 03:50 updaterrd.sh
              -rw-r--r--  1 root  wheel  128K May 14 19:23 wan-packets.rrd
              -rw-r--r--  1 root  wheel    64K May 14 19:22 wan-quality.rrd
              -rw-r--r--  1 root  wheel  128K May 14 19:23 wan-traffic.rrd

              @databeestje:

              and the contents from the updaterrd.sh script please.

              $ cat /var/db/rrd/updaterrd.sh
              #!/bin/sh
              
              counter=1
              while [ "$counter" -ne 0 ]
              do
              
              # polling traffic for interface wan xl0 
              /usr/local/bin/rrdtool update /var/db/rrd/wan-traffic.rrd N:\
              `/usr/bin/netstat -nbf link -I xl0 | /usr/bin/awk '{getline 2;print $7 ":" $10}'`
              
              # polling packets for interface wan xl0 
              /usr/local/bin/rrdtool update /var/db/rrd/wan-packets.rrd N:\
              `/usr/bin/netstat -nbf link -I xl0 | /usr/bin/awk '{getline 2;print $5 ":" $8}'`
              get_quality_stats_wan () {
              	packetloss_wan=100
              	roundtrip_wan=0
              	local out_wan
              	out_wan=` ping -c 5 -q 81.236.2.1 `
              	if [ $? -eq 0 ]; then
              		packetloss_wan=` echo $out_wan | cut -f18 -d' ' | cut -c -1 `
              		roundtrip_wan=` echo $out_wan | cut -f24 -d' ' | cut -f2 -d'/' `
              	fi
              	/usr/local/bin/rrdtool update /var/db/rrd/wan-quality.rrd N:$packetloss_wan:$roundtrip_wan
              }
              
              get_quality_stats_wan &
              
              # polling traffic for interface lan xl1 
              /usr/local/bin/rrdtool update /var/db/rrd/lan-traffic.rrd N:\
              `/usr/bin/netstat -nbf link -I xl1 | /usr/bin/awk '{getline 2;print $7 ":" $10}'`
              
              # polling packets for interface lan xl1 
              /usr/local/bin/rrdtool update /var/db/rrd/lan-packets.rrd N:\
              `/usr/bin/netstat -nbf link -I xl1 | /usr/bin/awk '{getline 2;print $5 ":" $8}'`
              
              # polling traffic for interface ipsec enc0 
              /usr/local/bin/rrdtool update /var/db/rrd/ipsec-traffic.rrd N:\
              `/usr/bin/netstat -nbf link -I enc0 | /usr/bin/awk '{getline 2;print $6 ":" $9}'`
              
              # polling packets for interface ipsec enc0 
              /usr/local/bin/rrdtool update /var/db/rrd/ipsec-packets.rrd N:\
              `/usr/bin/netstat -nbf link -I enc0 | /usr/bin/awk '{getline 2;print $4 ":" $7}'`
              
              pfrate="` /sbin/pfctl -si | egrep "inserts|removals" | awk '{ pfrate = $3 + pfrate } {print pfrate}'|tail -1 `"
              pfstates="` /sbin/pfctl -ss | egrep -v "<\-.*?<\-|\->.*?\->" | wc -l|sed 's/ //g'`"
              pfnat="` /sbin/pfctl -ss | egrep '<\-.*?<\-|\->.*?\->' | wc -l|sed 's/ //g' `"
              srcip="` /sbin/pfctl -ss | egrep -v '<\-.*?<\-|\->.*?\->' | grep '\->' | awk '{print $3}' | awk -F: '{print $1}' | sort -u|wc -l|sed 's/ //g' `"
              dstip="` /sbin/pfctl -ss | egrep -v '<\-.*?<\-|\->.*?\->' | grep '<\-' | awk '{print $3}' | awk -F: '{print $1}' | sort -u|wc -l|sed 's/ //g' `"
              /usr/local/bin/rrdtool update /var/db/rrd/system-states.rrd N:$pfrate:$pfstates:$pfnat:$srcip:$dstip
              
              `/usr/bin/top -d 2 -s 1 0 | /usr/bin/awk '{gsub(/%/, "")} BEGIN { printf "/usr/local/bin/rrdtool update /var/db/rrd/system-processor.rrd " } { if ( $2 == "processes:" ) { processes = $1; } else if ( $1 == "CPU" ) { user = $3; nice = $5; sys = $7; interrupt = $9; } } END { printf "N:"user":"nice":"sys":"interrupt":"processes }'`
              
              sleep 60
              done
              
              

              @databeestje:

              Are you using a traffic shaper? Bridged interfaces? Vlans?

              No, only default install + two NAT rules.

              1 Reply Last reply Reply Quote 0
              • D
                databeestje
                last edited by

                is the update script running?

                ps auxw |grep -i rrd

                1 Reply Last reply Reply Quote 0
                • D
                  databeestje
                  last edited by

                  Does it look like the files are updated every minute?

                  The update script looks good and should perform normally.

                  1 Reply Last reply Reply Quote 0
                  • B
                    Borage
                    last edited by

                    After 48 hours it suddenly works.  ???

                    Here you can see a 300 Mbit/s peak one hour before the chart started to display something on the WAN interface.

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