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

    Rate command

    Scheduled Pinned Locked Moved General pfSense Questions
    10 Posts 7 Posters 2.2k 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.
    • H
      Harvy66
      last edited by

      What's this "rate" command that is using 100% of a core and making my CPU run at 60c? I should adjust my fan scaling in my bios. Meh.

      last pid:  7075;  load averages:  1.00,  1.00,  1.00  up 14+22:18:05    17:07:43
      149 processes: 6 running, 113 sleeping, 30 waiting

      Mem: 22M Active, 178M Inact, 325M Wired, 988K Cache, 1481M Buf, 7304M Free
      Swap:

      PID USERNAME PRI NICE  SIZE    RES STATE  C  TIME    WCPU COMMAND
      97153 root    103    0 15156K  2236K CPU1    1 276.9H 100.00% /usr/local/bin/rate -i igb0 -nlq 1 -Aba 20
        11 root    155 ki31    0K    64K RUN    2 283.9H  82.86% [idle{idle: cpu2}]
        11 root    155 ki31    0K    64K CPU3    3 286.5H  78.27% [idle{idle: cpu3}]
        11 root    155 ki31    0K    64K RUN    1 289.6H  77.39% [idle{idle: cpu1}]
        11 root    155 ki31    0K    64K CPU0    0 280.5H  65.67% [idle{idle: cpu0}]
      96017 root      24    0  223M 34832K piperd  3  0:00  0.20% php-fpm: pool lighty (php-fpm)
        12 root    -60    -    0K  480K WAIT    0 127:37  0.00% [intr{swi4: clock}]
        15 root    -16    -    0K    16K -      0 102:42  0.00% [rand_harvestq]
        12 root    -92    -    0K  480K WAIT    0  45:50  0.00% [intr{irq269: igb1:que}]
        12 root    -92    -    0K  480K WAIT    2  42:43  0.00% [intr{irq271: igb1:que}]
        12 root    -92    -    0K  480K WAIT    1  41:37  0.00% [intr{irq270: igb1:que}]
        12 root    -92    -    0K  480K WAIT    0  40:41  0.00% [intr{irq264: igb0:que}]
        12 root    -92    -    0K  480K WAIT    3  40:18  0.00% [intr{irq272: igb1:que}]
        12 root    -92    -    0K  480K WAIT    1  39:07  0.00% [intr{irq265: igb0:que}]
        12 root    -92    -    0K  480K WAIT    3  38:56  0.00% [intr{irq267: igb0:que}]
        12 root    -92    -    0K  480K WAIT    2  35:20  0.00% [intr{irq266: igb0:que}]
      32183 root      20    0 91760K 40472K kqread  2  21:04  0.00% /usr/local/sbin/lighttpd -f /var/etc/light
          5 root    -16    -    0K    16K pftm    0  15:17  0.00% [pf purge]

      edit:

      I have not rebooted or killed it yet in case someone wants me to do something.

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        FreeBSD net-mgmt : rate
        A traffic analysis command-line utility

        Rate is a swiss-army-knife command-line traffic analysis tool, designed
        to help a network administrator to see what is happening at a router at
        the moment. Unlike tcpdump(1), rate uses statistical and stream-oriented
        methods, and will never produce an output stream at a speed beyond human
        perception. The output is less accurate, however. Rate features four
        different operating modes, designed to perform the following tasks:
        estimating overall traffic rates, determining nodes generating the
        highest traffic, determining connections and flows generating the highest
        traffic and extracting strings from packets.

        something like ntop or darkstat running?

        1 Reply Last reply Reply Quote 0
        • H
          Harvy66
          last edited by

          Nope

          I did find some hots from 2013 about rate being used for RRD statistics gathering or something. Someone mentioned it randomly going "crazy" and eating CPU. This is why I haven't rebooted or anything yet in case someone wants me to run some commands to find more info.

          1 Reply Last reply Reply Quote 0
          • H
            Harvy66
            last edited by

            I finally rebooted and turned up my BIOS fan settings to be more aggressive. 100% fan speed by 55c instead of 70c for my CPU and 50c for my system…. I can start to hear the fan now... /cry

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              That is the Status->Traffic Graph collecting data to fill the table of Host/In/Out bandwidth hogs.
              https://github.com/pfsense/pfsense/blob/master/usr/local/www/bandwidth_by_ip.php#L100
              It should not use much CPU on average, but it does run every 1 second to gather a short sample of network activity.
              Somehow your process is in a CPU knot - it has used 276.9 hours of CPU!

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

                I just ran into this on pfsense 2.2.5..  I did leave the traffic graph open in a tab for a long time.

                Here's what it looked like:

                ps aux

                USER      PID  %CPU %MEM    VSZ    RSS TT  STAT STARTED        TIME COMMAND
                root      11    302.4  0.0          0        64  -  RL  27Nov15 201836:18.56 [idle]
                root    55232 100.0  0.0  15156    2364  -  R    23Dec15  17843:35.14 /usr/local/bin/rate -i igb0 -nlq 1 -Aba 20 -R -c 192.168.1.0/24
                ..

                So I killed it and the CPU usage went back to down to normal..

                kill -s KILL

                1 Reply Last reply Reply Quote 0
                • L
                  liontaur
                  last edited by

                  Sorry to drag up an old thread but i'm experiencing the same thing on 2.3.1-RELEASE-p5 which is running on an SG-2440. Rate is taking up 100% of a core and navigating the pfsense GUI via web browser is sluggish. I ran ps and it came back with:

                  USER    PID  %CPU %MEM    VSZ   RSS TT  STAT STARTED        TIME COMMAND
                  root  34851 100.0  0.1  15028  2244  -  R     6Jul16 11071:28.23 /usr/local/bin/rate -i igb1 -nlq 1 -Aba 20 -R -c 172.16.0.0/22
                  
                  

                  I do always have a browser tab opened to the dashboard and another tab opened to the LAN traffic graph. Is there a way to prevent rate from taking up an entire core?

                  I have another pfsense, same version but on a Supermicro 5018A-FTN4. And I have a browser tab opened to the dashboard and another tab for the LAN traffic graph on it and it's behaving fine. I ran a ps on it and here's what it came back with:

                  USER     PID  %CPU %MEM    VSZ   RSS TT  STAT STARTED         TIME COMMAND
                  root   68720   0.0  0.0  17000  2528  -  S     1:35PM      0:00.00 sh -c /usr/local/bin/rate -i igb1 -nlq 1 -Aba 20 -R -c 192.168.0.0/20 | tr "|" " " | awk '{ printf "%s:%s:%s:%s:%s\\n", $1,  $2,  $4,  $6,  $8 }'
                  
                  

                  Thanks,

                  Mark

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    You can rename the rate command so it doesn't run. I haven't heard of that being an issue on 2.3.x on any hardware, though.

                    mv /usr/local/bin/rate /usr/local/bin/rate-disabled
                    

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

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

                      Just curious - why not chmod -x ?

                      Need full pfSense in a cloud? PM for details!

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        @pan_2:

                        Just curious - why not chmod -x ?

                        That should work, too. I prefer to rename though.

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

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