Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
08-17-2020, 04:42 PM
|
#16
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
Code:
root@darkstar:~# ntpdate pool.ntp.org
17 Aug 21:40:03 ntpdate[1131]: the NTP socket is in use, exiting
root@darkstar:~#
This was under debian 10. I first, by mistake, installed ntp. Then, recognizing my error, install ntpdate. Now, this is the output I get. Why?
I even reboot and ran the command again.
Last edited by stf92; 08-17-2020 at 04:43 PM.
|
|
|
08-17-2020, 05:18 PM
|
#17
|
Moderator
Registered: Aug 2002
Posts: 26,744
|
Quote:
Originally Posted by stf92
I have first to set the hardware clock to the correct time in the BIOS menu. Once this is done, I'll issue the above command and see what happens.
|
No, use the date --set="string" to set the system clock.
[/quote]date --set="17 AUG 2020 18:00:00" [/quote]
You can not run ntp and command ntpdate at the same time since they both use the same port. Stop ntp first.
ntpdate is run once to sync time but ntp runs continuously.
Last edited by michaelk; 08-17-2020 at 05:19 PM.
|
|
|
08-17-2020, 06:50 PM
|
#18
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
Code:
root@darkstar:/etc/init.d# ntpd stop
root@darkstar:/etc/init.d# ntpdate pool.ntp.org
17 Aug 23:45:16 ntpdate[1368]: the NTP socket is in use, exiting
root@darkstar:/etc/init.d# update-rc.d -f ntpd remove
root@darkstar:/etc/init.d# ntpdate pool.ntp.org
17 Aug 23:48:03 ntpdate[1421]: the NTP socket is in use, exiting
root@darkstar:/etc/init.d#
How do I stop ntp?
|
|
|
08-17-2020, 07:05 PM
|
#19
|
Moderator
Registered: Aug 2002
Posts: 26,744
|
Check processes to see if it is really running
|
|
|
08-17-2020, 07:08 PM
|
#20
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
Code:
root@darkstar:/etc/init.d# ps -e|grep ntp
504 ? 00:00:00 ntpd
root@darkstar:/etc/init.d#
|
|
|
08-17-2020, 07:35 PM
|
#21
|
Moderator
Registered: Aug 2002
Posts: 26,744
|
ntp is still running.
update-rc will remove the service from automatically starting at boot but not stop a running service.
/etc/rc.d/rc.ntpd stop
|
|
|
08-17-2020, 07:44 PM
|
#22
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
My fault. I am in Debian. No /etc/rc.d in Debian. But Debian is the OS that seems to have the problem. Should I stay on it?
Last edited by stf92; 08-17-2020 at 08:01 PM.
|
|
|
08-17-2020, 08:51 PM
|
#23
|
Moderator
Registered: Aug 2002
Posts: 26,744
|
debian 10 uses systemd. ntpdate has been deprecated but it is still in the repositories.
systemctl status ntp
systemctl stop ntp
timedatectl status should show RTC in local TZ: no. To match slackware run the command.
timedatectl set-local-rtc 1
|
|
|
08-18-2020, 06:09 AM
|
#24
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
Code:
root@darkstar:~# systemctl status ntp
● ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-08-18 07:17:04 UTC; 3h 44min ago
Docs: man:ntpd(8)
Process: 492 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 503 (ntpd)
Tasks: 2 (limit: 2249)
Memory: 2.5M
CGroup: /system.slice/ntp.service
└─503 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 115:123
Aug 18 10:31:05 darkstar ntpd[503]: Soliciting pool server 159.69.38.175
Aug 18 10:31:05 darkstar ntpd[503]: Soliciting pool server 195.21.137.209
Aug 18 10:43:36 darkstar ntpd[503]: 151.80.124.104 local addr 192.168.0.107 -> <null>
Aug 18 10:43:41 darkstar ntpd[503]: 195.21.137.209 local addr 192.168.0.107 -> <null>
Aug 18 10:43:44 darkstar ntpd[503]: 158.174.65.248 local addr 192.168.0.107 -> <null>
Aug 18 10:43:45 darkstar ntpd[503]: 159.69.38.175 local addr 192.168.0.107 -> <null>
Aug 18 10:44:36 darkstar ntpd[503]: 103.120.116.13 local addr 192.168.0.107 -> <null>
Aug 18 10:49:13 darkstar ntpd[503]: 31.131.0.123 local addr 192.168.0.107 -> <null>
Aug 18 10:51:27 darkstar ntpd[503]: 103.76.40.123 local addr 192.168.0.107 -> <null>
Aug 18 10:57:05 darkstar ntpd[503]: 95.97.2.35 local addr 192.168.0.107 -> <null>
root@darkstar:~# systemctl stop ntp
Code:
root@darkstar:~# timedatectl status
Local time: Tue 2020-08-18 11:06:04 UTC
Universal time: Tue 2020-08-18 11:06:04 UTC
RTC time: Tue 2020-08-18 11:06:04
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
root@darkstar:~#
This is really weird. I had both Arch and Debian in this machine and had no problems with the clock except it couldn't be written. At most, when the machine hanged, I had to manually turn off the machine using the power button and, in this case, maybe I found the RTC contained an incorrect value.
Last edited by stf92; 08-18-2020 at 06:30 AM.
|
|
|
All times are GMT -5. The time now is 04:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|