On Wed, Feb 15, 2012 at 10:42 PM, Alan Warren <[email protected]>wrote:

>
>
> On Tue, Aug 23, 2011 at 10:40 PM, Andreas Radke <[email protected]>wrote:
>
>> Am Wed, 24 Aug 2011 02:12:20 +0200
>> schrieb "Adrian C." <[email protected]>:
>>
>> > I have not heard from you. I can't change the default without
>> > verifying it works.
>> >
>> >
>>
>> Sry for silence. The change fixed it indeed for me as exepcted. I had a
>> 2nd widgets/thermal.lua in my users homedir that made it ignoring my
>> changes. So it was my fault.
>>
>>
>> It should be safe to change now the default to
>>
>>  ["core"] = {"/sys/devices/platform/",  file = "temp2_input",div =
>>  1000},
>>
>> Thank you.
>>
>> -Andy
>>
>> --
>> To unsubscribe, send mail to [email protected].
>>
>
>
> Hello,
>
> I'm a little late to kernel 3, and just got hit by this.
>
> My machine has 12 cores, and /sys/devices/platform/coretemp.0 (also
> coretemp.1) both have the following.
>
> temp2_input
> temp3_input
> temp4_input
>
> temp10_input
> temp11_input
> temp12_input
>
> With the old coretemp, I had a temp1_input inside coretemp.0,
> coretemp.1..... coretemp.11
>
> In other words, if I replace temp1_input with temp2_input the following
> lines from my rc.lua return the temps from cores 1 & 7.
>
> vicious.register(cputemp, vicious.widgets.thermal,  '$1', 19, {
> "coretemp.0", "core"})
> vicious.register(cputemp1, vicious.widgets.thermal, '$1', 19, {
> "coretemp.1", "core"})
>
> Any ideas for adjusting to this format?
>
> Thanks,
> Alan
>

Nevermind, I hacked together something that works for now.

     warg = type(warg) == "table" and warg or { warg, "sys" }
    local zone = { -- Known temperature data sources
        ["sys"]  = {"/sys/class/thermal/",     file = "temp",        div =
1000},
        ["core"] = {"/sys/devices/platform/",  file = "temp" .. warg[3] ..
"_input", div = 1000},
        ["proc"] = {"/proc/acpi/thermal_zone/",file = "temperature"}
    } --  Default to /sys/class/thermal


with this in rc.lua

vicious.register(cputemp, vicious.widgets.thermal,  '$1', 19, {
"coretemp.0", "core", "2"})
vicious.register(cputemp1, vicious.widgets.thermal, '$1', 19, {
"coretemp.0", "core", "3"})
vicious.register(cputemp2, vicious.widgets.thermal, '$1', 19, {
"coretemp.0", "core", "4"})
vicious.register(cputemp3, vicious.widgets.thermal, '$1', 19, {
"coretemp.0", "core", "10"})
vicious.register(cputemp4, vicious.widgets.thermal, '$1', 19, {
"coretemp.0", "core", "11"})
vicious.register(cputemp5, vicious.widgets.thermal, '$1', 19, {
"coretemp.0", "core", "12"})

vicious.register(cputemp6, vicious.widgets.thermal,  '$1', 19, {
"coretemp.1", "core", "2"})
vicious.register(cputemp7, vicious.widgets.thermal,  '$1', 19, {
"coretemp.1", "core", "3"})
vicious.register(cputemp8, vicious.widgets.thermal,  '$1', 19, {
"coretemp.1", "core", "4"})
vicious.register(cputemp9, vicious.widgets.thermal,  '$1', 19, {
"coretemp.1", "core", "10"})
vicious.register(cputemp10, vicious.widgets.thermal, '$1', 19, {
"coretemp.1", "core", "11"})
vicious.register(cputemp11, vicious.widgets.thermal, '$1', 19, {
"coretemp.1", "core", "12"})

I have no idea why they're using such strange CPU numbering now.  It makes
it difficult to account
for folks with 1 or 2 physical CPU's.

When I have some free time I'll try and work on a real solution.

-Alan

Reply via email to