Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132670 - media-plugins/vdr-sysinfo - "sysinfo.sh" patch
Summary: media-plugins/vdr-sysinfo - "sysinfo.sh" patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Joerg Bornkessel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-08 05:48 UTC by Daniel
Modified: 2006-05-23 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch, details see above (sysinfo.sh.patch,916 bytes, patch)
2006-05-08 08:20 UTC, Daniel
Details | Diff
for details please see above (sysinfo.sh.patch,916 bytes, patch)
2006-05-08 08:29 UTC, Daniel
Details | Diff
/usr/share/vdr/sysinfo/sysinfo.sh (sysinfo.sh,655 bytes, application/octet-stream)
2006-05-18 05:19 UTC, Joerg Bornkessel (RETIRED)
Details
/etc/conf.d/vdr.sysinfo (vdr.sysinfo,92 bytes, application/octet-stream)
2006-05-18 05:20 UTC, Joerg Bornkessel (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2006-05-08 05:48:00 UTC
Hi,

/etc/vdr/plugins/sysinfo/sysinfo.sh works (at least partly out of the box): temperature values are ok but diskfree values are "fixed" on "hda1". Isn't it better (because more generic) instead of grepping the device ("hda1") grepping for the mountpoint ("video")?

The attached patch changes two (small) things:
1.) replaced "hda1" against "video" (e.g. on some systems "video" lies on a LVM so "hda1" does not exist or is the "root" or "boot" partition ;-) )
The long term strategy could be to make this setting configurable via the plugin-setup-menu.

2.) replaced the "cut | tr" combo with "awk". Improvements:
 - more generic, because "cut" assumes fixed length of target-strings while awk takes the complete token, independ from length (possible disadvantage: may be some smaller systems do not have "awk" installed?!?! linvdr?! I don't know)
 - no need for "tr" command

Cheers Daniel
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-08 05:52:17 UTC
ebuild name and version, please...
Comment 2 Daniel 2006-05-08 06:00:59 UTC
ebuild: media-plugins/vdr-sysinfo

sorry!
Comment 3 Daniel 2006-05-08 08:20:37 UTC
Created attachment 86425 [details, diff]
patch, details see above
Comment 4 Daniel 2006-05-08 08:27:48 UTC
Comment on attachment 86425 [details, diff]
patch, details see above

changed "diff cmd file parameter order" to make changes more clear...
Comment 5 Daniel 2006-05-08 08:29:43 UTC
Created attachment 86428 [details, diff]
for details please see above
Comment 6 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-08 15:23:10 UTC
Hi Daniel,

this looks like more usefull,
Will take a look on your diff, i am think about is it not also usefull all paramters make configurabel on i.E /etc/conf.d/vdr.sysinfo.

Joerg
Comment 7 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-17 14:41:58 UTC
Hi Daniel,
 
plz post/paste me the output of
~# sensors
from your system.

Cheers Joerg
Comment 8 Daniel 2006-05-18 00:25:16 UTC
Hi Joerg,

here it is:


riviera # $ sensors
as99127f-i2c-1-2d
Adapter: SMBus I801 adapter at e800

VCore 1:   +1.78 V  (min =  +1.66 V, max =  +1.82 V)
VCore 2:   +1.79 V  (min =  +1.66 V, max =  +1.82 V)
+3.3V:     +3.50 V  (min =  +3.14 V, max =  +3.46 V)       ALARM
+5V:       +5.16 V  (min =  +4.73 V, max =  +5.24 V)
+12V:     +11.73 V  (min = +10.82 V, max = +13.19 V)
-12V:     -12.27 V  (min = -13.22 V, max = -10.74 V)
-5V:       -5.03 V  (min =  -5.25 V, max =  -4.74 V)
fan1:     3879 RPM  (min =    0 RPM, div = 2)
fan2:     2766 RPM  (min =    0 RPM, div = 2)
fan3:        0 RPM  (min =    0 RPM, div = 2)
M/B Temp:    +35 C  (high =  +105 C, hyst =    +0 C)
CPU Temp:  +17.5 C  (high =  +100 C, hyst =   +92 C)
temp3:     -31.5 C  (high =  +122 C, hyst =  +121 C)
vid:      +1.750 V  (VRM Version 8.2)
alarms:
beep_enable:
          Sound alarm enabled
Comment 9 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 05:17:39 UTC
Hi Daniel,

your atched diff will fail in all cases on your and my system.
You take altimes the wrong paramter by awk.
Plz test the 2 atached files from me.

/etc/conf.d/vdr.sysinfo
/usr/share/vdr/sysinfo/sysinfo.sh

On feedback plz give me also your real name, for credits on Changelog

Cheers

Joerg
Comment 10 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 05:19:17 UTC
Created attachment 86992 [details]
/usr/share/vdr/sysinfo/sysinfo.sh
Comment 11 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 05:20:02 UTC
Created attachment 86993 [details]
/etc/conf.d/vdr.sysinfo
Comment 12 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 06:13:25 UTC
(In reply to comment #11)
> Created an attachment (id=86993) [edit]
> /etc/conf.d/vdr.sysinfo
> 

Me again,

you have to set your own parameter here, i.e
"M/B Temp" and "CPU Temp" ; Parameters from your sensors output.
Comment 13 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 06:48:36 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Created an attachment (id=86993) [edit]
> > /etc/conf.d/vdr.sysinfo
> > 
> 
> Me again,
> 
> you have to set your own parameter here, i.e
> "M/B Temp" and "CPU Temp" ; Parameters from your sensors output.
>

After any trys later i think, awk is not the right way to get the parameter.
The output from different chip sets is a problem
i.e

your output for MoBo temp:
M/B Temp:    +35 C  (high =  +105 C, hyst =    +0 C)
you have to take ${3} and ${4} by awk

my output for MoBo temp:
temp1:       +45
Comment 14 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-18 06:48:36 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Created an attachment (id=86993) [edit]
> > /etc/conf.d/vdr.sysinfo
> > 
> 
> Me again,
> 
> you have to set your own parameter here, i.e
> "M/B Temp" and "CPU Temp" ; Parameters from your sensors output.
>

After any trys later i think, awk is not the right way to get the parameter.
The output from different chip sets is a problem
i.e

your output for MoBo temp:
M/B Temp:    +35 C  (high =  +105 C, hyst =    +0 C)
you have to take ${3} and ${4} by awk

my output for MoBo temp:
temp1:       +45°C  (high =    +0°C, hyst =   +74°C)   sensor = thermistor
only the ${2} is to take be awk

there are any diffrent output's by chip sets more (take a look in /etc/sensors.conf)

I think its only usefull to add a config file, where you can overwrite the default setted parameter.

Joerg



Comment 15 Daniel 2006-05-20 02:23:52 UTC
(In reply to comment #9)
> Hi Daniel,
> 
> your atched diff will fail in all cases on your and my system.
> You take altimes the wrong paramter by awk.
Da&% b&?$sh!7! I'm so sorry, I took the wrong machine to execute sensors! I didn't assume that there would be differences in my sesnor configuration. But now, I see I renamed the sensor-names on this particular machine. sorry!
Nevertheless even if the same names would have been used, the output-format running sensors differs between different chipset (as you already noted in another post from you).

> Plz test the 2 atached files from me.
> 
> /etc/conf.d/vdr.sysinfo
> /usr/share/vdr/sysinfo/sysinfo.sh
> 
> On feedback
your scripts are working fine (regarding my posted output)

> plz give me also your real name, for credits on Changelog
thanks a lot, but right now, after your whole investigation efforts I think that this would not be good idea. Feel free to leave my name out and take yours instead.
Thanks!
Comment 16 Daniel 2006-05-20 02:33:57 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Created an attachment (id=86993) [edit]
> > > /etc/conf.d/vdr.sysinfo
> > > 
> > 
> > Me again,
> > 
> > you have to set your own parameter here, i.e
> > "M/B Temp" and "CPU Temp" ; Parameters from your sensors output.
> >
> 
> After any trys later i think, awk is not the right way to get the parameter.
> The output from different chip sets is a problem
> i.e
> 
> your output for MoBo temp:
> M/B Temp:    +35 C  (high =  +105 C, hyst =    +0 C)
> you have to take ${3} and ${4} by awk
> 
> my output for MoBo temp:
> temp1:       +45
Comment 17 Daniel 2006-05-20 02:33:57 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Created an attachment (id=86993) [edit]
> > > /etc/conf.d/vdr.sysinfo
> > > 
> > 
> > Me again,
> > 
> > you have to set your own parameter here, i.e
> > "M/B Temp" and "CPU Temp" ; Parameters from your sensors output.
> >
> 
> After any trys later i think, awk is not the right way to get the parameter.
> The output from different chip sets is a problem
> i.e
> 
> your output for MoBo temp:
> M/B Temp:    +35 C  (high =  +105 C, hyst =    +0 C)
> you have to take ${3} and ${4} by awk
> 
> my output for MoBo temp:
> temp1:       +45°C  (high =    +0°C, hyst =   +74°C)   sensor = thermistor
> only the ${2} is to take be awk
> 
> there are any diffrent output's by chip sets more (take a look in
> /etc/sensors.conf)
not only the names differ! the temperature-value also - just joking. ;-)

But I don't see the reason(s) from sensors point of view why the temperature-unit-format differs between different chipsets.
Your temperature unit displays "°C" mine is " C" (=> not a cut&paste-error)
So your awk token $2 will include the units while I have to concatenate $2 and $3...

just fyi my sensors version (on all my machines):
tony # sensors -v
sensors version 2.10.0 with libsensors version 2.10.0

> I think its only usefull to add a config file, where you can overwrite the
> default setted parameter.
yes thats better and I think it's also ok for ~95% (just guessed) of all cases
Comment 18 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-22 04:27:25 UTC
Ok, Daniel


I found a interessting tread on
http://www.vdr-portal.de/board/thread.php?threadid=32711

I think the results from this tread and this bugreport will include in an -r1 Version; will commited on next day's for testing.

Joerg

Comment 19 Joerg Bornkessel (RETIRED) gentoo-dev 2006-05-23 01:04:52 UTC
-r1 Version in Portage.