<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eddie On Everything &#187; mlocat</title>
	<atom:link href="http://www.eddieoneverything.com/tag/mlocat/feed" rel="self" type="application/rss+xml" />
	<link>http://www.eddieoneverything.com</link>
	<description>Tips &#38; tricks on things that interest me</description>
	<lastBuildDate>Wed, 11 Jan 2012 08:29:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux Question: When does updatedb.mlocat / cron.daily run?</title>
		<link>http://www.eddieoneverything.com/linux/linux-question-when-does-updatedbmlocat-crondaily-run.php</link>
		<comments>http://www.eddieoneverything.com/linux/linux-question-when-does-updatedbmlocat-crondaily-run.php#comments</comments>
		<pubDate>Wed, 08 Apr 2009 14:39:37 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[locate]]></category>
		<category><![CDATA[mlocat]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[updatedb]]></category>
		<category><![CDATA[updatedb.mlocat]]></category>

		<guid isPermaLink="false">http://www.eddieoneverything.com/linux/linux-question-when-does-updatedbmlocat-crondaily-run.php</guid>
		<description><![CDATA[Uggh.  My Ubuntu server&#8217;s updatedb.mlocate process is loud as heck and runs *forever*.  
I haven&#8217;t noticed a performance decrease, as the job is set to run at a fairly low priority.  But since I sit near the server, it&#8217;s annoying to listen to the hard drive churn for hours and hours.  [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#468banner--><br />
Uggh.  My Ubuntu server&#8217;s updatedb.mlocate process is loud as heck and runs *forever*.  </p>
<p>I haven&#8217;t noticed a performance decrease, as the job is set to run at a fairly low priority.  But since I sit near the server, it&#8217;s annoying to listen to the hard drive churn for hours and hours.  All I wanted to do was re-schedule the job to run when I&#8217;m not around.  I figured that the job was being kicked off by root&#8217;s cron file, but I figured wrong.  </p>
<p>After some investigation, I learned the following:</p>
<ul>
<li>The job parameters are listed in /etc/cron.daily/mlocate.</li>
<blockquote><p>#! /bin/sh</p>
<p>set -e</p>
<p>[ -x /usr/bin/updatedb.mlocate ] || exit 0</p>
<p># See ionice(1)<br />
if [ -x /usr/bin/ionice ]; then<br />
    IONICE=&#8221;/usr/bin/ionice -c3&#8243;<br />
fi</p>
<p>$IONICE /usr/bin/updatedb.mlocate
</p></blockquote>
<li>The files in /etc/cron.daily are kicked off by /etc/crontab, not by root&#8217;s crontab.  For some reason, Ubuntu&#8217;s default install runs this process around 6am.  Changing this file allowed me to make the job run at 3am.  </li>
<blockquote><p># /etc/crontab: system-wide crontab<br />
# Unlike any other crontab you don&#8217;t have to run the `crontab&#8217;<br />
# command to install the new version when you edit this file<br />
# and files in /etc/cron.d. These files also have username fields,<br />
# that none of the other crontabs do.</p>
<p>SHELL=/bin/sh<br />
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin</p>
<p># m h dom mon dow user  command<br />
17 *  * * * root    cd / &#038;&#038; run-parts &#8211;report /etc/cron.hourly<br />
25 3  * * * root  test -x /usr/sbin/anacron || ( cd / &#038;&#038; run-parts &#8211;report /etc/cron.daily )<br />
47 3  * * 7 root  test -x /usr/sbin/anacron || ( cd / &#038;&#038; run-parts &#8211;report /etc/cron.weekly )<br />
52 3  1 * * root  test -x /usr/sbin/anacron || ( cd / &#038;&#038; run-parts &#8211;report /etc/cron.monthly )<br />
#</p></blockquote>
<li>updatedb can be configured to ignore certain paths &#8211; since my machine has a number of drives used for backups, I wanted to exclude those from the updatedb job.  I accomplished this by editing /etc/updatedb.conf and adding to the PRUNEPATHS listing.  Adding paths to the PRUNEPATHS option instructs updatedb to exclude those paths from indexing.</li>
<blockquote><p>
PRUNE_BIND_MOUNTS=&#8221;yes&#8221;<br />
PRUNEPATHS=&#8221;/tmp /var/spool /media /mnt/backup&#8221;<br />
PRUNEFS=&#8221;NFS nfs nfs4 afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf rpc_pipefs&#8221;</p></blockquote>
</ul>
<p><!--adsense#largerectanglenowrap--></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.eddieoneverything.com/articles/linux-forward-file-not-working-make-sure-you-have-the-permissions-set-correctly.php" title="Linux .forward file not working?  Make sure you have the permissions set correctly">Linux .forward file not working?  Make sure you have the permissions set correctly</a></li><li><a href="http://www.eddieoneverything.com/linux/caution-filename-not-matched-error-when-unzipping-multiple-files-workaround.php" title="Caution: filename not matched error when unzipping multiple files workaround">Caution: filename not matched error when unzipping multiple files workaround</a></li><li><a href="http://www.eddieoneverything.com/articles/how-to-scan-a-computer-for-open-ports.php" title="How to Scan a Computer for Open Ports">How to Scan a Computer for Open Ports</a></li><li><a href="http://www.eddieoneverything.com/articles/the-zen-of-taco-bell-programming-using-unix-tools-to-prevent-reinventing-the-wheel.php" title="The Zen of Taco Bell Programming &#8211; Using Unix Tools to Prevent Reinventing the Wheel">The Zen of Taco Bell Programming &#8211; Using Unix Tools to Prevent Reinventing the Wheel</a></li><li><a href="http://www.eddieoneverything.com/linux/how-to-keep-an-ssh-connection-alive-in-linux.php" title="How To Keep An SSH Connection Alive in Linux">How To Keep An SSH Connection Alive in Linux</a></li><li><a href="http://www.eddieoneverything.com/linux/rotating-backup-directories-using-cp-al-hardlinks-to-save-disk-space.php" title="Rotating Backup Directories using cp -al (hardlinks) to Save Disk Space">Rotating Backup Directories using cp -al (hardlinks) to Save Disk Space</a></li><li><a href="http://www.eddieoneverything.com/linux/argument-list-too-long-from-rm-command-a-perl-script-to-get-around-the-problem.php" title="&#8220;Argument list too long&#8221; from rm command.   A Perl Script to Get Around the Problem">&#8220;Argument list too long&#8221; from rm command.   A Perl Script to Get Around the Problem</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.eddieoneverything.com/linux/linux-question-when-does-updatedbmlocat-crondaily-run.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

