Ad Widget

Collapse

CPU Temperature in Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maikcat
    Junior Member
    • Nov 2011
    • 6

    #1

    CPU Temperature in Windows

    hi all,

    after searching alot around how to monitor cpu temp in windows
    i finally came with the following workaround.

    1) i install realtemp_360 software (its free) (i extract the contents in c:\realtemp
    2) i also use awk.exe and tail.exe which i found as unxutil.zip from sourceforge
    3) i run it (the realtemp.exe) with the following options on: log file , start minimized, minimize on close

    it creates a file named realtemplog.txt into same directory with the binary realtemp.exe is

    4) i insert the following into zabbix-agentd.conf client file

    UserParameter=temp.tempcore0,tail -1 c:\realtemp\Realtemplog.txt | awk "{print $4}"
    UserParameter=temp.tempcore1,tail -1 c:\realtemp\Realtemplog.txt | awk "{print $5}"
    UserParameter=temp.tempcore2,tail -1 c:\realtemp\Realtemplog.txt | awk "{print $6}"
    UserParameter=temp.tempcore3,tail -1 c:\realtemp\Realtemplog.txt | awk "{print $7}"

    restart the agent

    also you need to create items into zabbix console like

    description temp_core0
    type zabbix agent
    key temp.tempcore0
    type of info numeric
    data type decimal


    and you are done...

    hope that this info helps.

    ps: the downside is that the log file is growing and you have to delete it manual...

    Michael
  • Zabitué
    Junior Member
    • Feb 2012
    • 10

    #2
    Many Thanks ! But it does not run on my system !! no datas receive by the server !! An idea ?

    Comment

    • maikcat
      Junior Member
      • Nov 2011
      • 6

      #3
      can you please post more info about your setup?

      what windows are you using?
      when you run realtemp do you see cpu temps or not?
      did you check the appropriate options?
      do you get an output text file?

      more to come..

      Michael.

      Comment

      • Zabitué
        Junior Member
        • Feb 2012
        • 10

        #4
        Hello ! thanks for answer !
        I 've got it realtemplog.txt in the realtemp folder and i insert the following into zabbix-agentd.conf client file :
        UserParameter=temp.tempcore0,tail -1 c:\realtemp\Realtemplog.txt | awk "{print $4}"

        i download tail.exe and awk.exe in the Realtemp folder. The agend is connected to the server, but no data can be read on zabbix. Ping is ok.
        I created the item on zabbix as you mentioned, with the lines into.

        however, if i put the line ' tail -1 c:\realtemp\Realtemplog.txt | awk "{print $4}" on a dos windows command, i see the temperature, for example '49'
        The instruction is ok.

        An idea ?

        Comment

        • maikcat
          Junior Member
          • Nov 2011
          • 6

          #5
          >however, if i put the line ' tail -1 c:\realtemp\Realtemplog.txt | awk "{print $4}" on a dos windows command, i see the temperature, for example '49'
          The instruction is ok.

          if you cd \ first , is it also working?

          can you try please copy the awk and tail command to c:\windows\system32 directory?

          silly question,
          other zabbix based parameters work?

          Michael.

          Comment

          • Zabitué
            Junior Member
            • Feb 2012
            • 10

            #6
            Hello,

            if i cd \ first , is it also working ! yes !

            the awk.exe and tail.exe files are only into the Realtemp folder, not to c:\windows\system32 directory

            The other zabbix based parameters work well.

            Comment

            • maikcat
              Junior Member
              • Nov 2011
              • 6

              #7
              did you created the appropriate item for your client?

              values used
              =========

              description temp_core0
              type zabbix agent
              key temp.tempcore0
              type of info numeric
              data type decimal

              ps: please copy both awk & tail to your windows\system32 folder just to
              verify that they are inside exec path..

              Comment

              • maikcat
                Junior Member
                • Nov 2011
                • 6

                #8
                also

                do you see anything interesting on your clients log file?

                Michael.

                Comment

                • Zabitué
                  Junior Member
                  • Feb 2012
                  • 10

                  #9
                  wonderful! thank you very much ! it works!
                  HOWEVER, is the item display the last temperature of the cpu or the first line of the file realtemplog.txt?
                  have you find how to delete the file Realtemplog.txt real after a while or at startup of Client ?
                  have you made ​​an item for the temperature of hard drives?

                  Comment

                  • maikcat
                    Junior Member
                    • Nov 2011
                    • 6

                    #10
                    >wonderful! thank you very much ! it works!

                    nice to hear that,
                    im glad that someone used my howto..

                    >HOWEVER, is the item display the last temperature of the cpu or the first line of the file realtemplog.txt?

                    the tail command catches the LAST entry...
                    so you get temps in (almost) realtime

                    >have you find how to delete the file Realtemplog.txt real after a while or at startup of Client ?

                    when you restart realtemp it overwrites the file..

                    >have you made ​​an item for the temperature of hard drives?

                    real temp AFAIK shows cpu temp only...

                    if you can find a similar tool (freeware and can log values to file)
                    let me know!!

                    cheers,

                    Michael.

                    Comment

                    • Zabitué
                      Junior Member
                      • Feb 2012
                      • 10

                      #11
                      ok thank you very much, I'll get that and I would tell you if I find it

                      best regards

                      Chris

                      Comment

                      • nerijus
                        Junior Member
                        • Jun 2008
                        • 15

                        #12
                        Solution without gui apps

                        Download OpenHardwareMonitorReport.zip from https://code.google.com/p/open-hardw.../detail?id=230. Add cputemp[0], cputemp[1], ... Zabbix agent type item to Windows template. Add to the zabbix_agentd.conf:

                        UserParameter=cputemp[*],C:\OpenHardwareMonitor\OpenHardwareMonitorReport. exe|grep ^$1/temperature/0|grep :|gawk "{print $$7}"

                        Comment

                        • andersguitar
                          Member
                          • Dec 2010
                          • 64

                          #13
                          Hi all, resurrecting this old post. I tried all the things said here but whithout luck. When i check the item, it says 'not supported'. The description is: "Received value ['grep' not is recognized as an internal or external command, program or operational file batch] is not suitable". Any idea?
                          Thanks,

                          Comment

                          • aib
                            Senior Member
                            • Jan 2014
                            • 1615

                            #14


                            Well, some people soo crazy about Unix, that they are installing Unix tools on Windows machine.

                            But! By default, no any Windows machine has "grep" utility.

                            This is my configuration:
                            Code:
                            [B]zabbix_agentd.win.conf[/B]
                            UserParameter=cpu_temp,C:\ohmw\cpu-temp.bat
                            UserParameter=system_temp,C:\ohmw\system-temp.bat
                            Code:
                            [B]system-temp.bat[/B]
                            @echo off
                            for /F "usebackq tokens=7-10" %%a in (`C:\ohmw\OpenHardwareMonitorReport.exe`) do echo %%b %%c %%d| findstr .*lpc.*\/temperature\/0 >nul && set systemtemper=%%a
                            echo %systemtemper%
                            Code:
                            [B]cpu-temp.bat[/B]
                            @echo off
                            for /F "usebackq tokens=7-10" %%a in (`C:\ohmw\OpenHardwareMonitorReport.exe`) do echo %%b %%c %%d| findstr .*lpc.*\/temperature\/0>nul && set temper=%%a
                            @echo %temper%
                            Code:
                            [B]Item configuration:[/B]
                            Name: CPU Temperature
                            Key: cpu_temp
                            Type of information: Numeric(float)
                            Units: °C
                            PS sometime my bat-files doesn't work properly. They are dropping "@echo off" instead of real temperature. I don't care.
                            Sincerely yours,
                            Aleksey

                            Comment

                            • andersguitar
                              Member
                              • Dec 2010
                              • 64

                              #15
                              Thanks for reply! Which version of Zabbix you are using? Now, i´m getting "Not supported by Zabbix Agent". Mine is 2.2.5.
                              Thanks!

                              Comment

                              Working...