10
$ 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                          
...

This job always start automatically and consumes my memory. Even after I kill it, it will starts several hours later.

What's that job?

EDIT

Note: the pid is different from the above because I killed the above one, wait for several hours, then the second one comes.

$ 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)

This is what it look like in a graphical tool:

enter image description here

2
  • 1
    Use pstree -ps with the PID of that job to see what started it.
    – muru
    Aug 23, 2014 at 9:42
  • I updated the answer a bit, see if it's more useful now.
    – muru
    Aug 24, 2014 at 3:18

1 Answer 1

7

As you can see from the process tree, this command is run by updatedb, which updates the database for the locate command. The locate command stores this data so that it can give results near instantaneously compared to other means such as find itself. The relevant cron job is /etc/cron.daily/locate, as can be seen from the GUI tool. It seems you're using locate instead of mlocate. mlocate is supposed to do a better job of being resource-efficient. So try installing mlocate first:

sudo apt-get install mlocate

See also: Can I disable updatedb.mlocate?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .