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

High CPU Usage after upgrading to 22.05

Scheduled Pinned Locked Moved pfBlockerNG
32 Posts 13 Posters 5.7k 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.
  • P
    provels
    last edited by Jun 28, 2022, 2:32 PM

    My little VM with the packages in my sig seems to be running normally.

    Peder

    MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
    BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

    1 Reply Last reply Reply Quote 0
    • R
      Rockyuk
      last edited by Jun 28, 2022, 3:36 PM

      There was an issue with it, I spoke to the developer and they provided the following solution.

      https://www.reddit.com/r/pfBlockerNG/comments/v7zp72/ip_block_logging_not_working_in_2205_plus_release/

      1 Reply Last reply Reply Quote 0
      • D
        dennypage
        last edited by Jun 28, 2022, 5:29 PM

        Known issue with a simple fix.

        1 Reply Last reply Reply Quote 0
        • M
          Mike-moon
          last edited by Jun 30, 2022, 7:22 AM

          Hi all, I have applied the fix referenced above but I still have 30-40% CPU usage at an i3 with 3.7GHz. With the previous version 22.01 the CPU usage was typically below 10%.
          Could there be an additional issue?
          Thanks, Mike

          M 1 Reply Last reply Jun 30, 2022, 9:06 PM Reply Quote 0
          • S
            sretalla
            last edited by Jun 30, 2022, 11:15 AM

            I can confirm I saw the issue with pfBlocker and was able to fix it by following this patch (already linked via posts above):
            https://redmine.pfsense.org/issues/13154s

            I guess I don't need to say what time I performed the fix. (I needed to restart pfBlocker after doing it)

            aa0a1ecd-913e-4578-981c-9962a9f986f9-image.png

            3066dd36-0e28-4762-b275-76594b5bcaea-image.png

            1 Reply Last reply Reply Quote 0
            • M
              Mike-moon @Mike-moon
              last edited by Jun 30, 2022, 9:06 PM

              @mike-moon said in High CPU Usage after upgrading to 22.05:

              Hi all, I have applied the fix referenced above but I still have 30-40% CPU usage at an i3 with 3.7GHz. With the previous version 22.01 the CPU usage was typically below 10%.
              Could there be an additional issue?
              Thanks, Mike

              Sorry, I made a mistake when applying the fix: I removed the bracket between the two quotes but did not replace that bracket by a space as required. After correcting this the CPU usage jumped down and the core temperatures decreased about 10 degrees. So everything is fine.
              Mike

              T J 2 Replies Last reply Jul 6, 2022, 8:13 AM Reply Quote 0
              • T
                tohil @Mike-moon
                last edited by tohil Jul 6, 2022, 8:20 AM Jul 6, 2022, 8:13 AM

                Hi,

                Upgraded the first firewall to 22.05, but I'm not experiencing high cpu load by pfblockerng.
                has this issue already been fixed in a new package release?

                /usr/local/pkg/pfblockerng/pfblockerng.inc on line 4139 at my install:

                 foreach ($list_type as $ip_type => $vtype) {
                                        if (!empty($config['installedpackages'][$ip_type]['config'])) {
                                                foreach ($config['installedpackages'][$ip_type]['config'] as $key => $list) {
                                                        if (!is_array($list)) {
                                                                $list = array();
                                                        }
                                                        if (!is_array($list['row'])) {
                                                                $list['row'] = array();
                                                        }
                
                                                        if ($vtype == '_v4') {
                                                                $list['vtype'] = '_v4';
                                                        } else {
                                                                $list['vtype'] = '_v6';
                                                        }
                
                                                        // Collect list array key location
                                                        $list['key'] = "{$key}";
                
                                                        // If only the 'customlist' is defined. Remove the 'List row' data.
                                                        if (empty($list['row'][0]['url'])) {
                                                                unset($list['row']);
                                                        }
                
                
                F 1 Reply Last reply Jul 6, 2022, 8:51 AM Reply Quote 0
                • F
                  fireodo @tohil
                  last edited by Jul 6, 2022, 8:51 AM

                  @tohil said in High CPU Usage after upgrading to 22.05:

                  /usr/local/pkg/pfblockerng/pfblockerng.inc on line 4139 at my install:

                  Maybe your Texteditor is counting wrong:

                  Here at line 4139 is "$r = explode(' ', $result, 2);"

                  Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                  SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                  pfsense 2.8.0 CE
                  Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                  T 1 Reply Last reply Jul 6, 2022, 10:58 AM Reply Quote 0
                  • T
                    tohil @fireodo
                    last edited by Jul 6, 2022, 10:58 AM

                    @fireodo said in High CPU Usage after upgrading to 22.05:

                    $r = explode(' ', $result, 2)

                    Hi

                    I'm using vi and jump to:4139

                    I even cannot find that line....
                    vi /usr/local/pkg/pfblockerng/pfblockerng.inc

                    F 1 Reply Last reply Jul 6, 2022, 11:20 AM Reply Quote 0
                    • F
                      fireodo @tohil
                      last edited by fireodo Jul 6, 2022, 11:27 AM Jul 6, 2022, 11:20 AM

                      @tohil said in High CPU Usage after upgrading to 22.05:

                      @fireodo said in High CPU Usage after upgrading to 22.05:

                      $r = explode(' ', $result, 2)

                      Hi

                      I'm using vi and jump to:4139

                      I even cannot find that line....
                      vi /usr/local/pkg/pfblockerng/pfblockerng.inc
                      If you trust me:
                      pfblockerng.txt
                      You have to change the .txt to .inc
                      Changes are allready made - you can replace the file directly.

                      Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                      SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                      pfsense 2.8.0 CE
                      Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                      T 1 Reply Last reply Jul 6, 2022, 11:27 AM Reply Quote 0
                      • T
                        tohil @fireodo
                        last edited by Jul 6, 2022, 11:27 AM

                        @fireodo
                        Okay, now its going kind of weird. I've compared my file (putty.log) with your text...
                        it seems like the file version is not the same....
                        alt text

                        F 1 Reply Last reply Jul 6, 2022, 11:30 AM Reply Quote 0
                        • F
                          fireodo @tohil
                          last edited by Jul 6, 2022, 11:30 AM

                          @tohil
                          Hmmm,

                          I have here pfblocker 3.1.0_4 devel and this pfblocker.inc file

                          Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                          SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                          pfsense 2.8.0 CE
                          Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                          T 1 Reply Last reply Jul 6, 2022, 11:32 AM Reply Quote 0
                          • T
                            tohil @fireodo
                            last edited by tohil Jul 6, 2022, 11:36 AM Jul 6, 2022, 11:32 AM

                            @fireodo
                            I have pfBlocker 2.1.4_27

                            Is this issue just with dev version?
                            Checked the bugtracker entry:

                            I'm running this on 22.01-Release and this was CPU load was not occurring prior to 3.1.0.4.
                            

                            So everyone not using pfBlockerNG higher than 3.1.04 will be affected...

                            F 1 Reply Last reply Jul 6, 2022, 11:37 AM Reply Quote 0
                            • F
                              fireodo @tohil
                              last edited by fireodo Jul 6, 2022, 11:41 AM Jul 6, 2022, 11:37 AM

                              @tohil said in High CPU Usage after upgrading to 22.05:

                              @fireodo
                              I have pfBlocker 2.1.4_27

                              Is this issue just with dev version?

                              Ooooh - in this case the file is NOT for this old Version!!! But the problem is the same the line number must be in this old version different - I suggest to upgrade to the devel version wich is actually maintained! But its in the end your decision!

                              Edit: If you find in your pfblocker .inc

                              $r = explode(')', $result, 2);
                              

                              then you should replace it with:

                              $r = explode(' ', $result, 2);
                              

                              Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                              SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                              pfsense 2.8.0 CE
                              Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tohil
                                last edited by tohil Jul 6, 2022, 11:54 AM Jul 6, 2022, 11:45 AM

                                @fireodo
                                https://forum.netgate.com/topic/156604/pfblockerng-vs-pfblockerng-devel/7

                                https://forum.netgate.com/topic/172036/solved-pfblocker-stable-vs-devel/3

                                It seems I have to update and go to the devel version on all my installs...

                                F 1 Reply Last reply Jul 6, 2022, 11:47 AM Reply Quote 0
                                • F
                                  fireodo @tohil
                                  last edited by fireodo Jul 6, 2022, 11:50 AM Jul 6, 2022, 11:47 AM

                                  @tohil said in High CPU Usage after upgrading to 22.05:

                                  @fireodo
                                  https://forum.netgate.com/topic/156604/pfblockerng-vs-pfblockerng-devel/7

                                  It seems I have to update and go to the devel version on all my installs...

                                  That would (from my point of view) be a good move ...
                                  (as far I recall, there should be no problems and all your settings are preserved - but BACKUP is allways recommended 😏 )

                                  Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                                  SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                                  pfsense 2.8.0 CE
                                  Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                                  1 Reply Last reply Reply Quote 1
                                  • J
                                    johnpoz LAYER 8 Global Moderator @Mike-moon
                                    last edited by Jul 6, 2022, 2:11 PM

                                    @mike-moon said in High CPU Usage after upgrading to 22.05:

                                    I removed the bracket between the two quotes but did not replace that bracket by a space as required

                                    I made the same mistake doing the patch by hand - hehehe

                                    Yup what a difference.

                                    space.jpg

                                    I was thinking that "fix" didn't seem to do much.. Then as you can see from graph after putting in the space between the 's cpu util dropped off to normal, and yup did see a couple of degrees difference in the temp as well.

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                                    F 1 Reply Last reply Jul 7, 2022, 11:42 AM Reply Quote 0
                                    • F
                                      FrankZappa @johnpoz
                                      last edited by Jul 7, 2022, 11:42 AM

                                      @johnpoz Johnpoz, can you give a "how to for idiots" on changing the script?
                                      I've never changed the script file and not sure how to do it e.g. What software (Putty?/Text Editor, etc) and where do I go to change it.

                                      Sorry, I'm a newbie at this.

                                      T S 2 Replies Last reply Jul 7, 2022, 11:47 AM Reply Quote 0
                                      • T
                                        tohil @FrankZappa
                                        last edited by Jul 7, 2022, 11:47 AM

                                        @frankzappa
                                        Hi

                                        connect to your pfsense via putty.

                                        enter the following

                                        vi /usr/local/pkg/pfblockerng/pfblockerng.inc
                                        

                                        Then press "ESC" followed by ":" enter line number 4139

                                        cursor jumps to the line.

                                        go to the part to change, like the e of explode. press ESX followed by x. this removes char by char. delete all behind the e until then ;

                                        $r = ;
                                        

                                        then copy the new part

                                        explode(' ', $result, 2)
                                        

                                        Press ESC and I

                                        then paste it with right click.

                                        ESC / wq to save

                                        reboot

                                        hope this helps

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          sretalla @FrankZappa
                                          last edited by Jul 7, 2022, 12:00 PM

                                          @frankzappa

                                          Just do it from the pfSense GUI.

                                          In the Diagnostics menu, go to Edit File

                                          Type (or copy/paste) /usr/local/pkg/pfblockerng/pfblockerng.inc into the "Path of file to be edited" box and click "Load"

                                          Type 4139 in the "Go to line #" box just below that and to the right, then click the button.

                                          Make the edit (change the '?' to ' ' ensuring to make a space between the single quotes)

                                          Click the "Save" button.

                                          F 1 Reply Last reply Jul 7, 2022, 1:46 PM Reply Quote 0
                                          22 out of 32
                                          • First post
                                            22/32
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received