[ntp:questions] "Trapping" in ntpd

Steve Kostecke kostecke at ntp.org
Thu Oct 4 18:57:13 UTC 2007


On 2007-10-04, Rob <pse at nospam.com> wrote:

> Update -- I can ntptrap to ANY ntpd host!!  

You can receive traps from any ntpd that allows it.

> When I run "perl ntptrap 192.168.1.27" from 192.168.1.26, I get the
> following:
>
> [rob at myarch ~]$ perl ntptrap 192.168.1.27
> Thu Oct  4 13:19:24 2007 Listening at address 0.0.0.0 port 32978
> Thu Oct  4 13:19:35 2007 [192.168.1.27] trap#1 \
> 	peer  2850 [127.127.1.0] [127.127.1.0] event_reach 
> Thu Oct  4 13:19:36 2007 [192.168.1.27] trap#2 \
>	SYSTEM   event_sync/strat_chg stratum=16 refid=INIT peer=2845
> Thu Oct  4 13:19:36 2007 [192.168.1.27] trap#3 \
>	SYSTEM   event_sync_chg stratum=2 refid=209.51.161.238 \
>	avi-lis.gw.lightning.netleap_none sync_udp/time 
> Thu Oct  4 13:19:36 2007 [192.168.1.27] trap#4 
>	SYSTEM   event_sync/strat_chg stratum=2 refid=209.51.161.238 \
>	avi-lis.gw.lightning.net peer=2845

This looks correct.

> But it is strange that it is saying "listening 0.0.0.0"

It's probably listening on a wildcard address.

> But I still can't get the -l option to work..
>
> [rob at myarch ~]$ perl ntptrap -l ntptrap.log 192.168.1.27 
> Cannot open "/dev/null ntptrap.log": Permission denied

I see this:

| steve at stasis:~/bin$ ./ntptrap -l /tmp/foo.txt ntp0
| Cannot open "&STDOUT /tmp/foo.txt": Invalid argument

So, as usual, YMMV applies.

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/




More information about the questions mailing list