LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2004, 05:18 PM   #1
beetlenaut
LQ Newbie
 
Registered: Dec 2003
Location: Washinton state, USA
Distribution: Mandriva 2005 LE...moving to SuSE 9.3
Posts: 23

Rep: Reputation: 15
updating locate database only when disk activity low


Updating the slocate database slows the computer a lot (stupid IDE bus), so I'm looking for a way to do it only when the cpu load AND disk activity are low--basically, when I'm not trying to do anything else.

Cron really doesn't help because I use my computer at all kinds of weird times. I can't have it run at any set time without it getting in my way sometimes.

There must be some tool I don't know about, but I can't seem to come up with the right search terms. Thanks!
 
Old 11-23-2004, 06:26 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i'm not aware of a nicer way to do this, it may well exist, but google doesn't say so...

i'd say you could set a cron job to update every so often using a command like
Code:
if [ `uptime | cut -c 60,62-63` -le 10 ]; then nice -19 updatedb; fi
so if the load average on the last 5 minutes is less than 0.10 then run updatedb, with a nice value. you might also want to do an age check on thelocatedb file too. no need to update if it's less that 24 ours old etc...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure updatedb to update locate database manually septanla Linux - General 4 12-22-2010 02:05 PM
updating locate db linuxmandrake Linux - General 1 10-26-2005 06:09 PM
my locate command says database is more than 8days old Niceman2005 Linux - Newbie 7 01-04-2005 04:55 PM
Constant disk activity... Bonk Fedora 14 07-06-2004 03:42 PM
database and locate mikeshn Linux - General 1 01-19-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration