You are not logged in.

#1 2010-01-16 16:15:00

alexanderQ\
Member
Registered: 2009-10-30
Posts: 11

something about mandb

hey guys, recently i found that at midnight, i mean 12pm, a process of mandb will start to read and write the hard disk. And it will take nearly 3 to 5 minutes. So i am wondering why mandb appears at this time and the function of it. Any answer will be appreciate. Thanks!

Last edited by alexanderQ\ (2010-02-01 06:09:39)

Offline

#2 2010-01-16 16:42:06

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: something about mandb

Most likely a cron process. It is listed under /etc/cron.daily, like

bp:~$ ls -l /etc/cron.daily/
insgesamt 20
-rwxr--r-- 1 root root  51 13. Apr 2009  logrotate
-rwxr--r-- 1 root root 309  2. Sep 20:17 man-db
-rwxr--r-- 1 root root  50 13. Dez 22:54 pkgfile
-rwxr--r-- 1 root root  96  1. Aug 12:23 shadow
-rwxr--r-- 1 root root 654 22. Okt 15:55 updatedb

To know or not to know ...
... the questions remain forever.

Offline

#3 2010-01-16 16:43:05

robrene
Member
Registered: 2009-04-16
Posts: 168

Re: something about mandb

I would too like to know the function of this.


smile neutral sad big_smile yikes wink hmm tongue lol mad roll cool

Offline

#4 2010-01-16 16:45:24

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: something about mandb

Do

man mandb

Offline

#5 2010-01-16 17:09:50

alexanderQ\
Member
Registered: 2009-10-30
Posts: 11

Re: something about mandb

if its function is just about updating the index database of man, is it reasonable to automatically start  everyday and each time for several minutes?

Offline

#6 2010-01-16 17:55:27

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: something about mandb

alexanderQ\ wrote:

if its function is just about updating the index database of man, is it reasonable to automatically start  everyday and each time for several minutes?

Yes it is. It's a cron program, that means that run periodically and automatically. Most of the programs you install have man (manual)  information, the mandb has to find the new install and get the links to their manuals.

Last edited by n0dix (2010-01-16 17:59:14)

Offline

#7 2010-01-17 04:07:55

alexanderQ\
Member
Registered: 2009-10-30
Posts: 11

Re: something about mandb

OK. Thanks for all your help!

Offline

#8 2010-01-30 15:50:58

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: something about mandb

You will only need madb if you use whatis or apropos. If it is running for minutes every day and causing high system load then it is related to this bug.

Offline

#9 2010-02-01 06:09:20

alexanderQ\
Member
Registered: 2009-10-30
Posts: 11

Re: something about mandb

yes, ijanos. I have the exactly same problem as you said, and I looked through that bug report webpage. It seems that  Colin Watson has fixed this bug. But I didn't find his patch. The webaddress he offered can not be opened correctly.. So what the correct output should be, if we run mandb twice?

Here is the output of running mandb on screen :
===================================
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
====================================
can that be considered normal?

Offline

#10 2010-02-01 09:08:05

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: something about mandb

In the closing comment he states there could be broken man pages, which cause mandb to rebuild the whole database everytime. From the mandb debuglog he could tell which package caused the problem.
Honestly, i simply removed the executable flag from /etc/cron.daily/man-db.sh script, since i never use whatis nor apropos.

Offline

#11 2010-02-01 10:29:51

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: something about mandb

alexanderQ\ wrote:

Here is the output of running mandb on screen :
===================================
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
====================================
can that be considered normal?

Usually this reports that the man database is up to date. There should have been messages like "Processing manual pages under <some directory>", however. If in doubt, you can always force mandb to rebuild its database again, using

mandb --create

Anyhow, when there were no or or small changes only to the database, mandb should have run for a few seconds only.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB