tellerstats shell scripts from lm_sensors
Thanks! I'll share this with the group.
Phil
Quoted 103 lines · Floyd L. Davidson
Hello Phil,
I've been playing with the scripts from tellerstats (version 1.9.2, according to the README me file) distributed with
lm_sensors. In particular, I have a Linux based system running on a Tyan S2462 motherboard with dual AMD Athlon CPUs.This Tyan motherboard has both a Winbond W83627HF Super IO chip with hardware sensors and a Winbond W83782D sensor chip, hence there is a great deal of useful information, and the graphs provided by the tellerstats scripts are just the ticket! I'm running
gather.shevery 2 minutes, and generating 21 plots with tellerstats every 10 minutes.The plots are generated in three sizes. One is a "thumbnail" similar to the distribution, but two larger images are created:
one suitable for viewing at 800x600 resolution and one suitable for 1024x768 resolution (I mostly use Opera, at 120% magnification, on a 1289x1024 screen, so the images intended for a 1024x768 screen are just right.)Of course it required significant modifications to the scripts to do what I wanted. You may be interested in some of the differences. An example of the graphs generated can be seen at
<http://web.newsguy.com/floyd_davidson/stats/index.html
the modified scripts are at
<http://web.newsguy.com/floyd_davidson/code/stats/index.html
A brief list of changes (both useful and not):
gnuplotscript.tmpl
This is where most of the significant hacking is. I spent a lot of time on small details... how many tic marks are display in each graph, the precise labels, which colors and the size of lines used for each plot, which line is "on top", location of the plot and the range. There are also lines plotted for maximum, minimum, and normal values.
The unfortunate side effect of carefully choosing various colors and line widths is that the script becomes significantly more complex. However... as an example for others to use it might be fairly good just because it provides more examples of ways to manipulate gnuplot.
I *really* like the results!
tellerstats.shChanged the routines using convert and the way an index.html file is generated. convert is used to generate a thumbnail and two (rather than one) larger images. A file "index.tmpl" is used to generate "index.html" and "index1.html". (I used sed rather than perl which you would probably prefer.) The "thumbnail" images are kept as small as possible to load quickly, but are large enough that when displayed 2 across the graph is useful (the text it pretty blurred). The index.html file displays well on Netscape running full screen on a 1024x768 window. There is a clickable button to switch to smaller images, displayed by index1.html, which is suitable for Netscape on a 800x600 window.
gather.shFetches data from multiple locations. I.e., it deals with a motherboard that has two sensor chips. This may be useful as an example simply because it is easier to delete what is unnecessary than it is to add in what isn't there.
I've used the "scale" option to bc to set the precision of the calculated data points.
Other modifications are probably *not* useful:
I used awk rather than perl in most places... ;-)
I used very different calculations to massage the data for graphing. The significance is that I want indicative graphs... and *none* of this data can be considered either precision or accurate. The adjustments provided by Tyan in their example sensors.conf file are probably closer to "accurate", but for my purposes that isn't of much value (since I'm not willing to make the effort to calibrate the results).
If any of this is useful... it's all GPL'd and you are welcome to it! And I thank you greatly (along with others who've added to it along the way) too.
Have a good day,
Floyd
Quoted 10 lines · Floyd L. Davidson
I've been playing with the scripts from tellerstats (version 1.9.2, according to the README me file) distributed with
lm_sensors. In particular, I have a Linux based system running on a Tyan S2462 motherboard with dual AMD Athlon CPUs. (...)
differences. An example of the graphs generated can be seen at
As a side note, it looks like you are using high fan clock divider values. With such high speed fans you should not need to do so. You could try lowering the fanN_div values to obtain nicer fan speed graphs (i.e. with smaller steps.)
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
On Fri, 10 Sep 2004 02:33:54 -0800, Floyd L. Davidson wrote
Quoted 1 line
I'm not sure smaller steps makes for "nicer" graphs! :-)
Oh well, that's a matter of personal taste I guess ;)
Quoted 7 lines
I'm most interested in having a graph that is instantly indicative of the health of the fan. Fans don't usually just die and stop running. Instead the bearings slowly go bad, and it starts with intermittent slowing down. Hence I do want good resolution at lower speeds... and large steps that make it obvious something is happening when it starts slowing down.
Quoted 5 lines
However, to make apparently "smaller steps" on the graph it would probably be better to extend the graph range. I'm using a pretty small range, from 6000 to 8500, which tends to make the variations look huge. A graph range of say 0 to 10000 does make that a little less distracting.
That's pretty much what I meant. Limiting the graph to a high range meant that you wouldn't have been able to display lower speeds, so it was kind of pointless to set the dividers to a value that would allow them to be measured.
Quoted 5 lines
Plus there are relatively no real problems with using higher divisors, but there are definite problems from using lower ones, e.g., with slow speed fans. Hence while a particular individual might well use lower divisors with high speed fans, an example program probably should stick with the highest divisor, 8.
As a side note, 8 is not the highest divider for all chips. Some go up to 128. However I agree that starting with a high divider makes sense. Note that I have plans to automate the divider selection. This is already in place in the pc87360 driver and should probably be extended to other drivers (although this isn't trivial and discussions have occured about the topic).
My comment was for your specific case. Since you obviously have high speed fans and consider that they shouldn't drop below 6000RPM, setting low dividers would make sense. The fact that you then cannot get the exact reading when the fan drops below 2500RPM is probably not a problem. 2500RPM is not fundamentally different from a stopped fan if the nominal speed is 7000RPM. In both cases you better hurry up and get it fixed.
So that's what I would so - but you are of course free to follow a different approach. Your (new) approach is perfectly valid too.
Quoted 10 lines
On to a second topic. If I remember right you are the one who took interest in the
lm_sensorstickets on problems accessing the Hardware Monitor section of the W83627HF Super IO chip on some of the Tyan motherboards (that was a year or two past, and some of the ticket numbers are 729, 764, 808, 861, and 867 and 941 among others). There was some asm code (861) and C code
(867) posted that, while somewhat buggy, will enable the W83627HF's hardware sensors. But nobody dug into it far enough to really answer all the questions, and the code presented isn't something that non-programmers would want to use.
I am not the one. Back then I was not very active in the project (if I only were active at all). Mark D. Studebaker did answer the tickets, it seems.
Quoted 9 lines
I just spent a bit of time experimenting to figure out as much as I could about what is going on, and wrote a more universal program to enable and initialize the W83627HF sensors. It works on the S2462 motherboard and would probably work on other Tyan boards.
The program is on my web page at
404 Not Found
At any rate, the prefered form for inclusions in the lm_sensors package are small, targeted patches to our tree. This is true for your work on tellerstats as well. Individual patches can be quickly reviewed if done properly. And it happens that none of us seems to have much spare time these days.
A different approach is that you can keep your work on your own web pages and we simply link to them (from our "useful links" page). You choose.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 6 lines
Quoted 6 lines
At any rate, the prefered form for inclusions in the
lm_sensorspackage are small, targeted patches to our tree. This is true for your work on tellerstats as well. Individual patches can be quickly reviewed if done properly. And it happens that none of us seems to have much spare time these days.
Quoted 6 lines
Quoted 3 lines
A different approach is that you can keep your work on your own web pages and we simply link to them (from our "useful links" page). You choose.
Well, clearly none of this is appropriate for "small, targeted patches". If you want to put a link up for it, please do.
OK, I added the links on our page.
That said, this doesn't prevent you from submitting your changes sliced if you think they belong to our package.
Thanks.
Signature · 2 lines
Jean "Khali" Delvare http://khali.linux-fr.org/
Quoted 7 lines · Jean Delvare
OK, I added the links on our page.
That said, this doesn't prevent you from submitting your changes sliced if you think they belong to our package.
Thanks.
Sounds good Jean, thanks.
As for the program to init the W83627HF Super IO chip on Tyan motherboards, I don't really think it fits into lm_sensors as such, and probably is best that it be something people find on your list of links. I'll probably set up a project on freshmeat.org for it too.
However, I should just donate some time to the cause... and go through the tellerstats scripts again with the intent of incremental patches that would result in a more universal script than what I'm using now. I'll give it a try in a few days.
BTW, I'm still working on just the /right/ set of example graphs. As I write this I'm doing a stress test with repeated compilation of the Linux kernel using "make -j2 MAKE='make -j2'" in a loop that runs for half an hour. I takes several hours for things to stabalize again after running it, and I want the 48 hour graph to show two of them 24 hours apart. So tomorrow about this time I may have the graphs I want. It makes for a great demo of the potential for using the graphs as a trouble shooting tool! (I'm a nerd, I just love the data.)
Have a good day,
Floyd
Signature · 2 lines
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik "Place where people hunt snowy owls" (Barrow, Alaska)
Quoted 6 lines · Jean Delvare
Quoted 4 lines
The program is on my web page at
404 Not Found
Opps. My fault. An editing errot.
http://web.newsguy.com/floyd_davidson/code/sensors/
Quoted 7 lines
At any rate, the prefered form for inclusions in the
lm_sensorspackage are small, targeted patches to our tree. This is true for your work on tellerstats as well. Individual patches can be quickly reviewed if done properly. And it happens that none of us seems to have much spare time these days.A different approach is that you can keep your work on your own web pages and we simply link to them (from our "useful links" page). You choose.
Well, clearly none of this is appropriate for "small, targeted patches". If you want to put a link up for it, please do.
Have a good day,
Floyd
Signature · 2 lines
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik "Place where people hunt snowy owls" (Barrow, Alaska)
Quoted 9 lines · Jean Delvare
Quoted 8 lines · Floyd L. Davidson
I've been playing with the scripts from tellerstats (version 1.9.2, according to the README me file) distributed with
lm_sensors. In particular, I have a Linux based system running on a Tyan S2462 motherboard with dual AMD Athlon CPUs. (...)
differences. An example of the graphs generated can be seen at
Quoted 6 lines
Quoted 2 lines
As a side note, it looks like you are using high fan clock divider values. With such high speed fans you should not need to do so. You could try lowering the
fanN_divvalues to obtain nicer fan speed graphs (i.e. with smaller steps.)
Hi Jean, thank you for the interest. A few comments on this particular topic, and then I've got a different topic for you.
I'm not sure smaller steps makes for "nicer" graphs! :-)
I'm most interested in having a graph that is instantly indicative of the health of the fan. Fans don't usually just die and stop running. Instead the bearings slowly go bad, and it starts with intermittent slowing down. Hence I do want good resolution at lower speeds... and large steps that make it obvious something is happening when it starts slowing down.
However, to make apparently "smaller steps" on the graph it would probably be better to extend the graph range. I'm using a pretty small range, from 6000 to 8500, which tends to make the variations look huge. A graph range of say 0 to 10000 does make that a little less distracting.
Plus there are relatively no real problems with using higher divisors, but there are definite problems from using lower ones, e.g., with slow speed fans. Hence while a particular individual might well use lower divisors with high speed fans, an example program probably should stick with the highest divisor, 8.
I've just changed gnuplotscript.html first to a 0-9k range, and then to a 0-10k range. I kinda like that last one, so I'll probably upload that revision and a new set of images.
Note also that previously today I uploaded a new set of example graphs and a new version of gnuplotscript.tmpl to generate them. A number of minor and a couple of major changes. The temperature plots are now banded with different colors depending on the temperatures being plotted. At first I had 5 colors, but then decided it wasn't better than just 3 and uploaded another set. Cool temps are blue, then it turns to magenta, and if it gets up close the "maximum" line, it turns to red.
On to a second topic. If I remember right you are the one who took interest in the lm_sensors tickets on problems accessing the Hardware Monitor section of the W83627HF Super IO chip on some of the Tyan motherboards (that was a year or two past, and some of the ticket numbers are 729, 764, 808, 861, and 867 and 941 among others). There was some asm code (861) and C code
(867) posted that, while somewhat buggy, will enable the W83627HF's hardware sensors. But nobody dug into it far enough to really answer all the questions, and the code presented isn't something that non-programmers would want to use.
I just spent a bit of time experimenting to figure out as much as I could about what is going on, and wrote a more universal program to enable and initialize the W83627HF sensors. It works on the S2462 motherboard and would probably work on other Tyan boards.
The program is on my web page at
http://web.newsguy.com/floyd_davidson/sensors/
Have a good day,
Floyd
Signature · 2 lines
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik "Place where people hunt snowy owls" (Barrow, Alaska)