A find process taking up CPU (su nobody -s /bin/sh -c /usr/bin/find /)
Hi all,
There is a find process running and taking up CPU and user is not happy with this. Code:
# ps -ef|grep nobody Code:
Jun 14 09:30:14 lnxtest su: (to nobody) root on none I killed this process several times but it appears after sometime again. Not sure what is causing this process to run. Please help to understand what is this process and what is triggering this process to start. How can i disable/kill permanently this process (not sure if this should be OK) Please help! thanks in advance! |
This is part of scheduled updates to support 'locate' on your machine
See http://www.linuxquestions.org/questi...rmance-920990/ |
I believe it is updatedb. If you check the process tree:
nobody 12267 12266... (the find) root 12266 12258... (the "su nobody...") root 12258 12238... (the updatedb) This is used to speed up searches using the "locate" utility. Doing this allows locate to bypass the filesystem search (which is slow), but the database it uses needs to be updated periodically. The reason it runs as the user "nobody" is to eliminate any files that may be inaccessable to a user normally. That means that even if the file itself is rwxrwxrwx, that if the directory containing that file is rwx------, then only the user can access it through the directory tree - and running the find as "nobody" will block it from being added to the index file. Normally (at least on servers that want this service) updatedb runs sometime in the middle of the night. You might check your cron jobs and see if it is being run either too frequently or at a bad time. |
thanks to both thedaver and jpollard,
jpollard - how to find the cron job that this is running from? I do not seem to find anything from crontab -l How to find it and how to fix it (to disable/change it to run less frequently/ change time of running etc)? Thanks! |
Look in /etc/crontab/... you'll see some folders that would be daily or hourly
Most modern distros setup their cron to run everything in these folders at the appropriate interval, so that the crontab itself doesn't have to be touched so often. There is a likely a script in hourly.d or daily.d that is named like 'locate' or 'updatedb' and should contain commands that look like what you're seeing. you could move, remark out, chmod -x or otherwise delete such a script to prevent it's continued churn on your machine |
Depends on the installation.
In most, I would expect it to be in roots crontab entry. In a RH/Fedora system it is in the /etc/cron.daily in the file "mlocate.cron". |
This is what i have in /etc/
Code:
# ls -ltrh /etc/ |grep cron If so can i just move it from here? Code:
# cd /etc/cron.daily/ |
That should do it.
|
All times are GMT -5. The time now is 07:58 AM. |