胆怯地运行并占用我的 CPU 的一个核心

胆怯地运行并占用我的 CPU 的一个核心

现在,当我从睡眠状态启动计算机时,胆怯已经两次(间隔一段时间,我想是几周)不知从何而来。它占用了我的一个核心的所有处理能力,并且已经运行了大约 5 到 10 分钟,我想知道为什么这个进程会启动。

运行将pstree进程显示为 的直接后代,systemd所以我猜systemd是负责启动的timidity,但我不知道如何查找启动的配置timidity

如果我运行strace该进程,我会得到以下信息:

ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0
poll([{fd=6, events=POLLIN}], 1, 0)     = 0 (Timeout)
ioctl(6, SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS, 0x16c83e0) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x7fff43107780) = 0
ioctl(4, SNDRV_PCM_IOCTL_HWSYNC, 0x3cd407d5) = 0

该进程打开的文件是:

/dev/null
/dev/snd/timer
/dev/snd/pcmC0D0p
/dev/snd/controlC0
/dev/snd/seq

运行的命令行是:

/usr/bin/timidity-Os-iAD

最后 3 条信息取自/proc/$PID/.

所以我问,我怎样才能找出为什么timidity正在运行(我稍后会解决为什么它占用了所有一个核心的问题)。

答案1

 cat /run/systemd/generator.late/timidity.service
# Automatically generated by systemd-sysv-generator

[Unit]
SourcePath=/etc/init.d/timidity
Description=LSB: start and stop timidity
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=remote-fs.target
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=1
ExecStart=/etc/init.d/timidity start
ExecStop=/etc/init.d/timidity stop

systemd-unit 是由 systemd 动态生成的。为了防止启动,您可以使用或删除我希望的chkconfig链接/etc/rc2.d/S01timiditychkconfig --del timidity

相关内容