LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 04-16-2008, 07:06 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Rep: Reputation: 30
run "locate" command error


When run the command "locate" , it pop the error below , please advise what is wrong ? thx


#locate file
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such f
ile or directory
warning: You need to run the 'updatedb' command (as root) to create the database
.
Please have a look at /etc/updatedb.conf to enable the daily cron job.
 
Old 04-16-2008, 07:08 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Did you read your post?

run updatedb
 
Old 04-16-2008, 01:27 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,919

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
...previous reply was correct, but also note that many distros 'automagically' run updatedb sometime in the middle of the night. This is helpful if the computer is on in the middle of the night, but yours probably isn't.

Then some, if it misses a few 'middle of the night' updatedb opportunities will run it when you next start up. This makes people think that their computer has suddenly got slow or that they have some malware.
 
Old 04-16-2008, 08:24 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by salasi View Post
...previous reply was correct, but also note that many distros 'automagically' run updatedb sometime in the middle of the night. This is helpful if the computer is on in the middle of the night, but yours probably isn't.

Then some, if it misses a few 'middle of the night' updatedb opportunities will run it when you next start up. This makes people think that their computer has suddenly got slow or that they have some malware.
Only if they use anacron (or similar) instead of cron.



Cheers,
Tink
 
Old 04-24-2008, 05:05 AM   #5
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Original Poster
Rep: Reputation: 30
the replies,

I tried to grep updatedb ( ps -ef |grep updatedb) , there are many updatedb process in my system , all these process seems dead , I also tried to run updatedb , it run over 2 days and still not complete , I tried to remove the db at /var/lib/rpm and run updatedb again , but still not work , can advise what is wrong ? thx
 
Old 04-24-2008, 05:08 AM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
updatedb has nothing to do with rpms, so your attempted fix wouldn't work.

updatedb is typically run periodically, either by cron or some other mechanism.

2 days is wrong. Unfortunately I don't know the cause. Can you try it again and perhaps post what's going on in top?
 
Old 04-25-2008, 04:54 AM   #7
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,919

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
It may be that 'updatedb' doesn't have sufficient permissions to run. You might want to try, as an experiment, killing off all of the 'dead' updatedb processes and then running 'updatedb' manually as root.
 
Old 06-28-2008, 07:15 PM   #8
Gryyphyn
Member
 
Registered: Dec 2006
Location: Ogden, UT (Go OALUG!)
Distribution: OpenSuSE 10.1
Posts: 61

Rep: Reputation: 15
updatedb proc hog

Quote:
Originally Posted by salasi View Post
It may be that 'updatedb' doesn't have sufficient permissions to run. You might want to try, as an experiment, killing off all of the 'dead' updatedb processes and then running 'updatedb' manually as root.
I've been having a similar problem. Start to end, here's what happens:

updatedb runs on boot. It's not supposed to, but it is now. The process starts and doesn't stop (fresh install, previously, as in within the last week, it took only ~:45sec). Process monitor shows fully pegged processor, updatedb as root taking ~5-75% of active processes, top confirms, showing bursts up to 75%. Mem utilization is high, exponetially increasing. No response after ~20min runtime (I just caught on to what's been happening after I let her cool down overnight, thinking it may have been heat crash). Kill updatedb and everything goes frosty. Re-run updatedb as root (sudo) and the issue starts again.

Now, for an explanation, the only thing I can come up with is that it's trying to index active file parts during torrents (downloading ~35GB at the time). Problem with that explanation is I've never experienced the issue before, even running updatedb during heavy downloads (week prior when timed at ~:45sec was while dl'ing ~105GB, 8 torrents, 165 files total).

I'm going to try unmerge-remerge slocate-utils (running sabayon 3.4f) but I gotta say I'm not holding out much hope. So, my question is this: is it possible to change what gets indexed and what doesn't? I've got one drive (that I download torrents to) that I don't need indexed at all and that would eliminate torrents as the cause.

Gryyphyn, out.
 
Old 06-28-2008, 07:24 PM   #9
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You can add something like
Code:
PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/spool/cups /var/spool/squid /var/tmp /storage2"
to /etc/updatedb.conf (I only added the /storage2 part). Thismeans that I don't index all my replicated directories, which made using locate a pain sinceI got 2 of almost everything. Just prune your download directories and re-run.
 
Old 07-03-2008, 02:21 AM   #10
Gryyphyn
Member
 
Registered: Dec 2006
Location: Ogden, UT (Go OALUG!)
Distribution: OpenSuSE 10.1
Posts: 61

Rep: Reputation: 15
Found my problem

Quote:
Originally Posted by billymayday View Post
You can add something like
Code:
PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/spool/cups /var/spool/squid /var/tmp /storage2"
to /etc/updatedb.conf (I only added the /storage2 part). Thismeans that I don't index all my replicated directories, which made using locate a pain sinceI got 2 of almost everything. Just prune your download directories and re-run.
Found my actual problem. Despite having fsck run multiple times over the last week (scheduled checks) and having it throw no errors I've got a junk hdd. That's what my problem was. I thought this seemed a little wierd...

May be worth it for the others to run fsck/diags to see if it's a possible issue. Thanks for all the help everyone. I'll keep tabs on the thread just in case I can offer input.

Gryyphyn, out.
 
  


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
Can't locate object method "splitpath" via package "PACK001" at /usr/lib/perl5/5.8.8/ sajigeorge Linux - Software 1 01-11-2009 07:33 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 08:42 AM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 02:57 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-22-2003 12:47 AM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 10:59 AM


All times are GMT -5. The time now is 09:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration