[mrtg] Re: rateup writing *.log file incorrectly - post 2

paul beard paulbeard at mac.com
Sun Feb 3 23:37:32 MET 2002


I ma having the same problem on a new target I added to an 
existing config file: the first line of the log is updated, but 
the rest of the lines are all zeros.

I looked at the values, changed them throughout the .log and .old 
files, re-ran mrtg and they reverted to what they were before I 
made the edits.

[/www/mrtg/blue]:: head -2 blue-mem.log
1012775405 10280 10280
1012775405 0 0 0 0
(paul at red.PAULBEARD.ORG)-(02:31 PM / Sun Feb  3)
[/www/mrtg/blue]:: sudo mrtg /usr/local/etc/mrtg/blue.cfg
Password:
(paul at red.PAULBEARD.ORG)-(02:31 PM / Sun Feb  3)
[/www/mrtg/blue]:: head -2 blue-mem.log
1012775491 10280 10280
1012775491 0 0 0 0
(paul at red.PAULBEARD.ORG)-(02:31 PM / Sun Feb  3)
[/www/mrtg/blue]:: ls -l blue-mem.log
-rw-r--r--  1 root  wheel  47558 Feb  3 14:31 blue-mem.log
[/www/mrtg/blue]:: sudo perl -pi -e "s#10280#32767#g" blue-mem.log 
blue-mem.old
(paul at red.PAULBEARD.ORG)-(02:32 PM / Sun Feb  3)
[/www/mrtg/blue]:: sudo perl -pi -e "s#0 0 0 0#2 2 2 2#g" 
blue-mem.log blue-mem.old
(paul at red.PAULBEARD.ORG)-(02:33 PM / Sun Feb  3)
[/www/mrtg/blue]:: !head
head -2 blue-mem.log
1012775491 32767 32767
1012775491 2 2 2 2
(paul at red.PAULBEARD.ORG)-(02:33 PM / Sun Feb  3)
[/www/mrtg/blue]:: sudo mrtg /usr/local/etc/mrtg/blue.cfg
(paul at red.PAULBEARD.ORG)-(02:33 PM / Sun Feb  3)
[/www/mrtg/blue]:: head -2 blue-mem.log
1012775623 10280 10280
1012775623 0 0 0 0

The OID was one I got from SOMIX's website and is supposed to show 
  memory utilization for a net-snmp host.

Target[blue-mem]: 
1.3.6.1.4.1.2021.4.11.0&1.3.6.1.4.1.2021.4.11.0:public at blue

Paul C. Williamson wrote:

> If the first entry is getting replaced, what is the second entry?
> It sounds like the correct operation.  What you should do is make a 
> note of what your first line of the .log file is, then after MRTG runs 
> compare that to the first line of your .old file.
> 
> The difference between the first entry in .old and the first entry in 
> .log are compared, normalized, and that number is placed in the 
> second line of the .log.  The current number is then put at the top of 
> the .log file.  Oh, and during this whole thing, the .log file overwrites the .old file.  
> 
> I know there are a lot of things that happen that I have not specifically mentioned, but these are the basics...
> 
> Paul
> 
> 
>>>>Trevor Pirman <tpirman at mirapoint.com> 02/01/02 12:31PM >>>
>>>>
> 
> I looked at the FAQ, and it made sense, but it describes a problem a little
> different than mine.
> 
> My images are in fact getting updated, my browser is refreshing, mrtg is
> running, there are no errors reported, and I get get different values each
> time I query the server for a particular oid.
> 
> The _only_ problem I have is that the first entry in my *.log file is being
> overwritten by the new value taken from the server every time .  In other
> words, it is not incrementing to the next time slot and putting the new
> value there so that the point can get written to the graph.
> 
> Maybe it is my configuration, but I have other sections of the config file
> that are working properly.
> 
> Any help is appreciated.
> 
> -Trevor
> 
> Alex van den Bogaerdt wrote:
> 
> 
>>Trevor Pirman wrote:
>>
>>
>>>I am at a loss with this problem.  Here is the situation:
>>>
>>This is a faq.
>>
>>http://faq.mrtg.org/ 
>>
>>--
>>   __________________________________________________________________
>> / 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 
> 
> 
> 
> --
> 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