Recentemente, observei meu uso da CPU e descobri que lib/systemd/systemd-resolved
usa de 80 a 100% da CPU, mesmo no horário de início. Verifiquei os registros do meu sistema e tentei determinar o problema, mas parece que posso identificar o problema ou simplesmente não sei o que estou procurando.
Aqui está o htop
info:
E aqui está o syslog
info:
Aug 4 07:54:39 baal-Aspire-5733Z zeitgeist-fts[2590]: Unable to get info on application://nautilus-autostart.desktop
Aug 4 07:55:16 baal-Aspire-5733Z anacron[27993]: Job 'cron.daily' terminated
Aug 4 07:56:15 baal-Aspire-5733Z /usr/lib/snapd/snapd[956]: snapmgr.go:496: DEBUG: Next refresh scheduled for 2017-08-04 12:01:22.315368117 -0500 CDT.
Aug 4 07:57:29 baal-Aspire-5733Z systemd-timesyncd[810]: Synchronized to time server [2001:67c:1560:8003::c8]:123 (ntp.ubuntu.com).
Aug 4 07:59:07 baal-Aspire-5733Z anacron[27993]: Job 'cron.weekly' started
Aug 4 07:59:07 baal-Aspire-5733Z anacron[29231]: Updated timestamp for job 'cron.weekly' to 2017-08-04
Aug 4 07:59:21 baal-Aspire-5733Z anacron[27993]: Job 'cron.weekly' terminated
Aug 4 07:59:21 baal-Aspire-5733Z anacron[27993]: Normal exit (2 jobs run)
Aug 4 07:59:22 baal-Aspire-5733Z systemd[1707]: Starting Notification regarding a new release of Ubuntu...
Aug 4 07:59:45 baal-Aspire-5733Z check-new-release-gtk[29246]: /usr/lib/ubuntu-release-upgrader/check-new-release-gtk:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
Aug 4 07:59:45 baal-Aspire-5733Z check-new-release-gtk[29246]: from gi.repository import Gtk
Aug 4 07:59:45 baal-Aspire-5733Z check-new-release-gtk[29246]: WARNING:root:timeout reached, exiting
Aug 4 07:59:45 baal-Aspire-5733Z systemd[1707]: Started Notification regarding a new release of Ubuntu.
Aug 4 08:00:53 baal-Aspire-5733Z AptDaemon: INFO: Quitting due to inactivity
Aug 4 08:00:53 baal-Aspire-5733Z org.debian.apt[953]: 08:00:53 AptDaemon [INFO]: Quitting due to inactivity
Aug 4 08:00:53 baal-Aspire-5733Z org.debian.apt[953]: 08:00:53 AptDaemon [INFO]: Quitting was requested
Aug 4 08:00:53 baal-Aspire-5733Z AptDaemon: INFO: Quitting was requested
Aug 4 08:02:50 baal-Aspire-5733Z dnsmasq[1157]: Maximum number of concurrent DNS queries reached (max: 150)
Aug 4 08:02:56 baal-Aspire-5733Z dnsmasq[1157]: Maximum number of concurrent DNS queries reached (max: 150)
Aug 4 08:03:02 baal-Aspire-5733Z dnsmasq[1157]: Maximum number of concurrent DNS queries reached (max: 150)
Aug 4 08:04:38 baal-Aspire-5733Z dnsmasq[1157]: message repeated 16 times: [ Maximum number of concurrent DNS queries reached (max: 150)]
Aug 4 08:04:42 baal-Aspire-5733Z wpa_supplicant[1238]: wlp2s0: WPA: Group rekeying completed with b0:da:f9:ac:e0:e2 [GTK=TKIP]
Aug 4 08:04:44 baal-Aspire-5733Z dnsmasq[1157]: Maximum number of concurrent DNS queries reached (max: 150)
O que me preocupa sobre o syslog
é o max DNS queries
, não acho que isso possa causar problemas na CPU, mas eu estava errado antes.
Eu executei um strace
no processo por cerca de vinte segundos e obtive alguns resultados:
0.000000 getrandom("|", 2, GRND_NONBLOCK) = 2
0.000122 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=303, ...}) = 0
0.000098 getrandom("04", 2, GRND_NONBLOCK) = 2
0.000052 clock_gettime(CLOCK_BOOTTIME, {758, 539479248}) = 0
0.000056 open("/run/systemd/netif/links/4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
0.000061 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=303, ...}) = 0
0.000045 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=303, ...}) = 0
0.000035 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 20
0.000032 connect(20, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
0.000039 epoll_ctl(4, EPOLL_CTL_ADD, 20, {EPOLLIN, {u32=2166115856, u64=94835044011536}}) = 0
0.000035 write(20, "04%pre%%pre%%pre%%pre%%pre%%pre%%pre%\taskubuntucom%pre%%pre%%pre%%pre%"..., 64) = 64
0.000091 clock_gettime(CLOCK_BOOTTIME, {758, 539866856}) = 0
0.000039 epoll_ctl(4, EPOLL_CTL_DEL, 20, NULL) = 0
0.000027 close(20) = 0
0.000042 sendmsg(12, {msg_name(16)={sa_family=AF_INET, sin_port=htons(57020), sin_addr=inet_addr("127.0.0.1")}, msg_iov(1)=[{"q10%pre%%pre%%pre%%pre%%pre%%pre%\taskubuntucom%pre%%pre%%pre%%pre%"..., 42}], msg_controllen=28, [{cmsg_len=28, cmsg_level=SOL_IP, cmsg_type=IP_PKTINFO, {ipi_ifindex=if_nametoindex("lo"), ipi_spec_dst=inet_addr("127.0.0.53"), ipi_addr=inet_addr("127.0.0.53")}}], msg_flags=0}, 0) = 42
0.000452 epoll_wait(4, [{EPOLLIN, {u32=2165783712, u64=94835043679392}}], 29, -1) = 1
0.000035 clock_gettime(CLOCK_BOOTTIME, {758, 540460822}) = 0
0.000029 recvfrom(12, NULL, 0, MSG_PEEK|MSG_TRUNC, NULL, NULL) = 64
0.000030 recvmsg(12, {msg_name(16)={sa_family=AF_INET, sin_port=htons(7890),
...
Mas tudo parece normal aqui. Alguém tem alguma idéia do que pode estar causando isso?