NTP service provides incorrect time - continue

All related to the Kernel, packages system and libraries
Post Reply
wep_hkpu
Posts: 25
Joined: Thu Mar 10, 2016 2:24 pm

NTP service provides incorrect time - continue

Post by wep_hkpu » Wed Mar 22, 2017 7:52 am

Dear libelium-dev,

This is the continuous discussion from the below post.
viewtopic.php?f=6&t=23024

I have tried the solution you provided.
The date setting process can be shown below:
xxx:~# date --set="17:10:00"
Tue Mar 21 17:10:00 HKT 2017
xxx:~# date
Tue Mar 21 17:10:05 HKT 2017
xxx:~# ntpdate -s 0.asia.pool.ntp.org
xxx:~# date
Tue Mar 21 17:11:20 HKT 2017
Then, I checked the system log.
The last statement shows that the NTP socket is in use.
Mar 21 17:10:06 localhost /USR/SBIN/CRON[4041]: (root) CMD (/bin/sh /bin/S3cUR3m0N.sh)
Mar 21 17:10:06 localhost vmunix: [679954.222941] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
...
Mar 21 17:11:05 localhost vmunix: [680013.300261] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Mar 21 17:11:19 localhost ntpdate[4297]: the NTP socket is in use, exiting
This is the netstat as requested.

Code: Select all

xxx:~# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:5001            0.0.0.0:*               LISTEN      4410/iperf      
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      4234/mysqld     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      3992/portmap    
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      4312/olsrd      
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      4109/dnsmasq    
tcp        0      0 0.0.0.0:2006            0.0.0.0:*               LISTEN      4312/olsrd      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4154/sshd       
tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN      4315/pptpd      
tcp6       0      0 :::80                   :::*                    LISTEN      1398/apache2    
tcp6       0      0 :::21                   :::*                    LISTEN      4360/proftpd: (acce
tcp6       0      0 :::53                   :::*                    LISTEN      4109/dnsmasq    
tcp6       0      0 :::22                   :::*                    LISTEN      4154/sshd       
tcp6       0      0 :::443                  :::*                    LISTEN      1398/apache2    
udp        0      0 0.0.0.0:53              0.0.0.0:*                           4109/dnsmasq    
udp        0      0 0.0.0.0:67              0.0.0.0:*                           4109/dnsmasq    
udp        0      0 0.0.0.0:111             0.0.0.0:*                           3992/portmap    
udp        0      0 10.10.10.1:123          0.0.0.0:*                           4485/ntpd       
udp        0      0 Device's IP:123       0.0.0.0:*                           4485/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           4485/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           4485/ntpd       
udp6       0      0 :::53                   :::*                                4109/dnsmasq    
udp6       0      0 fe80::20d:b9ff:fe3d:123 :::*                                4485/ntpd       
udp6       0      0 fe80::20b:6bff:fe36:123 :::*                                4485/ntpd       
udp6       0      0 ::1:123                 :::*                                4485/ntpd       
udp6       0      0 :::123                  :::*                                4485/ntpd       
xxx:~# ps aux | grep ntp
root      4466  0.0  0.2   2968   632 pts/0    S+   17:13   0:00 grep ntp
root      4485  0.0  0.4   4064  1216 ?        Ss   Mar13   0:02 /usr/sbin/ntpd
Please note that I restarted this device on 13 March.

Regards.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: NTP service provides incorrect time - continue

Post by libelium-dev » Wed Mar 22, 2017 8:54 am

Hi wep_hkpu,

Please restart ntpd service with tis command:

Code: Select all

killall ntpd

Code: Select all

service ntpd start
Then please try to synchronize again, it is possible that you have runing several instances from ntpd service.

Regards

wep_hkpu
Posts: 25
Joined: Thu Mar 10, 2016 2:24 pm

Re: NTP service provides incorrect time - continue

Post by wep_hkpu » Fri Mar 31, 2017 12:35 pm

Dear libelium-dev,

The device cannot recognize the command:

Code: Select all

service ntpd start


The notification is shown below.
-bash: service: command not found
Regards.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: NTP service provides incorrect time - continue

Post by libelium-dev » Fri Mar 31, 2017 2:30 pm

Hi wep_hkpu,

Just execute the ntpd service:

Code: Select all

ntpd
Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest