Subject: Re: pppd logfile problem
To: None <netbsd-help@netbsd.org>
From: roberto <roberto@redix.it>
List: netbsd-help
Date: 09/24/2004 09:11:24
> On Thu, Sep 23, 2004 at 12:11:29PM +0200, Domingo A. Siliceo wrote:
>> Hello,
>>
>> I record my pppd activity using the command line argument 'pppd logfile
>> /var/log/pppd.lod', but the log file generated is useless to me because
>> it does not record the date (including the time) the connection was
>> started *and* closed.
>>
>> How can I achieve that? I guess I should use another method, but I
>> don't know which one.
>
> One option is to:
>
> Add:
>     CPPFLAGS+= -DLOG_PPP=LOG_LOCAL1
> to pppd/Makefile and rebuild pppd.
> Add:
>     local1.info     /var/log/ppp
>     local1.*        /dev/console
> to /etc/sysconf.conf
> Add:
>     /var/log/ppp                            644  5    *    720  Z
> to /etc/newsyslog.conf
>
> Then write a script to parse the log file.
>
> Unfortunately syslog won't put log info from different programs into
> different
> log files.
>
> 	David
>
> --
> David Laight: david@l8s.co.uk
>

Could be useful to build a script that logs the required info, and put
this in ip-up and ip-down scripts to collect pppd activity info.

An interesting thing could be to log the user name that start the pppd
session but I cannot find a simple way to pass that info to ip-up/ip-down
script without modify the pppd source.

Only a dumb question: what are the file sysconf.conf and newsyslog.conf ?

Regards
Roberto