From owner-freebsd-questions Mon Jul 28 18:55:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA23372 for questions-outgoing; Mon, 28 Jul 1997 18:55:46 -0700 (PDT) Received: from dan.emsphone.com (dan@dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA23362 for ; Mon, 28 Jul 1997 18:55:38 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.8.6/8.8.6) id UAA07881; Mon, 28 Jul 1997 20:55:21 -0500 (CDT) Message-ID: <19970728205520.41159@dan.emsphone.com> Date: Mon, 28 Jul 1997 20:55:20 -0500 From: Dan Nelson To: Gary Schrock Cc: freebsd-questions@FreeBSD.ORG Subject: Re: mrtg missing incoming traffic? References: <3.0.3.32.19970728163430.008e6630@eyelab.msu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.79e In-Reply-To: <3.0.3.32.19970728163430.008e6630@eyelab.msu.edu>; from "Gary Schrock" on Mon Jul 28 16:34:30 GMT 1997 X-OS: FreeBSD 2.2-970701-RELENG Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In the last episode (Jul 28), Gary Schrock said: > Ok, for anyone that might be using the mrtg port, has anyone ever > noticed a problem where the incoming traffic just vanishes? If you > look at http://ancient.anguish.org/~piper/ you can see that the graph > was working fine, then just completely disappeared. Meanwhile the > outbound traffic graph is still displaying perfectly fine. Anyone > have any ideas? > > Setup is freebsd-2.1-stable, the ucd-snmp port, and the mrtg port. I had two problems with mrtg; one is that is assumes malloc()d data is zeroed (simply replace all malloc(x) calls with calloc(1,x). This screws up the initial creation of the logfiles. You may not see this unless you have MALLOC_OPTIONS set to 'J'. The other problem I had was with the authors use of ` $variable = sprintf("%.0f",eval($$rcfg{target}{$rou})); ' in a few places. On one of the perls I tried (5.002 on a Linux box), the sprintf would return 0 if the number being printed was above LONG_MAX. Try changing the assignments to ` $variable = eval($$rcfg{target}{$rou}; ' and see what happens. After I fixed those two items, it worked great. -Dan Nelson dnelson@emsphone.com