From owner-freebsd-questions@FreeBSD.ORG Sun Nov 27 00:04:38 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CA5016A41F for ; Sun, 27 Nov 2005 00:04:38 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E09843D58 for ; Sun, 27 Nov 2005 00:04:37 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-91-226-109.san.res.rr.com [66.91.226.109]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id jAR0YDx3015384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Nov 2005 16:34:14 -0800 X-MailKey: purple frogs are falling from the sky Message-Id: <6.2.3.4.2.20051126154801.023a3ac0@cobalt.antimatter.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Sat, 26 Nov 2005 15:59:59 -0800 To: "matt ." , freebsd-questions@freebsd.org From: Glenn Dawson In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: Subject: Re: Running mrtg on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 00:04:38 -0000 At 03:33 PM 11/26/2005, matt . wrote: >Heya folks, > >I hope this question isn't too MRTG-centric in-so-far-as I should be posting >it to the MRTG list (which I have and received no response).... > >My quandry: > >I don't want MRTG run as root, however creating a crontab in /var/cron for >the mrtg user yeilds errors every time it tries to run. > >mrtg user entry: > >mrtg:*:10103:10103::0:0:MRTG Stats Collector:/nonexistent:/sbin/nologin > >mrtg directory permissions: > >cd /usr/local/etc >drwxr-xr-x 2 mrtg wheel 512 Nov 23 15:10 mrtg > >My output directory: >drwxr-xr-x 2 mrtg wheel 512 Nov 23 14:18 mrtg > >crontab entry: > >*/5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg > >Error: > >2005-11-24 17:55:00 -- Started mrtg with config >'/usr/local/etc/mrtg/mrtg.cfg' >2005-11-24 17:55:00 -- Use of uninitialized value in concatenation (.) or >string at /usr/local/bin/mrtg line 720. >2005-11-24 17:55:00 -- Use of uninitialized value in concatenation (.) or >string at /usr/local/bin/mrtg line 720. >2005-11-24 17:55:00 -- ERROR: Can't Execute '/rateup' The line above indicates your problem. mrtg is looking for rateup in / instead of /usr/local/bin which is where it would normally be. Did you install mrtg from ports? You might want to try running mrtg with --debug=cfg,dir and see if that gives an indication of why it can't find the rateup binary. -Glenn >If I run the same cron job as root, it works just dandy. Even O'Reilly's >"Essential SNMP" states it's not necessary to run mrtg as root: > >Quote from section 13.1: > >"The next step is to make sure MRTG runs every five minutes. There's no need >for MRTG to be run by root; any user will do. Add a line like the following >to the *crontab* entry for the appropriate user." > >I've experienced this problem on 4.11 and 6.0. I have seen it working on >another 4.11 box, however I can't figure out how they did it :-/ > >Is there perhaps something FreeBSD-specific I'm overlooking? thanks! > >kind regards, > >matt >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"