You are not logged in.

#1 2014-07-23 12:04:57

zoof
Member
Registered: 2010-02-07
Posts: 33

[Solved] ntpd disabled but still running

Hi,

I have ntpd disabled and ntpdate enabled but for some reason ntpd still gets started:

$ systemctl status ntpd.service 
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled)
   Active: active (running) since Wed 2014-07-23 07:36:02 EDT; 25min ago
  Process: 441 ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid (code=exited, status=0/SUCCESS)
 Main PID: 442 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─442 /usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid
$ systemctl status ntpdate.service 
● ntpdate.service - One-Shot Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; enabled)
   Active: inactive (dead) since Wed 2014-07-23 07:36:02 EDT; 27min ago
  Process: 367 ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp (code=exited, status=0/SUCCESS)
 Main PID: 367 (code=exited, status=0/SUCCESS)

Any ideas?

Last edited by zoof (2014-07-30 18:59:07)

Offline

#2 2014-07-23 12:48:45

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] ntpd disabled but still running

If you didn't reboot, just disabling a service doesn't stop it.
Without rebooting, you need to 'systemctl stop ntpd.service'.

Offline

#3 2014-07-23 13:03:35

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

It's been configured this way since installation and I recently noticed that ntpd is always running anyway.

Offline

#4 2014-07-23 16:29:00

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] ntpd disabled but still running

Did you do 'timedatectl set-ntp 1'? I think it will try to use ntp if it is installed. Look inside '/etc/systemd/system/' and see what is getting actived and where.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2014-07-23 16:48:38

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

No, but I have now run 'timedatectl set-ntp 0' and ntpd is still running after a reboot.

There also does not seem to be anything ntp related in '/etc/systemd/system/':

$ grep -r ntp /etc/systemd/system
$

Offline

#6 2014-07-23 21:49:03

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] ntpd disabled but still running

What is the output of:
systemctl list-dependencies ntpd.service

Offline

#7 2014-07-23 22:24:26

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

It's pretty long but here it is:

$ systemctl list-dependencies ntpd.service
ntpd.service
● ├─-.mount
● ├─system.slice
● └─basic.target
●   ├─alsa-restore.service
●   ├─alsa-state.service
●   ├─paths.target
●   ├─slices.target
●   │ ├─-.slice
●   │ └─system.slice
●   ├─sockets.target
●   │ ├─cups.socket
●   │ ├─dbus.socket
●   │ ├─dm-event.socket
●   │ ├─rpcbind.socket
●   │ ├─systemd-initctl.socket
●   │ ├─systemd-journald-dev-log.socket
●   │ ├─systemd-journald.socket
●   │ ├─systemd-shutdownd.socket
●   │ ├─systemd-udevd-control.socket
●   │ └─systemd-udevd-kernel.socket
●   ├─sysinit.target
●   │ ├─dev-hugepages.mount
●   │ ├─dev-mqueue.mount
●   │ ├─keyboardctl.service
●   │ ├─kmod-static-nodes.service
●   │ ├─ldconfig.service
●   │ ├─lvm2-lvmetad.socket
●   │ ├─proc-sys-fs-binfmt_misc.automount
●   │ ├─sys-fs-fuse-connections.mount
●   │ ├─sys-kernel-config.mount
●   │ ├─sys-kernel-debug.mount
●   │ ├─systemd-ask-password-console.path
●   │ ├─systemd-binfmt.service
●   │ ├─systemd-journal-catalog-update.service
●   │ ├─systemd-journal-flush.service
●   │ ├─systemd-journald.service
●   │ ├─systemd-modules-load.service
●   │ ├─systemd-random-seed.service
●   │ ├─systemd-sysctl.service
●   │ ├─systemd-sysusers.service
●   │ ├─systemd-tmpfiles-setup-dev.service
●   │ ├─systemd-tmpfiles-setup.service
●   │ ├─systemd-udev-hwdb-update.service
●   │ ├─systemd-udev-trigger.service
●   │ ├─systemd-udevd.service
●   │ ├─systemd-update-done.service
●   │ ├─systemd-update-utmp.service
●   │ ├─systemd-vconsole-setup.service
●   │ ├─cryptsetup.target
●   │ ├─local-fs.target
●   │ │ ├─-.mount
●   │ │ ├─boot.mount
●   │ │ ├─home-tct-Music.mount
●   │ │ ├─home.mount
●   │ │ ├─systemd-fsck-root.service
●   │ │ ├─systemd-remount-fs.service
●   │ │ └─tmp.mount
●   │ └─swap.target
●   │   ├─dev-disk-by\x2did-ata\x2dHitachi_HDS721050CLA360_JP1512FR3HGS1K\x2dpart7.swap
●   │   ├─dev-disk-by\x2did-wwn\x2d0x5000cca39df14f6c\x2dpart7.swap
●   │   ├─dev-disk-by\x2duuid-71006559\x2d803a\x2d4eee\x2db8e1\x2da9006a9fb3ee.swap
●   │   ├─dev-disk-by\x2duuid-71006559\x2d803a\x2d4eee\x2db8e1\x2da9006a9fb3ee.swap
●   │   └─dev-sdb7.swap
●   └─timers.target
●     └─systemd-tmpfiles-clean.timer

