From owner-freebsd-isp Fri Aug 14 16:23:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA12554 for freebsd-isp-outgoing; Fri, 14 Aug 1998 16:23:48 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from helium.hilink.com.au (helium.hilink.com.au [203.8.14.114]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA12547 for ; Fri, 14 Aug 1998 16:23:45 -0700 (PDT) (envelope-from danny@hilink.com.au) Received: from localhost (danny@localhost) by helium.hilink.com.au (8.8.8/8.8.8) with SMTP id JAA03875; Sat, 15 Aug 1998 09:22:33 +1000 (EST) (envelope-from danny@hilink.com.au) X-Authentication-Warning: helium.hilink.com.au: danny owned process doing -bs Date: Sat, 15 Aug 1998 09:22:33 +1000 (EST) From: "Daniel O'Callaghan" To: Paulo Fragoso cc: freebsd-isp@FreeBSD.ORG Subject: Re: PPP statistics In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 14 Aug 1998, Paulo Fragoso wrote: > > Look in /var/run. You'll find files like ttyd0.if, which contain the name > > of the interface using that tty. > > I'm gerating my graphics remotelly from other machine via SNMP which is > using one specific ppp interface. If I were using ttydX.if to get ppp > interface I would need to run rsh comands and to modify my mrtg.cf all the > time. I'm right? > > I this case better solution is to associete ppp interface to specific > serial port. Well, it depends on what it is that you are measuring. In my situation, a customer connects on a serial line and is assigned a ppp interface, which could vary if other customers use slX or tunX interfaces. What I want is bytes sent to customer, I'm not really interested in the interface number. So I do the following: * scan utmp and get customer name and tty * use tty to find interface * read interface stats and assign to customer I don't really follow how you have tied a machine to a specific ppp interface without tying it to a serial line. But if you have, a simple 'fgrep -l ppp0 /var/run/tty*.if' will find the tty for you. Does the machine actually log in? Is there an entry in utmp (can you see it in the output of 'w'). You could also scan utmp for the username. Danny To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message