You are not logged in.
Pages: 1
Hi,
I was just hoping someone could help me work out If I've set the time correctly on my system. When I did the install I did
timedatectl set-ntp trueand
hwclock --systohcand after I installed the Desktop Environment I installed ntp and enabled ntpd.service.
timedatectl statusgives me:
Local time: Thu 2020-07-02 00:41:43 BST
Universal time: Wed 2020-07-01 23:41:43 UTC
RTC time: Wed 2020-07-01 23:41:43
Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no systemctl status ntpdgives me:
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-07-02 00:22:41 BST; 20min ago
Process: 377 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
Main PID: 395 (ntpd)
Tasks: 2 (limit: 18811)
Memory: 4.1M
CGroup: /system.slice/ntpd.service
└─395 /usr/bin/ntpd -g -u ntp:ntp
Jul 02 00:22:41 The-Eagle ntpd[395]: Listen normally on 3 lo [::1]:123
Jul 02 00:22:41 The-Eagle ntpd[395]: Listening on routing socket on fd #20 for interface updates
Jul 02 00:22:41 The-Eagle ntpd[395]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jul 02 00:22:41 The-Eagle ntpd[395]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jul 02 00:22:41 The-Eagle systemd[1]: Started Network Time Service.
Jul 02 00:22:55 The-Eagle ntpd[395]: Listen normally on 4 wlp0s20f3 [fe80::ef06:d09c:6b23:362a%2]:123
Jul 02 00:22:55 The-Eagle ntpd[395]: new interface(s) found: waking up resolver
Jul 02 00:22:58 The-Eagle ntpd[395]: Listen normally on 5 wlp0s20f3 192.168.0.9:123
Jul 02 00:22:58 The-Eagle ntpd[395]: new interface(s) found: waking up resolver
Jul 02 00:31:45 The-Eagle ntpd[395]: kernel reports TIME_ERROR: 0x41: Clock UnsynchronizedI don't know why there's the kernel error saying clock unsynchronized.
when I set up reflector it seems to be going by UTC time
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector --country France --country Germany --country UK --age 12 --protocol https --sort rate --save /etc/pacman.d/m>
# When: 2020-07-01 18:36:00 UTC
# From: https://www.archlinux.org/mirrors/status/json/
# Retrieved: 2020-07-01 18:35:52 UTC
# Last Check: 2020-07-01 18:16:08 UTCTo be honest I don't have a clue about all this time stuff and am totally confused. I just want to know if its configured correctly so I won't have issues with it in the future. The time on my screen is correct for my local time.
Any help would be much appreciated.
Can someone help me correct the time if that is needed and explain how I can make sure it stays synchronized. I did think I had set the time correctly and that ntpd was going to keep it synchronized.
Anyone hopefully someone who doesn't mind explaining things in a bit more detail without just directing me to the wiki. I do understand the intention of directing someone to the wiki. I have put it a serious amount of effort to just get a basic arch install and desktop environment setup. From scratch not long ago I started learning about Linux and only after installing arch have I asked a couple of questions.
I'm still stuck and quite confused with the whole issue of setting the time. Not only am I new to Arch but I am new to Linux too. I don't want to give up on Arch now that I've come this far and spent so many weeks to get to where I am. I had read the appropriate wiki pages before I first posted here and then again after being directed back to them, but sadly the wiki isn't written for absolute novices like me and I've struggled immensely trying to understand anything from it.
I have a few questions.
1) how does One clarify there system time and hardware clock is correct or wrong?
2) how to set up a time synchronisation service correctly so the time issue never needs to be a concern again?
3) If I was to do a fresh install using
timedatectl set-ntp trueand also
hwclock --systohcand then after installing the desktop environment if I disabled
systemd-timesyncd.serviceand then installed ntp and enabled
systemctl enable --now ntpd.servicewould/should all my time issues be resolved?
Last edited by Straight-path (2020-07-02 19:05:24)
Offline
cat /usr/lib/systemd/system/ntpd.service
[Unit]
Description=Network Time Service
After=network.target nss-lookup.target
Conflicts=systemd-timesyncd.service
[Service]
Type=forking
PrivateTmp=true
ExecStart=/usr/bin/ntpd -g -u ntp:ntp
Restart=always
[Install]
WantedBy=multi-user.targettimedatectl set-ntp true enabled systemd-timesyncd.service but as ntpd.service lists it as conflicting it will not be started when ntpd.service is started.
Offline
So am I meant to disable one of the services?
Offline
So am I meant to disable one of the services?
Yes see System_time#Time_synchronization for a full list of choices.
Offline
Not sure if I was just meant to edit my original post or write here.
Anyone hopefully someone who doesn't mind explaining things in a bit more detail without just directing me to the wiki. I do understand the intention of directing someone to the wiki. I have put it a serious amount of effort to just get a basic arch install and desktop environment setup. From scratch not long ago I started learning about Linux and only after installing arch have I asked a couple of questions.
I'm still stuck and quite confused with the whole issue of setting the time. Not only am I new to Arch but I am new to Linux too. I don't want to give up on Arch now that I've come this far and spent so many weeks to get to where I am. I had read the appropriate wiki pages before I first posted here and then again after being directed back to them, but sadly the wiki isn't written for absolute novices like me and I've struggled immensely trying to understand anything from it.
I have a few questions.
1) how does One clarify there system time and hardware clock is correct or wrong?
2) how to set up a time synchronisation service correctly so the time issue never needs to be a concern again?
3) If I was to do a fresh install using
timedatectl set-ntp trueand also
hwclock --systohcand then after installing the desktop environment if I disabled
systemd-timesyncd.serviceand then installed ntp and enabled
systemctl enable --now ntpd.servicewould/should all my time issues be resolved?
Offline
I think that would resolve your problems. One of the advantages of Arch Linux is that there are more than one way to accomplish things so you can configure things to your liking. A problem arises when one tries to have more than one thing solve a problem at one time. Turning on multiple services to control networks causes problems as the services fight for control. Looks like the same thing happens with time synchronization.
Unless you need to provide an NTP server, I suggest the other tack. Disable the ntp service, and leave the systemd-timesync service enabled. If all goes well, you will then get output like this:
ewaller@odin/home/ewaller % timedatectl
Local time: Thu 2020-07-02 10:59:15 PDT
Universal time: Thu 2020-07-02 17:59:15 UTC
RTC time: Thu 2020-07-02 17:59:15
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
ewaller@odin/home/ewaller % instead of the abbreviated version you had above.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Thank you very much.
Sorry what did you mean by the abbreviated output I had?
Yeah I didn't realise that
timedatectl set-ntp truestarted a time service.
So what your saying is that
timedatectl set-ntp trueand
hwclock --systohcthose commands are enough to have the time synced correctly and that timdedatectl is a synchronisation service and it should maintain my system time corrctly?
Offline
I'm assuming when you look at the output I posted before from
timedatectl statusyou can tell the my system time isn't set correctly. What is it that signifies the system time is wrong? because the time on my desktop is correct for my local time.
Offline
Yes. But, after doing so, post the output of your timedatectl.
I guess I was wrong about abreviated; but rater that yours said that ntp was inactive. When I read your output yesterday, I thought it had been missing a line or two.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Yesterday I had disabled both time services and re enabled ntpd is this correct or still the same. lol sorry I don't know what to look for to discern whether the time is correct or wrong.
[muj@The-Eagle ~]$ timedatectl status
Local time: Thu 2020-07-02 19:27:59 BST
Universal time: Thu 2020-07-02 18:27:59 UTC
RTC time: Thu 2020-07-02 18:27:59
Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no Offline
ntpd is enable
[muj@The-Eagle ~]$ systemctl status ntpd
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-07-02 18:25:55 BST; 1h 4min ago
Process: 350 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
Main PID: 356 (ntpd)
Tasks: 2 (limit: 18811)
Memory: 4.5M
CGroup: /system.slice/ntpd.service
└─356 /usr/bin/ntpd -g -u ntp:ntp
Jul 02 19:04:01 The-Eagle ntpd[356]: Deleting interface #9 wlp0s20f3, 192.168.0.9#123, interface stats: received=48, sent=75, droppe>
Jul 02 19:04:01 The-Eagle ntpd[356]: 139.162.219.252 local addr 192.168.0.9 -> <null>
Jul 02 19:04:01 The-Eagle ntpd[356]: 185.53.93.157 local addr 192.168.0.9 -> <null>
Jul 02 19:04:01 The-Eagle ntpd[356]: 81.21.65.169 local addr 192.168.0.9 -> <null>
Jul 02 19:04:01 The-Eagle ntpd[356]: 83.137.225.103 local addr 192.168.0.9 -> <null>
Jul 02 19:04:01 The-Eagle ntpd[356]: Deleting interface #10 wlp0s20f3, fe80::ef06:d09c:6b23:362a%2#123, interface stats: received=0,>
Jul 02 19:04:04 The-Eagle ntpd[356]: Listen normally on 11 wlp0s20f3 192.168.0.9:123
Jul 02 19:04:04 The-Eagle ntpd[356]: Listen normally on 12 wlp0s20f3 [fe80::ef06:d09c:6b23:362a%2]:123
Jul 02 19:04:04 The-Eagle ntpd[356]: new interface(s) found: waking up resolver
Jul 02 19:09:06 The-Eagle ntpd[356]: no peer for too long, server running free nowand
systemd-timesyncd.serviceis disabled
Offline
[muj@The-Eagle ~]$ systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-timesyncd.service(8)
[muj@The-Eagle ~]$ Offline
from
timedatectlwill it say NTP service active for all network time protocol services? for ntpd and also for systemd-timesyncd.service?
Offline
If thats the case maybe I need to disable all time services and
sudo pacman Rns ntpthen reinstall ntp and enable ntpd
Offline
It does look like it is synchronized, but it shows that NTP service is inactive. I think that means something beside systemd is processing NTP, probably ntpd
You can leave it alone, and I think you are good. But, you are running in a more complex mode than you need.
If you don't need to provide ntp as a server, disable ntpd service and restart. See if timedatectl shows NTP as active.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
okay. I'm going to delete ntpd and remove the service then i'll do
timedatectl set-ntp trueand
hwclock --sytohcand then i'll post the output of
timedatectl statusagain.
Seriously thank you for your patience and help!
Offline
[muj@The-Eagle ~]$ timedatectl status
Local time: Thu 2020-07-02 19:49:25 BST
Universal time: Thu 2020-07-02 18:49:25 UTC
RTC time: Thu 2020-07-02 18:49:25
Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
[muj@The-Eagle ~]$ Offline
Looks like yours. So I take it thats correct and the only thing for time that needs to be done in an Arch install is
timedatectl set-ntp trueand
hwclock --systohc. Is that correct?
Offline
Yes.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
haha. I'm very happy, relieved and grateful. I hope I can help other people with Linux one day the way you have just helped me. I know the issue to you must seem very basic.
I'm hoping with time the wiki will become easier for me to comprehend.
truly appreciated, thank you very much.
Last edited by Straight-path (2020-07-02 18:58:08)
Offline
What had happened was that after I had finally installed Arch correctly, I did read the wiki about maintaining an Arch system but I also googled it and followed someones instructions online about ntpd. They didn't mention about disabling
systemd-timesyncd.service. I suppose that's an example of why following online tutorials isn't the best thing to do.
The first time I had installed Arch correctly was by copying someone on Youtube using systemd as a bootloader. I was so satisfied when I was able to install Arch using grub and working it out on my own from the wiki.
Offline
Pages: 1