Hello,
The NetworkNamager provides a disconnect option. I undertand that it can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Thank for your help.
Regards.
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand that it can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty obvious, I guess.
So, the nonobvious thing is: what precisely is the actual problem you are trying to solve? Please try to be more precise.
HTH, :-) Marko
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand that it can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty obvious, I guess.
So, the nonobvious thing is: what precisely is the actual problem you are trying to solve? Please try to be more precise.
I want it does it automatically!
On 08/28/2012 09:13 AM, Patrick Dupre wrote:
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand that it can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty obvious, I guess.
So, the nonobvious thing is: what precisely is the actual problem you are trying to solve? Please try to be more precise.
I want it does it automatically!
The problem I see in what you are trying to do is that there is no way to determine when exactly a disconnect will be taking place. If you know exactly when a disconnect will take place then it should be fairly simple to script it but if the disconnects take place randomly there is no way you'll be able to script it. You would have to have a program (daemon) running with hooks into the network stack that reported statistics at the time of the disconnect and I don't think that's easy to do and certainly would require an in depth knowledge of programming at the driver level to do it.
Kevin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/28/2012 10:49 AM, Kevin Martin wrote:
On 08/28/2012 09:13 AM, Patrick Dupre wrote:
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand
that it
can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty
obvious, I
guess.
So, the nonobvious thing is: what precisely is the actual
problem you are
trying to solve? Please try to be more precise.
I want it does it automatically!
The problem I see in what you are trying to do is that there is no
way to determine when exactly a disconnect will be taking place.
If you know exactly when a disconnect will take place then it
should be fairly simple to script it but if the disconnects take
place randomly there is no way you'll be able to script it. You
would have to have a program (daemon) running with hooks into the
network stack that reported statistics at the time of the
disconnect and I don't think that's easy to do and certainly would require
an in depth knowledge of programming at the driver level to do it.
Kevin
One thing you could try is creating a /sbin/ifdown-pre-local script. You will have to do a compare of $1 with ppp0, and exit if it is a different interface, because it is run before bringing any interface down. I am not sure if Network Manager uses the ifdown script, but you could alway run ifdown ppp0 to disconnect. This will not help if the interface goes down without you telling it to.
Mikkel - -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
On 2012-08-28 20:19, Mikkel L. Ellertson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/28/2012 10:49 AM, Kevin Martin wrote:
On 08/28/2012 09:13 AM, Patrick Dupre wrote:
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand
that it
can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty
obvious, I
guess.
So, the nonobvious thing is: what precisely is the actual
problem you are
trying to solve? Please try to be more precise.
I want it does it automatically!
The problem I see in what you are trying to do is that there is no
way to determine when exactly a disconnect will be taking place.
If you know exactly when a disconnect will take place then it
should be fairly simple to script it but if the disconnects take
place randomly there is no way you'll be able to script it. You
would have to have a program (daemon) running with hooks into the
network stack that reported statistics at the time of the
disconnect and I don't think that's easy to do and certainly would require
an in depth knowledge of programming at the driver level to do it.
Kevin
One thing you could try is creating a /sbin/ifdown-pre-local script. You will have to do a compare of $1 with ppp0, and exit if it is a different interface, because it is run before bringing any interface down. I am not sure if Network Manager uses the ifdown script, but you could alway run ifdown ppp0 to disconnect. This will not help if the interface goes down without you telling it to.
I tried, but /sbin/ifdown-pre-local is never activated ifdown ppp0 gives: usage: ifdown <device name> ppp0 is not recognized as a device!
I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown but it is also never activated. I though that /etc/sysconfig/network-scripts/ifdown-ppp could do the job, but again it is never activate when I disconnect the network.
This is the result of ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:111.169.43.118 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1370 errors:0 dropped:0 overruns:0 frame:0 TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)
Other ideas?
Thank.
On Wed, Aug 29, 2012 at 1:49 AM, Patrick Dupre pdupre@kegtux.org wrote:
On 2012-08-28 20:19, Mikkel L. Ellertson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/28/2012 10:49 AM, Kevin Martin wrote:
On 08/28/2012 09:13 AM, Patrick Dupre wrote:
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote:
The NetworkNamager provides a disconnect option. I undertand
that it
can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty
obvious, I
guess.
So, the nonobvious thing is: what precisely is the actual
problem you are
trying to solve? Please try to be more precise.
I want it does it automatically!
The problem I see in what you are trying to do is that there is no
way to determine when exactly a disconnect will be taking place.
If you know exactly when a disconnect will take place then it
should be fairly simple to script it but if the disconnects take
place randomly there is no way you'll be able to script it. You
would have to have a program (daemon) running with hooks into the
network stack that reported statistics at the time of the
disconnect and I don't think that's easy to do and certainly would require
an in depth knowledge of programming at the driver level to do it.
Kevin
One thing you could try is creating a /sbin/ifdown-pre-local script. You will have to do a compare of $1 with ppp0, and exit if it is a different interface, because it is run before bringing any interface down. I am not sure if Network Manager uses the ifdown script, but you could alway run ifdown ppp0 to disconnect. This will not help if the interface goes down without you telling it to.
I tried, but /sbin/ifdown-pre-local is never activated ifdown ppp0 gives: usage: ifdown <device name> ppp0 is not recognized as a device!
I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown but it is also never activated. I though that /etc/sysconfig/network-scripts/ifdown-ppp could do the job, but again it is never activate when I disconnect the network.
This is the result of ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:111.169.43.118 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1370 errors:0 dropped:0 overruns:0 frame:0 TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)
Other ideas?
Try to create /etc/ppp/ip-down.local script. I'm not sure if it will be activated by NM, but worth trying.
Patrick Dupre wrote:
Other ideas?
Here's an explanation from the author of NetworkManager on why there are no "pre-down" scripts.
http://old.nabble.com/Re%3A-Interface-UP-Scripting-p22310908.html
You're on your own to invent what you want.
On 08/29/2012 10:17 AM, Michael Cronenworth wrote:
Patrick Dupre wrote:
Other ideas?
Here's an explanation from the author of NetworkManager on why there are no "pre-down" scripts.
http://old.nabble.com/Re%3A-Interface-UP-Scripting-p22310908.html
You're on your own to invent what you want.
About what I would have guessed: by the time the script gets run the connection's already down. Maybe what you need, Patrick, is a script that periodically checks to see if the connection's up and if so, writes out the data you're looking for to a file, overwriting the old data. Have it start when your connection goes up and exit when the connection drops. That way, you can check it, rename it or whatever before re-establishing connectivity.
On 2012-08-29 11:55, Pasha R wrote:
On Wed, Aug 29, 2012 at 1:49 AM, Patrick Dupre pdupre@kegtux.org wrote:
On 2012-08-28 20:19, Mikkel L. Ellertson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/28/2012 10:49 AM, Kevin Martin wrote:
On 08/28/2012 09:13 AM, Patrick Dupre wrote:
On 2012-08-28 16:04, Marko Vojinovic wrote:
On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote: > > The NetworkNamager provides a disconnect option. I undertand
that it
> > can be manager through /etc/NetworkManager/dispatcher.d > However, when I disconnect the ppp0 connection, ppp0 is already > down (due to the disconnect) and prevents me to collect > information > through ifconfig. > > How can I avoid this problem. I wish to collect information of > the > ppp0 just before it is turned off.
Wasn't this covered in another thread already?
If you want to see ifconfig output just before disconnecting, open a terminal, type "ifconfig", read the output, then disconnect. It's pretty
obvious, I
guess.
So, the nonobvious thing is: what precisely is the actual
problem you are
trying to solve? Please try to be more precise.
I want it does it automatically!
The problem I see in what you are trying to do is that there is no
way to determine when exactly a disconnect will be taking place.
If you know exactly when a disconnect will take place then it
should be fairly simple to script it but if the disconnects take
place randomly there is no way you'll be able to script it. You
would have to have a program (daemon) running with hooks into the
network stack that reported statistics at the time of the
disconnect and I don't think that's easy to do and certainly would require
an in depth knowledge of programming at the driver level to do it.
Kevin
One thing you could try is creating a /sbin/ifdown-pre-local script. You will have to do a compare of $1 with ppp0, and exit if it is a different interface, because it is run before bringing any interface down. I am not sure if Network Manager uses the ifdown script, but you could alway run ifdown ppp0 to disconnect. This will not help if the interface goes down without you telling it to.
I tried, but /sbin/ifdown-pre-local is never activated ifdown ppp0 gives: usage: ifdown <device name> ppp0 is not recognized as a device!
I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown but it is also never activated. I though that /etc/sysconfig/network-scripts/ifdown-ppp could do the job, but again it is never activate when I disconnect the network.
This is the result of ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:111.169.43.118 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1370 errors:0 dropped:0 overruns:0 frame:0 TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)
Other ideas?
Try to create /etc/ppp/ip-down.local script. I'm not sure if it will be activated by NM, but worth trying.
Yes, try, because I found the information somewhere, but it just does not either. The reasons has been given in a previous email.
Thank for your help.
I think you could script this with pppd up/scripts. See the man page: http://linux.die.net/man/8/pppd Scroll down to 'Scripts'.
Bill
On 8/28/2012 6:15 AM, Patrick Dupre wrote:
Hello,
The NetworkNamager provides a disconnect option. I undertand that it can be manager through /etc/NetworkManager/dispatcher.d However, when I disconnect the ppp0 connection, ppp0 is already down (due to the disconnect) and prevents me to collect information through ifconfig.
How can I avoid this problem. I wish to collect information of the ppp0 just before it is turned off.
Thank for your help.
Regards.