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

    Dashboard cpu update 10 seconds just hangs

    Scheduled Pinned Locked Moved IPv6
    33 Posts 6 Posters 19.6k 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.
    • C
      Cino
      last edited by

      i was going to post this issue awhile ago (thinking it started almost 2 months ago) but was going to wait till 2.1 is final. i think it has to do with jQuery because it has broken a few other things in 2.1.

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        Cino if that was the case, then why this statement from tix

        "I just did a clean install of 2.0, upgraded to 2.0.1 and then sync'd to github and the dashboard works."

        Would seem to me if something was broken in the code it should not work no matter how you got to the code - be it multiple git syncs or fresh install, etc.

        If works from clean install and then gitsync – what happened, and how to fix so don't have to do a clean install, etc.

        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

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

          If it works on a clean install, but not an upgrade, there must be a file still on your box under /usr/local/www/ somewhere that is getting read in (most likely some JS) and conflicting.

          You could try to rm -rf /usr/local/www and then do a gitsync, but that's a bit extreme and wouldn't really help solve the problem in the long run.

          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
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            well I posted the contents of my www folder – anything jump out at you?

            Maybe we could get cino to post the content of his.

            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

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

              Nothing jumped out, but I haven't really paid close attention to what the new files are since the jQuery changes.

              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
              • C
                Cino
                last edited by

                i have too many packages and custom stuff to wipe out everything.. I did remove the following folders: widgets, classes, javascript with now luck. Should had mention this before, but cpu_graphs.widget.php stop working the same time system information widget stopped.

                1 Reply Last reply Reply Quote 0
                • chpalmerC
                  chpalmer
                  last edited by

                  I have two boxes in particular…

                  2.0.1-RELEASE (i386)
                  built on Mon Dec 12 18:24:17 EST 2011
                  FreeBSD 8.1-RELEASE-p6                      No Gitsync

                  CPU graph works.

                  2.1-DEVELOPMENT (i386)
                  built on Tue Sep 13 17:28:43 EDT 2011
                  FreeBSD 8.1-RELEASE-p4                      Recent Gitsync

                  CPU graph doesn't work.

                  Both with widescreen, pfblocker, siproxd, filemanager packages.

                  In case it helps...

                  Triggering snowflakes one by one..
                  Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

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

                    OK guys hopes this helps I fixed the 2.1 Development Issue CPU Usage and other widgets not updating:

                    Testing it right now on couple different boxes with:

                    2.1-DEVELOPMENT (i386)
                    built on Fri Nov 25 14:30:42 EST 2011

                    FreeBSD 8.1-RELEASE-p6

                    Remove the .txt extension from the files and put them in the proper directories stated in the install_widget_fix.txt  file.

                    Fixed Javascript errors tested on IE 7, IE 9, Firefox 8.0, Safari, Chrome.  Don't worry if it stays at 100% load has to do with how they figure load using clock cycles average.  It will go back down once Web Gui fully loaded or might take a bit sometimes.  It takes 10 seconds to update screen.  They use the same exact php code as LCDproc uses to figure CPU Usage.

                    ajax.js.txt
                    cpu_graphs.js.txt
                    cpu_graphs.widget.php.txt
                    install_widget_fix.txt

                    1 Reply Last reply Reply Quote 0
                    • chpalmerC
                      chpalmer
                      last edited by

                      Trying it now and seems to be working…    Thanks!  :)

                      Triggering snowflakes one by one..
                      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

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

                        Glad I can be of some help.  ;D

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

                          I didn't realize it was the cpu_graphs widget, I thought it was the cpu bar in the system info widget (though I suppose one could have hurt the other)

                          the cpu_graphs widget was removed a while back due to it being inaccurate on multi-core systems, so it does not exist in 2.1 proper.

                          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
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            Yeah not the graph, its the little bar for me – I posted a screenshot showing it.

                            It just sits that at updating in 10 seconds -- taunting!!

                            As already stated the CPU graph in RRD is working, etc.  And System Activity under Diag works fine as well showing cpu usage -- just the stupid little bar on the systeminfo widget atleast for me that is what the problem is.

                            I had grabbed the files he tweaked, but was not ready to test out his few changes - checked diff of his files vs ones on my system, mainly because the one file was in a folder called disabled, and was not ready to pull that out, etc.

                            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

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

                              @johnpoz:

                              Yeah not the graph, its the little bar for me – I posted a screenshot showing it.

                              It just sits that at updating in 10 seconds -- taunting!!

                              As already stated the CPU graph in RRD is working, etc.  And System Activity under Diag works fine as well showing cpu usage -- just the stupid little bar on the systeminfo widget atleast for me that is what the problem is.

                              I had grabbed the files he tweaked, but was not ready to test out his few changes - checked diff of his files vs ones on my system, mainly because the one file was in a folder called disabled, and was not ready to pull that out, etc.

                              The CPU Graph Widget uses the same code as the CPU Usage bar…  They both work.  The PHP code is the same as the PHP code that is used in LCDproc CPU usage too.  Only reason I added the CPU Graph widget code is because I fixed a javascript error in it too.  Also, if you notice your your Interface and Gateway widgets will update along with other items in the System Infomation widget every 10 seconds now.  So the fix was not just for the CPU Graph widget it was for a few widgets that use the same javascript to update the web gui output.

                              1 Reply Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator
                                last edited by

                                "Also, if you notice your your Interface and Gateway widgets will update now along with other items in the System Infomation widget every 10 seconds now."

                                Ok great will give it a go then, so like the response time on gateways and interface stats, and uptime will update every 10 seconds?  Notice that uptime only updates when you refresh, same with interface stats. I would assume the changes would be put in, or will the next time I git sync or install a new version will it get overwritten?

                                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

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

                                  Well, I am not a coder for the pfSense Project.  So if it is still broken in the next git sync or update then yes you will have to apply the fixes again.  Unless the coders read this section.  I don't know any of the guys coding on this project.  Sorry..

                                  "Notice that uptime only updates when you refresh, same with interface stats."

                                  I will look into that and see about adding that update to the 10 second javascript loop if you want me to.

                                  -Joe Cowboy

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

                                    @joe_cowboy thank you for fixing this. I can comfirm its working on my box also. System Info and Cpu Graphs are displaying data now.

                                    @jimp would it be possible to add these fixes to 2.1 in the near future? including the cpu graph? I don't mind if it stays in the deactivated folder and we have to manually move it over to use it.

                                    1 Reply Last reply Reply Quote 0
                                    • johnpozJ
                                      johnpoz LAYER 8 Global Moderator
                                      last edited by

                                      ok just copied over the files and not looking like its working, I restarted the webconfigurater..

                                      Let me refresh my browser cache,etc.

                                      edit: ok that worked now looks like everything is working.  Interface stats do update, and so does current time and so do ping times to gateways.. And uptime is working as well, before I was looking at current time and it wasn't updating unless refresh.

                                      Looks good man - Thanks!!!

                                      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

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

                                        "Notice that uptime only updates when you refresh, same with interface stats."

                                        Those are updating just have to wait a while to see changes sometimes.  But I did make a tweak to the Up time added seconds so you can see it is updating.

                                        put the functions.inc.php  file into /usr/local/www/includes/

                                        remove the .txt extension before uploading to the folder.

                                        -Joe Cowboy

                                        functions.inc.php.txt

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

                                          Ok made another tweak to the System Information Widget for you and added Temperature.  Right now just checks the first core or core 0.  I will go back and add mulit core temp, CPU Graph and CPU Usage out put to the Web Gui.

                                          coretemp.ko driver download:

                                          AMD64 bit download file:
                                          http://files.pfsense.org/jimp/ko-8.1/amd64/coretemp.ko

                                          i386 download file:
                                          http://files.pfsense.org/jimp/ko-8.1/i386/coretemp.ko

                                          I will go ahead and post all files again here along with other files I modded.  Oh yes to answere your question with git sync update you will have to reload theses fixes again still broken:

                                          Remember to remove the .txt extension from the file.

                                          ajax.js.txt
                                          cpu_graphs.js.txt
                                          cpu_graphs.widget.php.txt
                                          functions.inc.php.txt
                                          install_widget_fix.txt
                                          system_information.widget.php.txt

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

                                            joe_cowboy - You should sign up on github, fork the repo, commit those changes, and submit a pull request. Then we can import those changes directly into mainline.

                                            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.