No one asked, but more fun with bash! one-minute-ping.sh: #!/bin/sh ping $1 > $2 & PID=$! sleep 60 kill -INT $PID
./one-minute-ping.sh 192.168.1.1 log.txt On Tue, Apr 7, 2009 at 8:36 AM, Drew Gibson <[email protected]> wrote: > My solution is not quite so clever but there's the "-c" option for ping. > > ping -c 10 other.end.net > > will send 10 pings and exit normally. > > You might want to have a look at Smokeping > <http://oss.oetiker.ch/smokeping/> > Gives nice graphs of latrency over time and the "smoke" shows variations in > the latency at any given time. > > regards, > > Drew > > > Andre Courchesne wrote: >> >> Just tried SIGQUIT and it does not stop the ping but gives: >> >> 64 bytes from 192.168.10.10: icmp_seq=11 ttl=64 time=0.256 ms >> 64 bytes from 192.168.10.10: icmp_seq=12 ttl=64 time=0.225 ms >> 64 bytes from 192.168.10.10: icmp_seq=13 ttl=64 time=0.241 ms >> 13/13 packets, 0% loss, min/avg/ewma/max = 0.225/0.248/0.252/0.289 ms >> 64 bytes from 192.168.10.10: icmp_seq=14 ttl=64 time=0.235 ms >> 64 bytes from 192.168.10.10: icmp_seq=15 ttl=64 time=0.254 ms >> 64 bytes from 192.168.10.10: icmp_seq=16 ttl=64 time=0.230 ms >> >> You cantry with the various signals: >> >> courc...@courchea-laptop:~$ kill -l >> 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL >> 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE >> 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 >> 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT >> 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP >> 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU >> 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH >> 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN >> 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 >> 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 >> 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 >> 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 >> 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 >> 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 >> 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 >> 63) SIGRTMAX-1 64) SIGRTMAX >> >> >> ---- >> Andre Courchesne - Consultant >> http://www.net-forces.com >> Phone: (514) 667-8448 >> MSN: [email protected] >> Skype: VoipForces >> >> L'information contenue dans le présent document est la propriété de Andre >> Courchesne. Et est divulguée en toute confidentialité. Cette information ne >> doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le >> consentement écrit explicite de Andre Courchesne. >> >> The information contained in this document is confidential and property of >> Andre Courchesne. It shall not be used, disclosed to others or reproduced >> without the express written consent of Andre Courchesne. >> >> Jim Van Meggelen wrote: >>> >>> I ran the following command for a few days, just to get a feel for >>> latency and jitter and such >>> >>> ping [ip address] >> /var/log/pings_to_remote & >>> >>> The challenge I have is that I want to end the process in such a way that >>> I get the summary report you would normally get when you ctrl-d the ping >>> command. >>> >>> If I just 'kill -9' the process (which is the only way I know to >>> terminate a process), it doesn't finish the ping command gracefully, and so >>> the captured file doesn't have the summary report in it. >>> >>> Any tips would be most appreciated. >>> >>> Regards, >>> >>> Jim >>> >>> -- >>> Jim Van Meggelen >>> [email protected] >>> http://www.oreillynet.com/pub/au/2177 >>> >>> "A child is the ultimate startup, and I have three. This makes me rich." >>> Guy Kawasaki >>> -- >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- | It ain't what you don't know that gets you into trouble. It's what | you know for sure that just ain't so. -- Mark Twain | | Network: http://www.linkedin.com/in/spditner | http://facebook.com/people/Simon-P-Ditner/776370031 | http://twitter.com/spditner --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
