Which service provides time-sync.target in systemd?
up vote
3
down vote
favorite
How can I recognize which service provides time-sync.target in systemd? Is it configurable or is it hardcoded in systemd? How can I configure my custom time-sync daemon/service to provide this target?
systemd date
New contributor
add a comment |
up vote
3
down vote
favorite
How can I recognize which service provides time-sync.target in systemd? Is it configurable or is it hardcoded in systemd? How can I configure my custom time-sync daemon/service to provide this target?
systemd date
New contributor
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
How can I recognize which service provides time-sync.target in systemd? Is it configurable or is it hardcoded in systemd? How can I configure my custom time-sync daemon/service to provide this target?
systemd date
New contributor
How can I recognize which service provides time-sync.target in systemd? Is it configurable or is it hardcoded in systemd? How can I configure my custom time-sync daemon/service to provide this target?
systemd date
systemd date
New contributor
New contributor
edited yesterday
Jeff Schaller
37.2k1052121
37.2k1052121
New contributor
asked yesterday
Filip Havlíček
182
182
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
Run
systemctl show time-sync.target
to see the information and configuration maintained by systemd for this target. In particular, this will tell you that it is part of the special systemd units and documented there:
Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type
After=
for this target unit to all SysV init script service units with an LSB header referring to the "$time
" facility.
It is fully configurable (use systemctl edit
to override any aspect you want to). As mentioned above, services which provide time synchronisation (e.g. systemd-timesyncd.service
) declare that they want this target, and order themselves before it; services which need time synchronisation order themselves after it.
To configure a time synchronisation service, copy the relevant parts of systemd-timesync
’s configuration:
[Unit]
Before=time-sync.target
Wants=time-sync.target
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
Run
systemctl show time-sync.target
to see the information and configuration maintained by systemd for this target. In particular, this will tell you that it is part of the special systemd units and documented there:
Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type
After=
for this target unit to all SysV init script service units with an LSB header referring to the "$time
" facility.
It is fully configurable (use systemctl edit
to override any aspect you want to). As mentioned above, services which provide time synchronisation (e.g. systemd-timesyncd.service
) declare that they want this target, and order themselves before it; services which need time synchronisation order themselves after it.
To configure a time synchronisation service, copy the relevant parts of systemd-timesync
’s configuration:
[Unit]
Before=time-sync.target
Wants=time-sync.target
add a comment |
up vote
4
down vote
accepted
Run
systemctl show time-sync.target
to see the information and configuration maintained by systemd for this target. In particular, this will tell you that it is part of the special systemd units and documented there:
Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type
After=
for this target unit to all SysV init script service units with an LSB header referring to the "$time
" facility.
It is fully configurable (use systemctl edit
to override any aspect you want to). As mentioned above, services which provide time synchronisation (e.g. systemd-timesyncd.service
) declare that they want this target, and order themselves before it; services which need time synchronisation order themselves after it.
To configure a time synchronisation service, copy the relevant parts of systemd-timesync
’s configuration:
[Unit]
Before=time-sync.target
Wants=time-sync.target
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
Run
systemctl show time-sync.target
to see the information and configuration maintained by systemd for this target. In particular, this will tell you that it is part of the special systemd units and documented there:
Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type
After=
for this target unit to all SysV init script service units with an LSB header referring to the "$time
" facility.
It is fully configurable (use systemctl edit
to override any aspect you want to). As mentioned above, services which provide time synchronisation (e.g. systemd-timesyncd.service
) declare that they want this target, and order themselves before it; services which need time synchronisation order themselves after it.
To configure a time synchronisation service, copy the relevant parts of systemd-timesync
’s configuration:
[Unit]
Before=time-sync.target
Wants=time-sync.target
Run
systemctl show time-sync.target
to see the information and configuration maintained by systemd for this target. In particular, this will tell you that it is part of the special systemd units and documented there:
Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type
After=
for this target unit to all SysV init script service units with an LSB header referring to the "$time
" facility.
It is fully configurable (use systemctl edit
to override any aspect you want to). As mentioned above, services which provide time synchronisation (e.g. systemd-timesyncd.service
) declare that they want this target, and order themselves before it; services which need time synchronisation order themselves after it.
To configure a time synchronisation service, copy the relevant parts of systemd-timesync
’s configuration:
[Unit]
Before=time-sync.target
Wants=time-sync.target
answered yesterday
Stephen Kitt
160k24357432
160k24357432
add a comment |
add a comment |
Filip Havlíček is a new contributor. Be nice, and check out our Code of Conduct.
Filip Havlíček is a new contributor. Be nice, and check out our Code of Conduct.
Filip Havlíček is a new contributor. Be nice, and check out our Code of Conduct.
Filip Havlíček is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486146%2fwhich-service-provides-time-sync-target-in-systemd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown