I have four VMs that are all having CPU usage spikes every 10 minutes. These spikes coincide perfectly with DNS lookups for hostnames including
security.ubunutu.com (per tcpdump), so I assume apt is checking for updates. It's configured to check for updates daily. I can't figure out what's causing this 10-minute interval.
I've looked in
/var/log/apt and journalctl and can't find anything corresponding to a 10-minute interval.
These VMs are stock Google Cloud Ubuntu 19.10 images with very few changes (MongoDB installed [which added repo.mongodb.org as an apt source], logging and monitoring agents installed, THP disabled).
What should I do/where should I look to troubleshoot this?
ls -l /var/lib/apt/periodic. That will tell you the last time unattended-upgrades ran. Next, try
systemctl list-timers apt-daily.timer apt-daily-upgrade.timerfor the next time apt will update/upgrade automatically.
/var/lib/apt/periodic/update-success-stamp's timestamp coincides with the 10-min interval.
unattended-upgrades-stampand all others are much older. Those two systemd timers have intervals of 6h and 24h. None of the other systemd timers have short intervals either. -- So the question remains, why is apt updating ever 10 mins...
/var/log/apt/history.logfrom yesterday for
Commandline: /usr/bin/apt-get remove -y unattended-upgrades.