pfSense Support Subscription

Author Topic: dashboard cpu update 10 seconds just hangs  (Read 9122 times)

0 Members and 1 Guest are viewing this topic.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
dashboard cpu update 10 seconds just hangs
« on: December 20, 2011, 10:19:02 am »
Ok so noticed my dashboard cpu usage is not updating.

I just ran a gitsync this morning, and even rebooted after

Currently running
2.1-DEVELOPMENT (i386)
built on Fri Nov 25 17:45:38 EST 2011
FreeBSD 8.1-RELEASE-p6

I have flushed my cache, tried a different browser, tried different themes.  Found this thread
http://forum.pfsense.org/index.php/topic,41768.msg218637.html#msg218637

That talks about sajax.js, I don't have that file only ajax.js

Just sits there -- but Diagnostics: System Activity works fine, and the processor graph in RRD is working as well..  Just the dashboard hangs.  I have tried removing and re adding the widget and that produced this crash report, which I submitted

PHP Errors:
[20-Dec-2011 10:18:03] PHP Fatal error:  Call to undefined function get_uptime() in /usr/local/www/widgets/widgets/system_information.widget.php on line 160

Which does not seem related to cpu usage - but could be related?  I think that crash was not quite right either, since the uptime on the dashboard seems to be working to me.


« Last Edit: December 20, 2011, 10:24:46 am by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline tix

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #1 on: December 23, 2011, 12:21:28 am »
I'm also having the same problem after the update.  It isn't CPU utilization for me as I'm at 0% most of the time.  Not that big of an issue as the RRD graphs work as you said.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #2 on: December 23, 2011, 07:43:43 am »
Yeah I agree its not that big of a deal, other than hey something broke it because it use to work ;)
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline tix

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #3 on: December 23, 2011, 11:32:49 am »
I just did a clean install of 2.0, upgraded to 2.0.1 and then sync'd to github and the dashboard works.  Hmm,  going to do some further digging and see why my existing install broke........

But it is something that was/is working and breaks on upgrade.   LOL

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #4 on: December 23, 2011, 12:29:39 pm »
Nice clean install with gitsync from 2.01 might be a good project for next week since off, etc.

but everything seems to be working great!  Hate to do something for no reason, cpu widget not working needs to be fixed - but not really a priority type item.  More of curiosity sort of thing on why is it not working ;)
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #5 on: December 27, 2011, 10:25:42 am »
Would probably be easy for someone familiar with debugging web apps to spot if you had firebug or something similar running and watching for errors.

Last time I saw that it was an old/invalid javascript file that was being included (sajax.js) but I haven't seen it happen since.

2.1 also includes various changes moving from Prototype to jQuery so there is potential for issues there as well.

Comparing the output of:

Code: [Select]
find /usr/local/www/
Between a working and non-working box would also be useful.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #6 on: December 27, 2011, 01:04:08 pm »
here is output from mine that doesn't work, now just need one from one that does ;)

- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline Cino

  • Hero Member
  • *****
  • Posts: 1051
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #7 on: December 29, 2011, 10:36:44 am »
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.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #8 on: December 29, 2011, 01:34:44 pm »
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.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #9 on: December 29, 2011, 02:12:43 pm »
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.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2893
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #10 on: December 29, 2011, 02:39:28 pm »
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.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #11 on: December 29, 2011, 02:40:37 pm »
Nothing jumped out, but I haven't really paid close attention to what the new files are since the jQuery changes.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline Cino

  • Hero Member
  • *****
  • Posts: 1051
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #12 on: December 29, 2011, 06:02:43 pm »
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.

Offline chpalmer

  • Hero Member
  • *****
  • Posts: 1074
  • Karma: +0/-0
    • View Profile
    • Home of Cablenut
Re: dashboard cpu update 10 seconds just hangs
« Reply #13 on: December 30, 2011, 02:52:57 am »

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...
P.S. statements made by me are not necessarily condoned by the management of this fine organization.

Offline joe_cowboy

  • Jr. Member
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: dashboard cpu update 10 seconds just hangs
« Reply #14 on: January 02, 2012, 02:19:18 am »
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.
« Last Edit: January 02, 2012, 03:08:24 am by joe_cowboy »