Offline

#8 2014-07-23 23:03:50

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] ntpd disabled but still running

Try the same command with the --reverse option.

Offline

#9 2014-07-23 23:57:58

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

Nothing interesting...

$ systemctl --reverse list-dependencies ntpd.service
ntpd.service

Offline

#10 2014-07-24 04:59:29

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: [Solved] ntpd disabled but still running

Are you using NetworkManager with the ntpd dispatcher script installed?

As a last resort, if you really can't figure out what it is, you could mask the service...

Offline

#11 2014-07-24 08:58:52

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] ntpd disabled but still running

zoof wrote:

There also does not seem to be anything ntp related in '/etc/systemd/system/':

$ grep -r ntp /etc/systemd/system
$

This command doesn't show anything for me too, though there is a ntpd.service link there (grep -r doesn't follow links);
But

$ ls -R /etc/systemd/system|grep ntp
ntpd.service

It seems to me that ntpd.service is still enabled in some way for you...

Offline

#12 2014-07-24 18:07:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [Solved] ntpd disabled but still running

Let's see who opened it.  What is the output of systemctl status --no-pager


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

#13 2014-07-25 00:32:36

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

@berbae:

$ ls -R /etc/systemd/system|grep ntp
ntpdate.service

@ewaller:

$ systemctl status --no-pager
● degas
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Wed 2014-07-23 19:55:35 EDT; 24h ago
   CGroup: /
           ├─1 /sbin/init
           ├─system.slice
           │ ├─rtkit-daemon.service
           │ │ └─782 /usr/lib/rtkit/rtkit-daemon
           │ ├─ntpd.service
           │ │ └─718 /usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid
           │ ├─sshd.service
           │ │ └─606 /usr/bin/sshd -D
           │ ├─colord.service
           │ │ └─599 /usr/lib/colord/colord
           │ ├─polkit.service
           │ │ └─589 /usr/lib/polkit-1/polkitd --no-debug
           │ ├─slim.service
           │ │ └─458 /usr/bin/X -nolisten tcp vt07 -auth /var/run/slim.auth
           │ ├─dbus.service
           │ │ ├─344 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           │ │ └─837 /usr/lib/octopi/pacmanhelper
           │ ├─rpcbind.service
           │ │ └─353 /usr/bin/rpcbind -w
           │ ├─cups.service
           │ │ └─340 /usr/bin/cupsd -f
           │ ├─systemd-logind.service
           │ │ └─337 /usr/lib/systemd/systemd-logind
           │ ├─ModemManager.service
           │ │ └─335 /usr/bin/ModemManager
           │ ├─NetworkManager.service
           │ │ ├─334 /usr/bin/NetworkManager --no-daemon
           │ │ └─608 /usr/bin/dhclient -d -sf /usr/lib/networkmanager/nm-dhcp-client.action -pf /var/run/dhclient-...
           │ ├─dhcpcd.service
           │ │ └─350 /usr/bin/dhcpcd -q -b
           │ ├─cronie.service
           │ │ └─332 /usr/bin/crond -n
           │ ├─systemd-udevd.service
           │ │ └─157 /usr/lib/systemd/systemd-udevd
           │ ├─systemd-journald.service
           │ │ └─122 /usr/lib/systemd/systemd-journald
           │ └─system-getty.slice
           │   └─getty@tty1.service
           │     └─421 /sbin/agetty --noclear tty1 linux
           └─user.slice
             └─user-1000.slice
               ├─session-1.scope
               │ ├─ 427 /usr/bin/slim -nodaemon
               │ ├─ 687 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
               │ ├─ 698 dbus-launch --sh-syntax --exit-with-session
               │ ├─ 699 /usr/bin/dbus-daemon --fork --print-pid 6 --print-address 8 --session
               │ ├─ 728 compton -CGb
               │ ├─ 730 sh /home/tct/.config/openbox/autostart
               │ ├─ 731 sh /home/tct/.config/openbox/autostart
               │ ├─ 734 sh /home/tct/.config/openbox/autostart
               │ ├─ 741 octopi-notifier
               │ ├─ 742 nm-applet
               │ ├─ 743 /usr/lib/lxpolkit/lxpolkit
               │ ├─ 744 /usr/bin/python2 /usr/share/system-config-printer/applet.py
               │ ├─ 746 mono /usr/lib/sparkleshare/SparkleShare.exe
               │ ├─ 749 /usr/lib/at-spi2-core/at-spi-bus-launcher
               │ ├─ 754 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-addres...
               │ ├─ 756 thunar --daemon
               │ ├─ 757 pnmixer
               │ ├─ 760 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
               │ ├─ 761 tint2
               │ ├─ 763 /usr/lib/xfce4/xfconf/xfconfd
               │ ├─ 764 ssh-agent mono /usr/lib/sparkleshare/SparkleShare.exe
               │ ├─ 771 /usr/lib/gvfs/gvfsd
               │ ├─ 772 conky
               │ ├─ 781 /usr/bin/pulseaudio --start
               │ ├─ 793 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
               │ ├─ 807 /usr/lib/pulse/gconf-helper
               │ ├─ 809 /usr/lib/GConf/gconfd-2
               │ ├─ 818 /usr/lib/gvfs/gvfsd-metadata
               │ ├─ 824 /usr/bin/python2 /usr/sbin/terminator
               │ ├─ 870 gnome-pty-helper
               │ ├─ 876 /bin/bash
               │ ├─ 920 /usr/lib/chromium/chromium --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --...
               │ ├─ 922 /usr/lib/chromium/chromium --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --...
               │ ├─ 923 /usr/lib/chromium/chrome-sandbox /usr/lib/chromium/chromium --type=zygote --ppapi-flash-pa...
               │ ├─ 924 /usr/lib/chromium/chromium --type=zygote --ppapi-flash-path=/usr/lib/PepperFlash/libpepfla...
               │ ├─ 930 /usr/lib/chromium/chrome-sandbox /usr/lib/chromium/nacl_helper
               │ ├─ 931 /usr/lib/chromium/nacl_helper
               │ ├─ 933 /usr/lib/chromium/chromium --type=zygote --ppapi-flash-path=/usr/lib/PepperFlash/libpepfla...
               │ ├─ 955 /usr/lib/chromium/chromium --type=gpu-process --channel=920.0.102181819 --supports-dual-gp...
               │ ├─ 961 /usr/lib/chromium/chromium --type=gpu-broker
               │ ├─ 971 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ ├─ 981 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ ├─ 991 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ ├─ 995 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ ├─ 999 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ ├─1050 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtrials=Prerender/Prer...
               │ └─7778 systemctl status --no-pager
               └─user@1000.service
                 ├─680 /usr/lib/systemd/systemd --user
                 └─681 (sd-pam)

