DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st October 2008
neurosis neurosis is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 69
Thanked 0 Times in 0 Posts
Default sysctl and cpu information and temperature

Ive been goofing with torismo and conky and noticed while goofing around that my system doesnt like to show the cpu speed or temperature. I believe that conky uses sysctl to display the temp but it doesnt appear to be set up to display that. Im having a hard time finding information on how to set this up properly. Can anyone point me in the right direction?
Reply With Quote
  #2   (View Single Post)  
Old 21st October 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Well, at least on my laptop... $ sysctl hw.acpi.thermal. will yield sysctl based data on my systems tempature, according to the hw.acpi.thermal.tz0.temperature sysctl is probably what you want, but refer to acpi_thermal(4) for details on them. The childern of dev.cpu.N will probably tell you what you want about the CPU, replace 'N' with the CPUs number, if you have one single core CPU, this is dev.cpu.0. You should be able to find the current (approximate, not exact) clock frequency of your cpu in Mhz through dev.cpu.N.freq, but refer to [fman=4]cpufreq[/url] for details.


$ sysctl hw.acpi.thermal. dev.cpu. | $PAGER will probably tell you plenty.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 21st October 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Thanked 0 Times in 0 Posts
Default

If the cpu is intel core or newer you may try coretemp.
Code:
kldload coretemp
and watch sysctl values dev.cpu.%d.temperature
%d is core number - 0,1,2...
Reply With Quote
  #4   (View Single Post)  
Old 21st October 2008
sverreh's Avatar
sverreh sverreh is offline
Real Name: Sverre Hval
Port Guard
 
Join Date: Apr 2008
Location: Norway
Posts: 36
Thanked 6 Times in 5 Posts
Default

A list of conky-variables can be found here:

http://conky.sourceforge.net/variables.html

In my .conkyrc I have:

Code:
${color}CPU-temp
${color #ddaa00} ${acpitemp}
Does this help?
Reply With Quote
  #5   (View Single Post)  
Old 21st October 2008
neurosis neurosis is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 69
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by edhunter View Post
If the cpu is intel core or newer you may try coretemp.
Code:
kldload coretemp
and watch sysctl values dev.cpu.%d.temperature
%d is core number - 0,1,2...
I loaded this and still got nothing out of sysctl. Keep in mind that im very green with freebsd so I am sure that I dont have something set right as of yet. If I do a #sysctl -a |grep cpu I get nothing for temperature or cpu speed.

Quote:
Originally Posted by sverreh View Post
A list of conky-variables can be found here:

http://conky.sourceforge.net/variables.html

In my .conkyrc I have:

Code:
${color}CPU-temp
${color #ddaa00} ${acpitemp}
Does this help?
Thanks. I found this page. My .conkyrc is set correctly to display the cpu temperature and frequency but it checks sysctl for temp and sysctl returns nothing.

Quote:
Originally Posted by TerryP View Post
Well, at least on my laptop... $ sysctl hw.acpi.thermal. will yield sysctl based data on my systems tempature, according to the hw.acpi.thermal.tz0.temperature sysctl is probably what you want, but refer to acpi_thermal(4) for details on them. The childern of dev.cpu.N will probably tell you what you want about the CPU, replace 'N' with the CPUs number, if you have one single core CPU, this is dev.cpu.0. You should be able to find the current (approximate, not exact) clock frequency of your cpu in Mhz through dev.cpu.N.freq, but refer to [fman=4]cpufreq[/url] for details.


$ sysctl hw.acpi.thermal. dev.cpu. | $PAGER will probably tell you plenty.
When I run
$ sysctl hw.acpi.thermal. dev.cpu. | $PAGER
it returns an error.
Code:
# sysctl hw.acpi.thermal. dev.cpu. | $PAGER
sysctl: unknown oid 'hw.acpi.thermal.'
I think that I still need to set up sysctl to monitor "driver" ? the cpu temp.
Reply With Quote
  #6   (View Single Post)  
Old 21st October 2008
sverreh's Avatar
sverreh sverreh is offline
Real Name: Sverre Hval
Port Guard
 
Join Date: Apr 2008
Location: Norway
Posts: 36
Thanked 6 Times in 5 Posts
Default

Which version of FreeBSD are you running? I am running 7.0 on my desktop at home, and I get the following:
Code:
sverre % uname -a
FreeBSD dirac 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
sverre % sysctl hw.acpi.thermal.tz0.temperature
hw.acpi.thermal.tz0.temperature: 42.0C
sverre %
At work I'm running 6.2, and the result is:
Code:
fermi % uname -a
FreeBSD fermi.ife.no 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
fermi %  
fermi % sysctl hw.acpi.thermal.tz0.temperature
sysctl: unknown oid 'hw.acpi.thermal.tz0.temperature'
fermi %
So maybe the variable is only available in 7.0?
Reply With Quote
  #7   (View Single Post)  
Old 21st October 2008
neurosis neurosis is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 69
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by sverreh View Post
Which version of FreeBSD are you running? I am running 7.0 on my desktop at home, and I get the following:
Code:
sverre % uname -a
FreeBSD dirac 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
sverre % sysctl hw.acpi.thermal.tz0.temperature
hw.acpi.thermal.tz0.temperature: 42.0C
sverre %
At work I'm running 6.2, and the result is:
Code:
fermi % uname -a
FreeBSD fermi.ife.no 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
fermi %  
fermi % sysctl hw.acpi.thermal.tz0.temperature
sysctl: unknown oid 'hw.acpi.thermal.tz0.temperature'
fermi %
So maybe the variable is only available in 7.0?
Im beginning to think that its the fact that the pc is an AMD rather than Intel? I have the kernel module acpi.ko loaded and it should have acpi_thermal working by default? Here is my uname.

Code:
uname -a
FreeBSD  7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #2: Mon Aug 18 18:55:14 PDT 2008     /usr/obj/usr/src/sys/mykern  i386
And I opened up the acpi reply a bit.

Code:
$ sysctl hw.acpi
hw.acpi.supported_sleep_state: S1 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S1
hw.acpi.lid_switch_state: NONE
hw.acpi.standby_state: S1
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 0
hw.acpi.reset_video: 0
hw.acpi.cpu.cx_lowest: C1
Reply With Quote
  #8   (View Single Post)  
Old 21st October 2008
sverreh's Avatar
sverreh sverreh is offline
Real Name: Sverre Hval
Port Guard
 
Join Date: Apr 2008
Location: Norway
Posts: 36
Thanked 6 Times in 5 Posts
Default

Quote:
Originally Posted by neurosis View Post
Im beginning to think that its the fact that the pc is an AMD rather than Intel? I have the kernel module acpi.ko loaded and it should have acpi_thermal working by default?
Well, that may be the problem. I am no expert on this, but I do run an Intel.

And here is my output from sysctl, which contains several more variables than yours:
Code:
sverre % sysctl hw.acpi
hw.acpi.supported_sleep_state: S1 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S1
hw.acpi.lid_switch_state: NONE
hw.acpi.standby_state: S1
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 0
hw.acpi.reset_video: 0
hw.acpi.cpu.cx_lowest: C1
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 44.0C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: 90.0C
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 100.0C
hw.acpi.thermal.tz0._ACx: 85.0C -1 -1 -1 -1 -1 -1 -1 -1 -1
sverre %
Maybe some Guru can help here?
Reply With Quote
  #9   (View Single Post)  
Old 21st October 2008
neurosis neurosis is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 69
Thanked 0 Times in 0 Posts
Default

Maybe my hardware info will be helpfull as well. The mother board is an MSI KT4 Ultra with a VIA KT400 chipset. Not sure if that has any bearing but it cant hurt.
Reply With Quote
Old 22nd October 2008
teig teig is offline
Port Guard
 
Join Date: May 2008
Posts: 20
Thanked 0 Times in 0 Posts
Default

I have Intel E8400 CPU on Asus P5K-VM and no hw.acpi.thermal either.

Loading coretemp I get dev.cpu.0|1.temperature.

On previous board I had a plain P4 and temperature showing in gkrellm automagically, don't know which sysctl was active then.

Oh, this applies for 7.0 and also 7.1 BETA1.
Reply With Quote
Old 22nd October 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

At least in the example I gave, it came from an AMD/ATI based laptop.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 22nd October 2008
neurosis neurosis is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 69
Thanked 0 Times in 0 Posts
Default

Well, I am getting a little further although Im not sure that it helps me at all in displaying the cpu temperature in conky. I installed mbmon just to see if there was any chance of getting my cpu temp and here is what I got.

Code:
$ mbmon -d
SMBus[VT8233/A/8235/8237(KT266/333/400/600/880)] found, but No HWM available on it!!
Using ISA-IO access method!!
* Winbond Chip W83697HF found.

$ mbmon

Temp.= 28.0, 44.0,  0.0; Rot.= 4927,    0,    0
Vcore = 1.68, 0.00; Volt. = 3.33, 4.92, 12.22, -11.96, -5.05
So I guess this means that my machine has the ability to display the temperature etc? I just dont know how to get it in a format that I can get it to display in conky. Im sure there has to be another way to get this other than using mbmon but im still searching.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
temperature readings bogd OpenBSD General 2 1st January 2009 02:59 AM
Various Groups -- Information JMJ_coder General software and network 3 20th December 2008 04:35 AM
Get sysctl value from a C program DNAeon FreeBSD Ports and Packages 3 29th September 2008 07:28 PM
Why does smartctl show my temperature threshold is 0? PeterSteele FreeBSD General 0 25th August 2008 03:33 PM
Problem with lid switch Inspiron 1300 sysctl: unknown oid 'hw.acpi.video.lcd0.active' pax FreeBSD General 2 6th August 2008 11:49 AM


All times are GMT. The time now is 05:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick