You are not logged in.

#1 2012-09-03 22:20:37

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

modprobed.db issues

I have this modprobed.db gathering all the info of ever-used modules, except it doesn't.

The problem is, that although it does seem to retain the loaded module information for some time, if I leave it be and check it after few weeks, the modules that were used some are no longer listed. I thought this was supposed to only add new positions to the module list as the laptop is being used and not detract, regardless of how long ago given module was used.

Offline

#2 2012-09-03 22:35:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: modprobed.db issues

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-09-15 20:56:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

I didn't see this post originally.  What is your root user's crontab?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2012-09-15 21:05:55

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

# SYSTEM DAILY/WEEKLY/... FOLDERS
@hourly         ID=sys-hourly   /usr/sbin/run-cron /etc/cron.hourly
@daily          ID=sys-daily    /usr/sbin/run-cron /etc/cron.daily
@weekly         ID=sys-weekly   /usr/sbin/run-cron /etc/cron.weekly
@monthly        ID=sys-monthly  /usr/sbin/run-cron /etc/cron.monthly

*/5 * * * *   /usr/bin/modprobed_db store &> /dev/null
55 * * * * sh /home/juha/.scripts/empty_vartmp.bash

Offline

#5 2012-09-15 21:59:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

That looks right.  What is the output if you execute that with the redirect to null?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2012-09-15 22:15:01

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

No output.

But the problem is it does work and lists all the loaded modules. However, the modules that were not loaded for a week, or three - they disappear from the db fike, even though they were there before.

Offline

#7 2012-09-15 22:20:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

Lockheed wrote:

No output.

That's not right; it should return usage info:

$ modprobed_db 
Usage: /usr/bin/modprobed_db {list|recall|store}
See manpage for additional details

And, on my system at least:

$ modprobed_db store
The db currently contains this many records: 204
Lockheed wrote:

But the problem is it does work and lists all the loaded modules. However, the modules that were not loaded for a week, or three - they disappear from the db fike, even though they were there before.

So it sounds like the db file is getting overwritten??

Please post the output of the following which you do NOT need to run as the root user:

pacman -Q modprobed_db
. /etc/modprobed_db.conf && ls -l "$dbpath"/modprobed*

Last edited by graysky (2012-09-15 22:21:48)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2012-09-15 22:23:44

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

Well, if I execute those commands, I get the same outputs as you. I was talking about the crontab line.

$ pacman -Q modprobed_db
modprobed_db 2.0-2

$ ls -l "$dbpath"/modprobed*
-rw-r--r-- 1 root root 888 Sep 16 00:22 /var/log/modprobed.db
-rw-r--r-- 1 root root 888 Sep 16 00:22 /var/log/modprobed.long

Offline

#9 2012-09-15 22:39:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

Lockheed wrote:

Well, if I execute those commands, I get the same outputs as you. I was talking about the crontab line.

OK.. try them now as your root user (or via a sudo prefix):

# modprobed_db store

Or

$ sudo modprobed_db store

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2012-09-15 22:40:31

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

The db currently contains this many records: 108
New modules detected.  Updating db...
The db now contains this many records: 108

Offline

#11 2012-09-15 23:04:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

@Lockheed - That looks normal.  I do not understand what is deleting your log files.  From what you've posted, both you and your root user can call the script... I wonder if your logrotate is moving it?
Try this:

# find /var/log -name "modprobed.db"

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2012-09-16 08:33:53

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

/var/log/modprobed.db

Offline

#13 2012-09-16 10:08:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

There is no native function within modprobed_db that would do this, so there must be something external on your system responsible.  Do you run anything that would sweep /var/log like bleachbit perhaps?  Please manually move the two db files form /var/log to an alternative location.  In your case, root owns them so let's try /root to see if they are safe there.

# mv /var/log/modprobed.* /root

Now edit /etc/modprobed_db.conf changing the 'dbpath' variable as well:

dbpath="/root"

If it they get deleted from /root and you or another user on your system did not do it, you have been hacked smile

Last edited by graysky (2012-09-16 10:15:36)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2012-10-04 16:44:56

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

Ok, I did as you said and here's what's happening:

1. None is hacking me
2. I am the only user of the system
3. the module names still disappear from /root

Offline

#15 2012-10-04 18:55:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

@Lockheed - I am out of ideas as to what would be clearing your entries.  There is nothing in the script itself to overwrite the db files.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2012-10-04 23:26:27

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

But they have to be overwritten to add new entries, no? So in the process it must sometimes just overwrite the file with currently running list, instead of appending it.

Offline

#17 2012-10-05 01:11:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

Try version 2.10 and let me know.  Only thing I can think of is that the /tmp/.tempfiles are getting deleted half way through somehow.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#18 2012-10-05 08:18:12

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

I think my tmp is deleted upon reboot. Could this happen if the module list update process is interrupted by a reboot?

Offline

#19 2012-10-05 08:59:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

All of our  /tmp dirs are deleted on reboot.  This is by design.  The process that modprobed_db uses to compare a sorted list of the db + what is memory to what is in memory should only take nano seconds even on older hardware.  Did version 2.10 solve the problem for you?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#20 2012-10-05 09:11:52

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: modprobed.db issues

I have no idea. It can take few weeks to find out.

Offline

#21 2012-10-05 09:42:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: modprobed.db issues

Please update this thread in a month or so, good or bad.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB