|
List Info
Thread: Patch for idlebar/system in Freevo-1.8.0
|
|
| Patch for idlebar/system in
Freevo-1.8.0 |
  Germany |
2008-04-24 11:43:29 |
Folks,
today I upgraded from 1.7.6.1 to 1.8.0. Everything went very
smoothly -
nice work!
But I discovered a little bug, that the 1.7 series has as
well:
Provided SENSORS_PLATFORM_PATH exists, the
getSensorPath(...) method in
plugins.idlebar.system.sensors simply returns _some_
existing directory
from that path.
In my case, an
# ls -l /sys/devices/platform
shows:
drwxr-xr-x 3 root root 0 24. Apr 18:13 coretemp.0
drwxr-xr-x 3 root root 0 24. Apr 18:13 coretemp.1
drwxr-xr-x 5 root root 0 24. Apr 18:13 i8042
drwxr-xr-x 3 root root 0 24. Apr 18:13 it87.656
drwxr-xr-x 3 root root 0 24. Apr 18:13 pcspkr
drwxr-xr-x 2 root root 0 24. Apr 18:13 power
-rw-r--r-- 1 root root 4096 24. Apr 18:13 uevent
Since Python returns the list of subdirectories in
alphabetical order,
the path returned by getSensorPath(...) is
/sys/devices/platform/coretemp.0
The coretemp module, on the other hand, doesn't create the
necessary
<Sensorname>_max file, thus the plugin raises an
exception upon freevo
start. Therefore, only directories that contain the
necessary files for
the idlebar.sensors plugin should be taken into account, in
my case
_only_
/sys/devices/platform/it87.656
represents a temperature sensor.
The attached small - hence very simple ;o) - patch fixes
this issue.
Would be glad to see it in the next release...
Torsten
--
Never make anything simple and efficient when a way can be
found to
make it complex and wonderful. - Murphy's Law
No. 13 -
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
|
| Re: Patch for idlebar/system in
Freevo-1.8.0 |
  Switzerland |
2008-04-25 00:13:53 |
On 24/04/2008 18:43, Torsten Kurbad said the following:
> Folks,
>
> today I upgraded from 1.7.6.1 to 1.8.0. Everything went
very smoothly -
> nice work!
>
> But I discovered a little bug, that the 1.7 series has
as well:
>
> Provided SENSORS_PLATFORM_PATH exists, the
getSensorPath(...) method in
> plugins.idlebar.system.sensors simply returns _some_
existing directory
> from that path.
What about using the path: /sys/class/hwmon/hwmon0/device/
I think that this is pretty recent, maybe kernel 2.6.24.
I need to check the code before doing anything.
> In my case, an
>
> # ls -l /sys/devices/platform
>
> shows:
> drwxr-xr-x 3 root root 0 24. Apr 18:13 coretemp.0
> drwxr-xr-x 3 root root 0 24. Apr 18:13 coretemp.1
> drwxr-xr-x 5 root root 0 24. Apr 18:13 i8042
> drwxr-xr-x 3 root root 0 24. Apr 18:13 it87.656
> drwxr-xr-x 3 root root 0 24. Apr 18:13 pcspkr
> drwxr-xr-x 2 root root 0 24. Apr 18:13 power
> -rw-r--r-- 1 root root 4096 24. Apr 18:13 uevent
>
> Since Python returns the list of subdirectories in
alphabetical order,
> the path returned by getSensorPath(...) is
>
> /sys/devices/platform/coretemp.0
>
> The coretemp module, on the other hand, doesn't create
the necessary
> <Sensorname>_max file, thus the plugin raises an
exception upon freevo
> start. Therefore, only directories that contain the
necessary files for
> the idlebar.sensors plugin should be taken into
account, in my case
> _only_
>
> /sys/devices/platform/it87.656
>
> represents a temperature sensor.
>
> The attached small - hence very simple ;o) - patch
fixes this issue.
> Would be glad to see it in the next release...
I would like a bug report for this.
Duncan
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
| Re: Patch for idlebar/system in
Freevo-1.8.0 |
  Switzerland |
