Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Cygwin 64 on Windows 8 and would like to use the bash interface to get cpu temperatures (4 cores, as well as gpu temps). Is this possible? I am using the temperature monitor application and have that interfacing through Rainmaker but I would like to have them print out into a text file at intervals of my selection as I want to benchtest some of my code and see how it heats up the computer.

Any ideas?

share|improve this question
What temperature monitor application are you using? –  Nikolay Aug 14 '13 at 0:58
Speedfan. Sorry, on my old computer it was literally called 'Temperature Monitor'! –  Laurbert515 Aug 14 '13 at 12:34
Alright. Check out my answer. –  Nikolay Aug 16 '13 at 0:50
looks decent - haven't had the time to try it out yet but when I do I will let you know how it works and list it as the answer when I confirm it. Thanks. –  Laurbert515 Aug 16 '13 at 19:52

1 Answer 1

up vote 1 down vote accepted

Speed Fan has logging option. Enable it in configuration. You will find log files in the directory where Speed Fan was installed. In my case it was Program Files\SpeedFan\SFLog(date).csv

I installed UnixTools for Windows. If I understand correctly Cygwin has same sort of capabilities as UnixTools and gives you possibility to use Unix-like commands in Windows.

So, now we have log file (which updates once in 3 seconds) with all the data we want. We can use it to obtain last values from SpeedFan with following script:

for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)

tail -n 1 "C:\Program Files\SpeedFan\SFLog%mydate%.csv" | gawk {print$2}

First, we set variable mydate as current date formatted in style of Speed Fan log. We will need it to find latest logfile.

After that we use command tail with option -n 1 to get last row of the file (most recent data).

And we supply this row to the gawk command with option {print$2} to get second 'column' of the row, since first 'column' is timestamp.

So script will echo most recent value of the second column of the logfile. If you need more than just one value - make another script which requests third column by giving option {print$3} to gawk.

Let's say SpeedFan's log file has following format:

Timestamp  CPU1_temp  CPU2_temp  MotherBoard_temp  CPUFan_RPM

You can have 4 scripts - each one will be getting one of the values (use gawk's {print$X} option to determine which column it will be reading).

Now you can call these scripts from another programs when they need temperature readings from SpeedFan.

share|improve this answer
my log file only prints the times. There is a note on the 'log' tab which says "remember to select what readings you want to log" - where do I select these readings? –  Laurbert515 Aug 16 '13 at 20:41
Go to temperatures tab (first one). You will see list of sensors. Click one and at the bottom of the window you will see checkbox "Logged". Check it if you want data from this sensors to be logged. Same thing with Fans, Voltages, etc –  Nikolay Aug 16 '13 at 21:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.