Mailinglist Archive: opensuse (2234 mails)

< Previous Next >
[SLE] Write a script to poll LM_78 sensors periodically?
  • From: stuarthall@xxxxxxxxxxxxxxx (Stuart Hall)
  • Date: Mon, 13 Sep 1999 14:07:18 GMT
  • Message-id: <37dd02f7.8511519@xxxxxxxxxxxxxxx>



I know there are quite a few script gurus on this list who might be
able to help me.

I am trying to write a BASH script that will run a program every 20
seconds. The program is called "sensors" which polls my cpu
temperature sensors, but only once. I'd like it to happen repeatedly.
I am piping the results to a text file (sensors.txt) where root-tail
is displaying them on my KDE background. right now the results are
static since I can only run "sensors" manually.

I need help figuring out the following:

1. How to launch a program based on a specific time period. I have
figured out for loops, but it doesn't really work very accurately
implementing the delay between loops, and it only runs for the number
of loops that I set in the script.

Can this be done in C++ more easily that a script? I can figure out
the looping a whole lot more easily (e.g. use a for (;;;) to make an
endless loop).

Thanks,
stuart

--
Stuart Hall
Connecticut, USA
stuarthall@xxxxxxxxxxxxxxx

--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/


< Previous Next >