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

    Processor stats MIA in RRD

    1.2.3-PRERELEASE-TESTING snapshots - RETIRED
    5
    10
    4.4k
    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.
    • R
      ryates
      last edited by

      1.2.3-PRERELEASE-TESTING-VERSION
      built on Sun Jan 25 02:46:17 EST 2009

      Auto update from 1.2.2

      Processor stats not displayed under RRD.  Others (eg quality, traffic) seem fine.

      ryts

      1 Reply Last reply Reply Quote 0
      • N
        n1ko
        last edited by

        Works fine for me, just updated from 1.22

        1 Reply Last reply Reply Quote 0
        • T
          the6thday
          last edited by

          @ryates:

          1.2.3-PRERELEASE-TESTING-VERSION
          built on Sun Jan 25 02:46:17 EST 2009

          Auto update from 1.2.2

          Processor stats not displayed under RRD.  Others (eg quality, traffic) seem fine.

          Same here…

          Processor usage stats are there, but always 0.0 all other graphs are fine... man. update from 1.2.2 to 1.2.3-PRERELEASE-TESTING-VERSION
          built on Sun Jan 25 14:48:18 EST 2009

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

            Same here, must be something different in FreeBSD 7.1.

            1 Reply Last reply Reply Quote 0
            • N
              n1ko
              last edited by

              Yep, I was too fast to say that those works, it seems that I dont have those either.

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

                Edit /etc/inc/pfsense-utils.inc and add a colon after CPU on this line:

                $rrdupdatesh .= "else if ( $1 == "CPU" ) { ";

                so it reads:
                                        $rrdupdatesh .= "else if ( $1 == "CPU:" ) { ";

                save the file, and that should work.  Haven't committed that yet.

                1 Reply Last reply Reply Quote 0
                • N
                  n1ko
                  last edited by

                  Should I reboot too? I tried this and after 30minutes I still got nothing

                  1 Reply Last reply Reply Quote 0
                  • R
                    ryates
                    last edited by

                    @ CMB,

                    The edit did nothing on my setup, even with a reboot.

                    NOT TRUE >>>>The problem lies with the values top presents to the the script.<<<< because processes get picked up from top just fine…

                    ryts

                    PS The edit made the processes graph line disappear, tho' the values remain displayed below. Remove the ":" and the processes line graph comes back.

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

                      look in pfsense-utils.inc and find the cpu stats gathering function.

                      It needs to look like this code, which is actually from 2.0 but should work fine.

                      /* the CPU stats gathering function. */
                                              $rrdupdatesh .= "`$top -d 2 -s 1 0 | $awk '{gsub(/%/, \"\")} BEGIN { \\\n";
                                              $rrdupdatesh .= "printf \"$rrdtool update $rrddbpath$ifname$proc \" } \\\n";
                                              $rrdupdatesh .= "{ if ( \$2 == \"processes:\" ) { processes = \$1; } \\\n";
                                              $rrdupdatesh .= "else if ( \$1 == \"CPU:\" ) { user = \$2; nice = \$4; sys = \$6; interrupt = \$8; } \\\n";
                                              $rrdupdatesh .= "} END { printf \"N:\"user\":\"nice\":\"sys\":\"interrupt\":\"processes }'`\n\n";
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • R
                        ryates
                        last edited by

                        @databeestje:

                        look in pfsense-utils.inc and find the cpu stats gathering function.

                        It needs to look like this code, which is actually from 2.0 but should work fine.

                        /* the CPU stats gathering function. */
                                                $rrdupdatesh .= "`$top -d 2 -s 1 0 | $awk '{gsub(/%/, \"\")} BEGIN { \\\n";
                                                $rrdupdatesh .= "printf \"$rrdtool update $rrddbpath$ifname$proc \" } \\\n";
                                                $rrdupdatesh .= "{ if ( \$2 == \"processes:\" ) { processes = \$1; } \\\n";
                                                $rrdupdatesh .= "else if ( \$1 == \"CPU:\" ) { user = \$2; nice = \$4; sys = \$6; interrupt = \$8; } \\\n";
                                                $rrdupdatesh .= "} END { printf \"N:\"user\":\"nice\":\"sys\":\"interrupt\":\"processes }'`\n\n";
                        
                        

                        It does!

                        tnx - pretty graphs are a must, aren't they  :D

                        ryts

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