SHARE
TWEET

Untitled

a guest Feb 17th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ ntpq -pn
  2. ntpq: read: Connection refused
  3.    
  4. $ ntpstat
  5. synchronised to NTP server (204.11.201.12) at stratum 3
  6.    time correct to within 71 ms
  7.    polling server every 256 s
  8.    
  9. $ strace ntpq -pn ::1|& grep -i conn
  10. connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  11. connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  12. connect(3, {sa_family=AF_INET6, sin6_port=htons(123), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
  13. recvfrom(3, 0x7fffc3365a10, 516, 0, 0, 0) = -1 ECONNREFUSED (Connection refused)
  14. write(2, "Connection refusedn", 19Connection refused
  15.    
  16. connect(3, {sa_family=AF_INET6, sin6_port=htons(123), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
  17.    
  18. $ netstat -taupn|grep udp|grep ntp
  19. udp        0      0 10.22.7.237:123             0.0.0.0:*                               24213/ntpd
  20. udp        0      0 127.0.0.1:123               0.0.0.0:*                               24213/ntpd
  21. udp        0      0 0.0.0.0:123                 0.0.0.0:*                               24213/ntpd
  22.    
  23. $ ntpq -pn 127.0.0.1
  24.      remote           refid      st t when poll reach   delay   offset  jitter
  25. ==============================================================================
  26. +69.89.207.199   212.215.1.157    2 u  209  256  377   43.582    2.768   0.076
  27. -72.5.72.15      10.3.255.0       3 u  217  256  377   68.627   -1.833   4.388
  28. *204.11.201.12   66.220.9.122     2 u  244  256  377   61.928   -0.712   0.234
  29. +108.59.2.24     130.133.1.10     2 u  178  256  377    1.824    3.256   0.111
  30.    
  31. $ strace ntpq -pn 127.0.0.1|& grep -i conn
  32. connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  33. connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  34. connect(3, {sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
  35. connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  36. connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
  37.    
  38. $ ntpq -pn -4
  39.      remote           refid      st t when poll reach   delay   offset  jitter
  40. ==============================================================================
  41. +69.89.207.199   212.215.1.157    2 u  235  256  377   43.582    2.768   0.047
  42. -72.5.72.15      10.3.255.0       3 u  248  256  377   68.627   -1.833   4.417
  43. *204.11.201.12   66.220.9.122     2 u  265  256  377   61.802   -0.765   0.198
  44. +108.59.2.24     130.133.1.10     2 u  212  256  377    1.824    3.256   0.097
RAW Paste Data
Top