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

Processor stats MIA in RRD

Scheduled Pinned Locked Moved 1.2.3-PRERELEASE-TESTING snapshots - RETIRED
10 Posts 5 Posters 4.4k 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.
  • R
    ryates
    last edited by Jan 25, 2009, 10:21 AM

    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 Jan 25, 2009, 11:44 AM

      Works fine for me, just updated from 1.22

      1 Reply Last reply Reply Quote 0
      • T
        the6thday
        last edited by Jan 25, 2009, 9:09 PM

        @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 Jan 25, 2009, 9:22 PM

          Same here, must be something different in FreeBSD 7.1.

          1 Reply Last reply Reply Quote 0
          • N
            n1ko
            last edited by Jan 27, 2009, 7:52 AM

            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 Jan 27, 2009, 9:30 PM

              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 Jan 27, 2009, 10:44 PM

                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 Jan 28, 2009, 1:48 AM Jan 27, 2009, 11:33 PM

                  @ 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 Jan 29, 2009, 8:18 PM

                    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 Jan 30, 2009, 8:41 AM

                      @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
                      4 out of 10
                      • First post
                        4/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received