[mrtg] Re: Temperature monitor

Punit Nakar nakarp at eng.fsu.edu
Fri Jul 12 18:13:56 MEST 2002


Hello Mr Alex,
Thank you very much for your help. Using the bat file you sent, i was able
to see values 100 and 50 on the plot. These were vertical lines. the log
file too showed the following:
1026486900 100 50 100 50
1026486600 100 50 100 50
1026486300 100 50 100 50
1026486000 100 50 100 50

Now what i did was i made a bat file as follows

@echo off
type c:\mrtgdata\Output_F.txt

Output_F.txt is the file which has my data in the following format:
24     7/12/02 11:25:58 AM
24     7/12/02 11:30:58 AM
24     7/12/02 12:01:39 PM
24     7/12/02 12:07:28 PM

When i ran the bat file from mrtg, it gave me the following warning

C:\mrtg\bin>perl mrtg mrtg.cfg
Daemonizing MRTG ...
Do Not close this window. Or MRTG will die
WARNING: Problem with External get 'c:\mrtgdata\Output_F.bat':
   Expected a Number for 'in' but got ''

Also, in the log file i see the following:
1026490055 -1 24
1026490055 1 24 1 24
1026489919 1 24 1 24

This means it is taking my value but there is some problem and is it putting
it in the wrong place?
On the html page i see the following statement:

The statistics were last updated Friday, 12 July 2002 at 12:07,
at which time '24 7/11/02 10:47:27 PM' had been up for 24 7/11/02 10:47:17
PM.

Now this means that there is some problem reading from my bat file, but i
tried different things, but it didnt change. Can you suggest something. I
feel, this thing is almost done, but there is just somethg small missing :(

Thank you,

Punit

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]On
Behalf Of Alex van den Bogaerdt
Sent: Thursday, July 11, 2002 7:06 PM
To: Punit Nakar
Cc: MRTG users
Subject: [mrtg] Re: Temperature monitor



Punit Nakar wrote:

> Are you running this on a windows platform or unix/linux? I have been
trying

That really shouldn't matter as far as mrtg is concerned.

> to use an external temp measuring device to plot the temp on a win98
> machine, but i am having some problem with reading the data from my text
> file. Can you tell me what program are you using to read data from your
> device.

Do not try to read data from a text file.  That doesn't work.  You
need to write a program that prints numbers on the screen.
Compare this with the "echo" command.  A small batch file could look
like this:

   @echo off
   echo 100
   echo 50
   echo some host
   echo quite some time

When you run this from mrtg (backticks!) and use the GAUGE option, it
should produce two horizontal lines: Target[x]: `c:/mrtg/batch.bat`

When this works, you're ready to write another program that outputs
the same way but this time with numbers you get from the sensor.

HTH
--
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list