[Lvlug] Linux Temperature revisited...

Mark gator@blast.net
Sat, 11 May 2002 13:30:34 -0400


On Friday 26 April 2002 13:07, Linc wrote:
> OK, here's a little ditty that does the processing on the temperature
> sensor I have installed and generates a nice line graph.  Required are the
[snip...]
> well..  Can you convert it to run on a Linux system?  Here are a couple
> hints: the date -r function would have to be changed to one of the examples
> listed in earlier emails, the tput command needs to be changes for linux,
> and there is one more small change that needs to be made..  OK, who wants
> to try?  Here it is!

[snipped the code]

I guess I shouldn't have taken so long to get back to this one but I finally 
got some time off from the ship.  

The initial problem I had was that the 'date' program works on Linux but it 
obviously did not output the same info that the script was looking for. So I 
wrote my own date conversion program in C and I use that in the same spot of 
your script to give it what it wants. The second problem that I got stuck on 
was 'bc'. I was really surprised that Linux doesn't have something like that 
because I seem to remember reading about doing math at the command line. But, 
then again, maybe I didn't install it because I thought I wouldn't need it. 
So I again turned to some C code and do the math in a little program. 

  tput is available on the Slack 8 distro I am using but the params are just 
a little different.

After all that I am able to build the graphs from the templog file. I am now 
working on writing the whole thing in C and calling ploticus to do the work. 
Don't know if I will get too far. It is just a small diversion and I have way 
too many projects already.

Mark