2008-04-25 15:22:20 |
Torsten Kurbad wrote:
> On Friday, April 25, 2008 at 07:13 Duncan Webb wrote:
>
>
>>> Provided SENSORS_PLATFORM_PATH exists, the
getSensorPath(...) method in
>>> plugins.idlebar.system.sensors simply returns
_some_ existing directory
>>> from that path.
>>>
>
>
>> What about using the path:
/sys/class/hwmon/hwmon0/device/
>>
>
> that looks much too "dynamic" in my eyes.
What, if, e.g., the coretemp
> module accidentely becomes "hwmon0"? Also,
the plugin as it is, assumes
> the tempX_Y files in a _subdirectory_ of PLATFORM_PATH,
therefore we'd
> have to provide "/sys/class/hwmon/hwmon0",
and the "/device" subdir gets
> merely chosen by accident.
>
IIRC, it's described in lm_sensors docs that
/sys/class/hwmon/hwmon0 is
the correct place.
> I filed a bugreport on this, maybe some people (even
those with
> currently working setup) are willing to test the patch
to see if it
> breaks anything...
>
Duncan
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
| Re: Patch for idlebar/system in
Freevo-1.8.0 |
  Germany |
2008-04-25 18:58:37 |
On Friday, April 25, 2008 at 22:22 Duncan Webb wrote:
>>> What about using the path:
/sys/class/hwmon/hwmon0/device/
>> that looks much too "dynamic" in my eyes.
What, if, e.g., the coretemp
>> module accidentely becomes "hwmon0"?
Also, the plugin as it is, assumes
>> the tempX_Y files in a _subdirectory_ of
PLATFORM_PATH, therefore we'd
>> have to provide
"/sys/class/hwmon/hwmon0", and the
"/device" subdir gets
>> merely chosen by accident.
> IIRC, it's described in lm_sensors docs that
/sys/class/hwmon/hwmon0 is
> the correct place.
in either case, the patch I supplied would ensure that the
correcz
subdir is returned (here: "device"). ;o)
Regards,
Torsten
--
Fon: +49-7071-700240 | Fax: +49-7071-700241 | http://www.tk-webart.de
Never make anything simple and efficient when a way can be
found to
make it complex and wonderful. - Murphy's Law
No. 13 -
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
| Re: Patch for idlebar/system in
Freevo-1.8.0 |
  Germany |
2008-04-26 08:14:39 |
>> On Friday, April 25, 2008 at 22:22 Duncan Webb
wrote:
> Sorry I didn't mean that you patch was in any way
invalid.
No harm done!
> I was just trying to say where the correct path now is.
As of 2.6.24
> there does not seem to be any sensors in the
/sys/devices/platform/ path.
I see. My uname -r says:
# 2.6.24-gentoo-r3
and /sys/devices/platform is filled as usual. But maybe this
is due to
one of the Gentoo patches.
> I think that the module is now invalid as it is
possible to have more
> than one path with sensors. On my AMD64 there are two
sensor paths one
> for the sensors and one for the processor. I suspect
that it would be
> best to allow each sensor's path to be specified.
If I find the time, I'll look into the module and see, how
it could be
done more dynamically. E.g., I'd rather like to see three
temperatures:
system, coretemp0, coretemp1
so maybe the module could be restructured to accept an
arbitrary number
of tuples: ('sensorname', 'sensorpath', 'sensortype') -
sensortype
being one of e.g. 'sys' or 'cpu' - in addition to things
like
'MemFree'.
Would that be a helpful contribution?
Regards,
Torsten
--
Never make anything simple and efficient when a way can be
found to
make it complex and wonderful. - Murphy's Law
No. 13 -
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
| Re: Patch for idlebar/system in
Freevo-1.8.0 |
  Germany |
2008-04-27 17:49:56 |
Hi,
>> If I find the time, I'll look into the module and
see, how it could be
>> done more dynamically. E.g., I'd rather like to see
three temperatures:
>>
>> system, coretemp0, coretemp1
>>
>> so maybe the module could be restructured to accept
an arbitrary number
>> of tuples: ('sensorname', 'sensorpath',
'sensortype') - sensortype
>> being one of e.g. 'sys' or 'cpu' - in addition to
things like
>> 'MemFree'.
>>
>> Would that be a helpful contribution?
> Yes this would be good, the calcs expression still need
to be passed in.
I just submitted a patch to the feature request tracker that
implements
a new plugin
idlebar.system.sensors2
which accepts an arbitrary number of sensor-tuples
('name', 'path', 'type', 'compute_expr') mixed with an
arbitrary number
of meminfo-strings. Just have a look at the comments in the
code to see
how it's configured and, moreover, how it works... ;o)
Have fun testing
Torsten
--
Never make anything simple and efficient when a way can be
found to
make it complex and wonderful. - Murphy's Law
No. 13 -
------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference
Don't miss this year's exciting event. There's still time to
save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Freevo-devel mailing list
Freevo-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el
|
|
[1-6]
|
|