$ ps -elf | grep
...
0 D nobody 27320 27319 2 90 10 - 353471 sleep_ 07:54 ? 00:02:19 /usr/bin/find / -ignore_readdir_race ( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o -type d -regex \(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\) ) -prune -o -print0
...
Run Code Online (Sandbox Code Playgroud)
这项工作总是自动启动并消耗我的记忆。即使在我kill之后,它也会在几个小时后开始。
那是什么工作?
编辑
注意:pid 和上面的不一样,因为我杀了上面的一个,等几个小时,然后第二个来了。
$ pstree -psl
|-anacron(25920)---sh(25929)---run-parts(25930)---locate(26343)---updatedb.findut(26348)-+-frcode(26358)
| |-sort(26357)
| `-updatedb.findut(26356)---su(26387)---sh(26402)---find(26403)
Run Code Online (Sandbox Code Playgroud)
这是它在图形工具中的样子:

从进程树中可以看出,此命令由 运行updatedb,它更新locate命令的数据库。locate 命令存储这些数据,以便与其他方法(例如它find自己)相比,它可以几乎立即给出结果。/etc/cron.daily/locate从 GUI 工具中可以看出,相关的 cron 作业是。看来您正在使用locate而不是mlocate. mlocate应该在资源效率方面做得更好。所以先尝试安装mlocate:
sudo apt-get install mlocate
Run Code Online (Sandbox Code Playgroud)
另请参阅:我可以禁用 updatedb.mlocate 吗?