[ale] Finding ifc of running pppd

Joe Knapka jknapka at charter.net
Fri Nov 19 00:47:02 EST 1999


Hello, everyone,

I need a way to find out either (a) the interface associated
with a running instance of pppd, or (b) the PID of the pppd
process associated with a given ppp* interface. Anyone know
a way to do this? (pppd v. 2.3.8)

The reason I need it is that I am hosting multiple VPNs from
a Linux machine, piping PPP over ssh. Sometimes a connection
dies mysteriously and leaves a pppd process hanging around and
an interface allocated. I want a script to run periodically
and clean these things up and re-establish the connections, but
it's not obvious which pppd processes correspond to which
interfaces (the pppd's are running in passive mode, so there
aren't any clues from the ps output). Just downing the
interface doesn't allow the pppd to exit. I know that pppd sets
some useful environment variables as it brings up the link, but
I don't know how to take advantage of that fact, since I'm
invoking pppd remotely via SSH. Plus, it would be nice to be
able to just ask, "What's your PID, ppp2?", rather than
keeping extra data about the interface somewhere from the
time it's invoked.

I guess I could just wax everything and re-establish all the
connections every time one of them failed, but that would,
like, really inhale deeply...

Thanks,

-- Joe Knapka
* Giant .sigs are SO two-hundred-nanoseconds-ago...






More information about the Ale mailing list