The 03.09.02 at 11:01, Bernd wrote:
Great! (right?) So I booted into SuSE, changed the init string to the SAME one I had success with in windoze (because the previous one wvdialconf set didn't work). Then I tested it the same way I did in windoze. pppd received a (SIGHUP) at 33.1 minutes and died, and then again at 26.6 minutes and died.
"Interesting" problem! To say something. :-) I have two ideas; I'll write them up, but I wont be very organized - after all, this is not a public speach ;-) First idea. ============= Try strace or ltrace - I think the first one, strace: DESCRIPTION In the simplest case strace runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the _signals_ which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file specified with the -o option. ... Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and _signals_ are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions. The command would be something like "strace -otracefile wvdial params". The problem is that the output file can be real, real big, like huge. Ah, no the above would not work, we have to study pppd, not wvdial. You have to get the pid. Test: cer@nimrodel:~> strace -otracefile -e signal=all -e trace=signal sleep 666 [ --> interrupt with cntrl-C ] cer@nimrodel:~> cat tracefile rt_sigaction(SIGRTMIN, {0x4019ce00, [], SA_RESTORER, 0x4008b3a8}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x4019ce50, [], SA_RESTORER, 0x4008b3a8}, NULL, 8) = 0 rt_sigaction(SIGRT_2, {0x4019cfd0, [], SA_RESTORER, 0x4008b3a8}, NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0 --- SIGINT (Interrupt) @ 0 (0) --- +++ killed by SIGINT +++ cer@nimrodel:~> Not very informative, it doesn't say who interrupted it. Or does it? Ok, if I kill it with a "kill 10523 " I get: --- SIGTERM (Terminated) @ 0 (0) --- +++ killed by SIGTERM +++ If I call strace without filtering (-e) I get a bit more, but not much. Perhaps you will have to use it that way. I get: gettimeofday({1062542649, 841898}, NULL) = 0 nanosleep({666, 0}, 0) = -1 EINTR (Interrupted system call) --- SIGTERM (Terminated) @ 0 (0) --- +++ killed by SIGTERM +++ Ok, another test. You could use it like this - mutandis mutandi: ------- Terminal 1 ---------- cer@nimrodel:~> sleep 666 cer@nimrodel:~> sleep 666 Terminated cer@nimrodel:~> ------- Terminal 2 ---------- cer@nimrodel:~> ps afx|grep sleep 10719 pts/10 S 0:00 | \_ sleep 666 cer@nimrodel:~> strace -otracefile -p10719 -ff cer@nimrodel:~> ------- Terminal 3 ---------- cer@nimrodel:~> kill 10719 cer@nimrodel:~> l tracefile -rw-r--r-- 1 cer users 159 2003-09-03 00:56 tracefile cer@nimrodel:~> cat tracefile gettimeofday({1062543394, 719935}, NULL) = 0 nanosleep({652, 812477000}, 0) = -1 EINTR (Interrupted system call) --- SIGTERM (Terminated) @ 0 (0) --- cer@nimrodel:~> Notice that as I'm starting strace by the pid of the program to watch, it doesn't catch its start. But perhaps, as the "-ff" option is meant for catching child processes, you might use it like: strace -otracefile -ff wvdial options... But make sure you have several megabytes free, perhaps hundreds. Second idea - maybe use both simultaneously :-) ============ Edit "/etc/ppp/options", and remove the "#" in the line with the "debug" word. This will produce a lot of extra debug info in "/var/log/localmessages". For example, for my last session, I have (from wvdial): --> pppd: Terminate Request (Message: "Link inactive") --> pppd: Connect time 3.9 minutes. --> Disconnecting at Tue Sep 2 22:46:28 2003 --> The PPP daemon has died: Link idle: Idle Seconds reached. (exit code = 12) --> man pppd explains pppd error codes in more detail. --> I guess that's it for now, exiting --> The PPP daemon has died. (exit code = 12) That is, a manual termination (^C). And the log: Sep 2 22:46:07 nimrodel pppd[8031]: sent [LCP EchoReq id=0x7 magic=0xb5db6a9a] Sep 2 22:46:07 nimrodel pppd[8031]: rcvd [LCP EchoRep id=0x7 magic=0xb742d62e] Sep 2 22:46:26 nimrodel pppd[8031]: Terminating connection due to lack of activity. Sep 2 22:46:26 nimrodel pppd[8031]: cbcp_lowerdown Sep 2 22:46:26 nimrodel pppd[8031]: Script /etc/ppp/ip-down started (pid 8910) Sep 2 22:46:26 nimrodel pppd[8031]: sent [LCP TermReq id=0x4 "Link inactive"] Sep 2 22:46:26 nimrodel pppd[8031]: rcvd [LCP TermAck id=0x4] Sep 2 22:46:26 nimrodel pppd[8031]: Connection terminated. Sep 2 22:46:26 nimrodel pppd[8031]: Connect time 3.9 minutes. Sep 2 22:46:26 nimrodel pppd[8031]: Sent 216628 bytes, received 151050 bytes. Sep 2 22:46:26 nimrodel pppd[8031]: Waiting for 1 child processes... Sep 2 22:46:26 nimrodel pppd[8031]: script /etc/ppp/ip-down, pid 8910 Sep 2 22:46:28 nimrodel pppd[8031]: Script /etc/ppp/ip-down finished (pid 8910), status = 0x0 Sep 2 22:46:28 nimrodel pppd[8031]: Exit. In that log, in debug mode, you will see if you get a remote disconnect - if you can decipher it, of course :-) -- Cheers, Carlos Robinson