Date: Sat, 15 Aug 1998 09:22:33 +1000 (EST) From: "Daniel O'Callaghan" <danny@hilink.com.au> To: Paulo Fragoso <paulo@nlink.com.br> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: PPP statistics Message-ID: <Pine.BSF.3.96.980815091355.1406A-100000@helium.hilink.com.au> In-Reply-To: <Pine.BSF.3.96.980814114423.5456J-100000@mirage.nlink.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980815091355.1406A-100000>