[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Finding the tty# associated with a ppp process?



Robert:

Thank you! After looking over the old script I see I was using kill -9. Not
a standard kill. I simply took out the -9 and yes it will allow the next
user to connect with a network connection on that killed modem connection.
Apparently I am killing off much more than needed with the kill -9 approach.
And yes your were right the PID's are identical for both. I had not checked
that. It's interesting that when I used R.H. 4.2 as our dialup server and
using the same script with the kill -9, it worked fine. Apparently ppp has
evolved quite a bit since 4.2. I would be very interested in the timelogger
also if you don't mind sending it.

Thank You,

Eddie Strohmier
Bonwell Globalnet
www.bonwell.com

----- Original Message -----
From: Robert Canary <rwcanary ohiocounty net>
To: <redhat-list redhat com>
Sent: Tuesday, March 14, 2000 2:20 AM
Subject: Re: Finding the tty# associated with a ppp process?


> I believ you got something setup wrong Eddie.  Killing the modem should
> also send a signal to ppp to die.  Are you running pppd with the "modem"
> option.   The lock file will reflect the ppp PID.  Send it standard kill
> will disconnect the pppd.  I have attached a script that I use that runs
> from cron every five minutes.{ 0-59/5 * * * * root
> /full/path/to/modemcheck}. It checks if I have more logins than ports or
> vice verse.  Too many logins say I have a hung pppd, too many ports says
> my modem isn't reseting properly.  I tail the file in a terminal screen
> so I see things in quick glance.
>
> As far as the info you are looking for you can get from the auth-up and
> auth-down scripts (see the pppd man pages).  pppd calls this scripts if
> they exist I use them to trigger nologins, create timelogs, checks
> usertimes.  Mostly they are meant to spawn other process.  I have a nice
> timelogger if your interested in it.
>
> Eddie Strohmier wrote:
>
> > Hello: I am trying to write a script to allow the killing of a ppp
> > process for a dialup user. I am running a cylades cyclom -ye pci board
> > with 32 ports for dialup access to the net and when a user logs in
> > pppd will assign a random /dev/pppn device to it. It could be ppp0
> > through ppp31. But it is always random. In the past with Red Hat 4.2 I
> > was able to just kill the /var/lock/ttyC# file and it killed the
> > entire ppp process to allow a new ppp process. But with RH 6.0 on
> > kernel 2.2.14 with pppd 2.3.8 running I find that killing of the
> > /var/lock PID file, (LCK..ttyC#) will only disconnect the modem but
> > the ppp process is still running. So the next user that would dial
> > into that certain modem could not establish a network connection as I
> > assume the ppp process still sees a pppn connected to that ttyCn and
> > the modem actually answers and shows a user logged on but they do not
> > have a network connection. The only place I could find to associate
> > what ppp device was attached to what ttyC port was to search
> > /var/log/messages. Is that my only way of association? Should I run
> > the script by cat /var/log/messages ttyC# to find the pppn device that
> > it is using or was assigned? And if so how would the syntax go as far
> > as "cat" for the PID number I need which is in /var/run? I know if I
> > kill -9 that certain pppn process in /var/run/pppn.pid I can get a
> > clean disconnect of modem and network to allow a clean connection for
> > the next user. I have experimented and searched in depth but can not
> > seem to get it to work properly. Any advise would be very helpful as I
> > need that remote "easy" way of killing a pppn PID without going
> > through the labor of looking it up in /var/log/messages each
> > time. Thanks in Advance, Eddie StrohmierBonwell
> > Globalnetwww.bonwell.com
>
> --
> robert canary
> system services
> OhioCounty Networks
> 270-298-9331 Voice
> 270-298-7449 Fax
>
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]