Offline

#14 2014-07-25 02:14:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [Solved] ntpd disabled but still running

Okay, it is being started as a service by systemd.  Please post the output of ls /etc/systemd/system/* -l

Last edited by ewaller (2014-07-25 02:15:14)


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

#15 2014-07-25 02:20:33

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

Here it is:

$ ls /etc/systemd/system/* -l
lrwxrwxrwx 1 root root   41 Feb 22 14:18 /etc/systemd/system/dbus-org.bluez.service -> /usr/lib/systemd/system/bluetooth.service
lrwxrwxrwx 1 root root   44 Feb 22 14:18 /etc/systemd/system/dbus-org.freedesktop.ModemManager1.service -> /usr/lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root   46 Feb 22 14:18 /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root   57 Feb 23 20:08 /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service -> /usr/lib/systemd/system/NetworkManager-dispatcher.service
lrwxrwxrwx 1 root root   36 Feb 22 14:21 /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/slim.service
lrwxrwxrwx 1 root root   41 Feb 22 14:18 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/syslog-ng.service
lrwxrwxrwx 1 root root    9 Apr  9 09:45 /etc/systemd/system/tmp.mount -> /dev/null

/etc/systemd/system/bluetooth.target.wants:
total 0
lrwxrwxrwx 1 root root 41 Feb 22 14:18 bluetooth.service -> /usr/lib/systemd/system/bluetooth.service

/etc/systemd/system/getty.target.wants:
total 0
lrwxrwxrwx 1 root root 38 Feb 22 14:16 getty@tty1.service -> /usr/lib/systemd/system/getty@.service

/etc/systemd/system/multi-user.target.wants:
total 0
lrwxrwxrwx 1 root root 38 Feb 22 14:18 cronie.service -> /usr/lib/systemd/system/cronie.service
lrwxrwxrwx 1 root root 33 Feb 24 11:09 cups.path -> /usr/lib/systemd/system/cups.path
lrwxrwxrwx 1 root root 38 Feb 28 09:26 dhcpcd.service -> /usr/lib/systemd/system/dhcpcd.service
lrwxrwxrwx 1 root root 44 Feb 22 14:18 ModemManager.service -> /usr/lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 46 Feb 22 14:18 NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 39 Mar 10 13:44 ntpdate.service -> /usr/lib/systemd/system/ntpdate.service
lrwxrwxrwx 1 root root 51 Jul  8 09:12 remote-fs.target -> ../../../../usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 36 Feb 24 07:12 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx 1 root root 41 Feb 22 14:18 syslog-ng.service -> /usr/lib/systemd/system/syslog-ng.service

/etc/systemd/system/printer.target.wants:
total 0
lrwxrwxrwx 1 root root 36 Feb 24 11:09 cups.service -> /usr/lib/systemd/system/cups.service

/etc/systemd/system/sockets.target.wants:
total 0
lrwxrwxrwx 1 root root 35 Feb 24 11:09 cups.socket -> /usr/lib/systemd/system/cups.socket

/etc/systemd/system/sysinit.target.wants:
total 0
lrwxrwxrwx 1 root root 43 Feb 22 14:18 keyboardctl.service -> /usr/lib/systemd/system/keyboardctl.service

Last edited by zoof (2014-07-25 20:18:15)

Offline

#16 2014-07-30 18:44:20

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

I think I finally found the answer -- /etc/NetworkManager/dispatcher.d/10-ntpd starts ntp.  I assume it is safe to "chmod -x /etc/NetworkManager/dispatcher.d/10-ntpd"?

Offline

#17 2014-07-30 19:36:23

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [Solved] ntpd disabled but still running

zoof wrote:

I think I finally found the answer -- /etc/NetworkManager/dispatcher.d/10-ntpd starts ntp.  I assume it is safe to "chmod -x /etc/NetworkManager/dispatcher.d/10-ntpd"?

That should work, but if you don't want to use ntpd, why not just uninstall the script? You can use

pacman -Qo /etc/NetworkManager/dispatcher.d/10-ntpd

to see what package installed that script (looks like probably networkmanager-dispatcher-openntpd), and assuming it's not providing anything else, just uninstall that package.

Offline

#18 2014-07-30 19:40:41

zoof
Member
Registered: 2010-02-07
Posts: 33

Re: [Solved] ntpd disabled but still running

eewallace wrote:

That should work, but if you don't want to use ntpd, why not just uninstall the script? You can use

pacman -Qo /etc/NetworkManager/dispatcher.d/10-ntpd

to see what package installed that script (looks like probably networkmanager-dispatcher-openntpd), and assuming it's not providing anything else, just uninstall that package.

Ah -- I had assumed that it came bundled with networkmanager.  Uninstalling networkmanager-dispatcher-ntpd did the trick.  Many thanks!

Offline

Board footer

Powered by FluxBB