LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2008, 11:45 PM   #1
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Rep: Reputation: 15
updatedb


should updatedb ever run on its own without the user invoking it? i ask because i just heard my HD working and did top in a terminal, and updatedb was running, and i didnt start it.
 
Old 03-14-2008, 11:48 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have a look in /etc/cron.daily for a script called slocate. If it's there you can run (as root) crontab -l | grep cron.daily to see what time it runs.

You can also use ps or top to see what is running when you notice this.
 
Old 03-14-2008, 11:49 PM   #3
Hendronicus
Member
 
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176

Rep: Reputation: 50
It's run out of /etc/cron.daily and in Slackware it's set to go at 4:30 AM. You can just reset the permissions to 644 on the /etc/cron.daily/slocate file if you don't want it to run. That's what I did; because one night I was working away when my processor spiked to 100% and I couldn't figure out why - It was updatedb.
 
Old 03-15-2008, 12:19 AM   #4
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
thanks guys

it gave me a bit of a start when i ran top and saw updatedb being run! i thought it was hackers lol.

i ran
Code:
crontab -l | grep cron.daily
and it gave me '40 4 * * *' etc etc. i vaguely rememeber cron from the general overview i got when i first started with linux, i havent had an occasion to use cron up to now (at least not to my knowledge).

cheers, im off to get some sleep.

Last edited by jukebox55; 03-15-2008 at 12:21 AM.
 
Old 03-15-2008, 12:25 AM   #5
Hendronicus
Member
 
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176

Rep: Reputation: 50
Same thing here, except I had been getting my Samba server beat on by a bunch of Russian hackers earlier that week and I just about lost it! I couldn't believe they had found a way in. Fortunately, they didn't.

Last edited by Hendronicus; 03-15-2008 at 12:25 AM. Reason: spelling
 
Old 03-15-2008, 02:04 AM   #6
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Quote:
Originally Posted by Hendronicus View Post
It's run out of /etc/cron.daily and in Slackware it's set to go at 4:30 AM. You can just reset the permissions to 644 on the /etc/cron.daily/slocate file if you don't want it to run. That's what I did; because one night I was working away when my processor spiked to 100% and I couldn't figure out why - It was updatedb.
You could always just change the cron job so that updatedb is run with a different nice level.
 
Old 03-15-2008, 02:10 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
On a fresh install, it can take a while for it to run the first time. It is a good idea to just let a freshly installed workstation run at least 24 hours so it finishes indexing the filenames. The same is true for Beagle search.

While we are on the topic of time, if you use beagle search, take a gander at the attributes of searched files & directories:

Code:
getfattr --dump Documents/
# file: Documents
user.Beagle.AttrTime="20080315051430"
user.Beagle.Fingerprint="02 x65U3PZEo0OohQvwE3O9rg"
user.Beagle.MTime="20080315051430"
user.Beagle.Uid="OxEcA7zrNk6HQkKCYen72A"

getfattr --dump Documents/bash.dvi
# file: Documents/bash.dvi
user.Beagle.AttrTime="20080225054443"
user.Beagle.Fingerprint="02 x65U3PZEo0OohQvwE3O9rg"
user.Beagle.MTime="20050319124648"
user.Beagle.Uid="ZjJ+ajcxkE+Fos0rTYHWwg"
 
Old 03-15-2008, 02:20 PM   #8
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by evilDagmar View Post
You could always just change the cron job so that updatedb is run with a different nice level.
This is a good suggestion. I just wanted this to get more notice. man nice for those that don't know what evilDagmar is talking about.
 
Old 03-15-2008, 07:08 PM   #9
Hendronicus
Member
 
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176

Rep: Reputation: 50
I agree, I just didn't think of it at the time.
 
Old 06-29-2008, 09:42 PM   #10
orbit
Member
 
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Rep: Reputation: 30
Hello,

Regarding the cron.daily slocate updatedb hogging the CPU.
I have read the minimal man file and was wondering if the following syntax would be the correct addition to make it run with a very low priority?



/etc/cron.daily/slocate:

Code:
#!/bin/sh
nice --adjustment=-20 /usr/bin/updatedb -c /etc/updatedb.conf

Thanks if someone could confirm this string.

Cheers

Orbit

Last edited by orbit; 06-29-2008 at 09:43 PM.
 
Old 06-30-2008, 12:17 AM   #11
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
It should be the opposite orbit. -20 is very high priority, while 19 is low priority (see `man nice`). The command should be this:
Code:
#!/bin/sh
nice --adjustment=19 /usr/bin/updatedb -c /etc/updatedb.conf
 
Old 06-30-2008, 09:57 PM   #12
orbit
Member
 
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Rep: Reputation: 30
Hi T3slider,

Ok (oops), I'll adjust the string in the other direction.

Thanks very much for getting back to me about this

Cheers

Orbit
 
  


Reply



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
updatedb bong.mau SUSE / openSUSE 5 05-30-2007 06:52 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
updatedb mikedeatworld Linux - Software 21 09-16-2004 10:59 PM
updatedb? nexx_au Fedora 2 04-06-2004 10:17 PM
updatedb pezplaya Fedora 2 01-05-2004 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:35 PM.

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