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

How to: Get CPU temp

Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
140 Posts 24 Posters 121.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.
  • S
    stephenw10 Netgate Administrator
    last edited by Aug 9, 2011, 3:52 PM

    Nope.   ???
    Same as before, using:

    
    unction get_temp() {
    	$temp_out = "";
    	exec("/usr/local/bin/mbmon -I -c1 -T3", $dfout);
    	$temp_out = (trim($dfout[0]).'°');
    
    	return $temp_out;
    }
    
    

    Results in initially correct ° then 46.5°C
    Hmm.

    Steve

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Aug 9, 2011, 3:56 PM

      It may be getting run through htmlentities somewhere in there then. Might be safe to leave the symbol in there if that is the case.

      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
        stephenw10 Netgate Administrator
        last edited by Aug 9, 2011, 4:05 PM

        Unfortunately using:

        
        function get_temp() {
        	$temp_out = "";
        	exec("/usr/local/bin/mbmon -I -c1 -T3", $dfout);
        	$temp_out = (trim($dfout[0]).'°');
        
        	return $temp_out;
        }
        
        

        Results in the attached image.

        Perhaps the character set is being restricted somewhere?

        tempwidget.jpg
        tempwidget.jpg_thumb

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Aug 9, 2011, 4:10 PM

          That's a unicode degree symbol, try a standard ascii one, º

          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
            seh2000
            last edited by Aug 9, 2011, 4:13 PM

            @jimp:

            It's bad form (invalid html/js/etc) to put in a symbol instead of the html entity. It may work, but it's not guaranteed to do so.

            http://www.w3schools.com/tags/ref_entities.asp

            OK, got you, yes correct…
            Cheers Steen

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Aug 9, 2011, 4:16 PM

              No different. I entered both º and ° and both result in ��.  :-\

              Steve

              1 Reply Last reply Reply Quote 0
              • J
                jimp Rebel Alliance Developer Netgate
                last edited by Aug 9, 2011, 4:17 PM

                I'd just leave it out.

                (Or convert to Kelvin, no symbol there! ;-)

                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
                  stephenw10 Netgate Administrator
                  last edited by Aug 9, 2011, 5:07 PM

                  Kelvin nice!  :D

                  I'll stick with the nasty ° addition to ajax.js. I'm clueless about js, how would one enter that as an ascii code instead? Using ° is not working.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • S
                    seh2000
                    last edited by Aug 9, 2011, 5:11 PM

                    @jimp:

                    I'd just leave it out.

                    (Or convert to Kelvin, no symbol there! ;-)

                    Kelvin - LoL can core temp convert the output?

                    1 Reply Last reply Reply Quote 0
                    • S
                      stramato
                      last edited by Aug 10, 2011, 10:30 AM

                      This is awesome. My i3-540 reads 29C, 29C, 36C, 36C lol.

                      Will this be included in future snapshots? Or should we go ahead and modify it ourselves?

                      1 Reply Last reply Reply Quote 0
                      • S
                        seh2000
                        last edited by Aug 10, 2011, 10:40 AM

                        @stramato:

                        This is awesome. My i3-540 reads 29C, 29C, 36C, 36C lol.

                        Will this be included in future snapshots? Or should we go ahead and modify it ourselves?

                        That is cool, which type of case/box you use? I get 54C with an Atom D510 that sits in a Jetway Motherboard that is in a passive cooled M-350 box.
                        Cheers Steen

                        1 Reply Last reply Reply Quote 0
                        • A
                          asterix
                          last edited by Aug 10, 2011, 6:15 PM

                          Though this is 2.0 RC feedback section, but since the topic is on coretemp, I wanted to see if there is a pfsense 1.2.3 compatible 32-bit coretemp file out there that I can use. Moved to 1.2.3 last night as 64-bit snapshot snort is broken since weeks and I don't have the patience to wait any longer.

                          1 Reply Last reply Reply Quote 0
                          • R
                            RedRep
                            last edited by Aug 10, 2011, 6:57 PM

                            @asterix:

                            Though this is 2.0 RC feedback section, but since the topic is on coretemp, I wanted to see if there is a pfsense 1.2.3 compatible 32-bit coretemp file out there that I can use. Moved to 1.2.3 last night as 64-bit snapshot snort is broken since weeks and I don't have the patience to wait any longer.

                            Pull the file from a FreeBSD 7.2 install CD.

                            1 Reply Last reply Reply Quote 0
                            • A
                              asterix
                              last edited by Aug 10, 2011, 7:47 PM

                              I am not a FreeBSD user.

                              1 Reply Last reply Reply Quote 0
                              • C
                                Cino
                                last edited by Aug 10, 2011, 7:53 PM

                                @asterix:

                                I am not a FreeBSD user.

                                you don't have to be a FreeBSD user to copy a file off the install CD.

                                download a copy of 7.1 Install ISO.. Mount the ISO with your favorite Virtual CD program, like MagicISO… Then copy the files from cddrive/boot/kernel

                                1 Reply Last reply Reply Quote 0
                                • R
                                  RedRep
                                  last edited by Aug 10, 2011, 7:55 PM

                                  I'm downloading the 7.2 ISO right now and I will upload the file as soon as it's done. ;)

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    jimp Rebel Alliance Developer Netgate
                                    last edited by Aug 10, 2011, 8:00 PM

                                    Why on earth would you downgrade to 1.2.3 just because 2.0 x64 doesn't work? Why not use 2.0 x32? It works fine.

                                    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
                                    • A
                                      asterix
                                      last edited by Aug 10, 2011, 8:44 PM

                                      To be honest, I find 1.2.3 a bit more stable and far more responsive than 2.0RC3. It maybe just me, but after trying RC snapshots since as early as Jan this year, I have started to like 1.2.3 better and despite trying the latest RC3 snapshots from time to time, I keep coming back to 1.2.3.

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jimp Rebel Alliance Developer Netgate
                                        last edited by Aug 10, 2011, 8:48 PM

                                        @asterix:

                                        To be honest, I find 1.2.3 a bit more stable and far more responsive than 2.0RC3. It maybe just me, […]

                                        It's just you. :-)

                                        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
                                        • R
                                          RedRep
                                          last edited by Aug 10, 2011, 9:15 PM

                                          Coretemp.ko for 1.2.3 attached below, rename to Coretemp.ko

                                          coretemp.ko.png

                                          1 Reply Last reply Reply Quote 0
                                          116 out of 140
                                          • First post
                                            116/140
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received