Ntpd update running 100% on Pi3


Raspberry Pi 3

running 146 ntpd update is running for hours at 100%

see screenshot

any help would be appreciated


Hi Garry,

Thanks for the report, I believe there may be an issue with your configuration, I’d like to check your system and settings, please could you send us a bug report:

In the mean time, you can terminate those processes, at any time, with:

killall -w grep

_Note to self:

  • locale en.GB?
  • dietpi.txt var for ntpd_update_mode= exist?_


code 145a6736-1570-4b55-a4c5-09896c6499b7-0

many thanks, Garry

Hi Garry,


Everything appears to be in order, also ran a test of your dietpi configuration on a system here, unable to replicate the 100% grep process.

I think the cron.daily may be the issue here, lets update those scripts, please run the following commands:

		cp /DietPi/dietpi/conf/cron.daily_dietpi /etc/cron.daily/dietpi
		chmod +x /etc/cron.daily/dietpi
		cp /DietPi/dietpi/conf/cron.hourly_dietpi /etc/cron.hourly/dietpi
		chmod +x /etc/cron.hourly/dietpi

Please give the system a reboot, then run the following command. Give it a few seconds, check htop and let us know if the 100% cpu returns:


For reference, you should see an entry as below (when NTPD is updating time):


just did what you requested:

Processes are normal and there is a correct entry in /var/log/ntpd.log

Thank you! Any idea what went wrong?

Kind regards,


Excellent Gary,

Not 100%, but I believe the cron.daily file on your system may of been incorrect. We did patch this file a while back during update, it may not of successfully completed for an unknown reason.

Either way, keep an eye on it over the next few days, just encase it reoccurs, in which case we’ll need to look at system stability and installed software as possible triggers.


unfortunately the problem has returned!

Any ideas, I really don’t want to have to uninstall DietPi because of this!

Regards, Garry

Hi Garry,

Something is throwing this out, could be related to installed software, although, not sure what that is yet.

To your knowledge, have you made any manual adjustments to the system, outside of all DietPi programs?

  • manually installing software through apt, if so, which?
  • Modifying crontab
  • Manually editing any config files on system?


  • Which PSU used?
  • Which SD used?


I have only installed Mariadb by hand, I installed node red using dietpi-software, I have an official Pi3 PSU and am running off a USB stick from Sandisk.

Regards, Garry


I just tried:

ntpq -pn
ntpq: read: Connection refused

Any help?




I rebooted yesterday and it’s been running fine since!!!


Spoke too soon, problem has returned!!! After killing grep this is what htop says (See attachment)



any news on this?


Hi Garry,

Not sure yet, I’ve checked the source code and the only thing that would cause a hang is:

cat /DietPi/dietpi.txt | grep -m1 '^ntpd_update_mode=' | sed 's/.*=//'
df -P | awk '{print $6}' | tail -n +2
grep -ci -m1 'dietpi_check_for_updates=1' /DietPi/dietpi.txt
sed -n 5p /DietPi/dietpi/.dietpi-sync_settings

All the other commands are launched as threads, leaving the script to continue and exit.

When the 100% CPU occurs, can you try running those commands locally, see if they also hang?

Also, lets check the contents of /etc/cron.daily/dietpi, just to make sure

cat /etc/cron.daily/dietpi

Edit: Hunch it might be df -P if expected drive not attached at that time and systemd-automount is used, will hang command. We can check this. I’ll need to see your /etc/fstab

cat /etc/fstab

Either way, i’ll remove that code from v148, no longer used.

Hi Daniel,

This morning, see attachments
I’ll try the commands manually later. Fstab is also attached.


sed -n 5p /DietPi/dietpi/.dietpi-sync_settings

Thanks Garry,

Pretty sure this is the failing command, did running this cause the 100% in the attached image?:

grep -ci -m1 'dietpi_check_for_updates=1' /DietPi/dietpi.txt

Lets clean up your /etc/fstab /mnt/usb_x entries, they wont be helping system. Before we do that, I’ll need to see the following:



running the command manually works!!!
No hang.

root@Pi3:~# blkid
/dev/mmcblk0p1: SEC_TYPE=“msdos” LABEL=“boot” UUID=“1623-A8B8” TYPE=“vfat” PARTUUID=“ee614650-01”
/dev/mmcblk0p2: UUID=“c352383b-22f5-437e-a30a-74198bd98a55” TYPE=“ext4” PARTUUID=“ee614650-02”
/dev/sda1: UUID=“ea8fe470-f3e6-4a1f-a79c-9559f5297169” TYPE=“ext4” PARTLABEL=“primary” PARTUUID=“d71d3a0e-d82e-49e4-8d9f-2e0e8870c0c0”
/dev/mmcblk0: PTUUID=“ee614650” PTTYPE=“dos”

oot@Pi3:~# mount
/dev/sda1 on / type ext4 (rw,noatime,discard,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=437048k,nr_inodes=109262,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/usb_1 type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/c352383b-22f5-437e-a30a-74198bd98a55 type autofs (rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /DietPi type tmpfs (rw,nosuid,nodev,noatime,size=10240k)
tmpfs on /var/log type tmpfs (rw,nosuid,nodev,noatime,size=20480k)
/dev/mmcblk0p2 on /mnt/c352383b-22f5-437e-a30a-74198bd98a55 type ext4 (rw,noatime,data=ordered)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro,discard)
/dev/sda1 on /mnt/usb_1 type ext4 (rw,noatime,discard,data=ordered)

Hi Daniel,

just now:
Screenshot 2017-03-31 at 11.29.10 AM.png
CPU is running at 75 degrees!

:cry: Garry

Hi Garry,

Could indicate an issue with hardware (PSU/SD), or, other software causing system instability.

I have an official Pi3 PSU and am running off a USB stick from Sandisk.

Is RootFS transferred to USB disk? Or, running off SD card? Which brand SD card?

/dev/sda1: UUID=“ea8fe470-f3e6-4a1f-a79c-9559f5297169” TYPE=“ext4” PARTLABEL=“primary” PARTUUID=“d71d3a0e-d82e-49e4-8d9f-2e0e8870c0c0”

Ok, you can disable all /dev/sdX entries in /etc/fstab with a #, excluding /dev/sda1 (as its currently being used)