Solved

rpm problem?

Posted on 2003-11-06
10
1,054 Views
Last Modified: 2013-12-06
hi,

i have a linux server(red hat 9.0), it has many processes as shown below:
What is the problem? how to fix it?

root     25185 25184  0 Nov01 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root     25707 25185  0 Nov01 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root     25708 25185  0 Nov01 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root     25709 25707  0 Nov01 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root     25710 25707  0 Nov01 ?        00:00:00 sort
root       421  1783  0 Nov02 ?        00:00:00 CROND
root       422   421  0 Nov02 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root       777     1  0 Nov02 ?        00:00:11 cupsd
root       967   422  0 Nov02 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root       968   422  0 Nov02 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root       969   967  0 Nov02 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root       970   967  0 Nov02 ?        00:00:00 sort
root      2945  1783  0 Nov03 ?        00:00:00 CROND
root      2950  2945  0 Nov03 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root      3471  2950  0 Nov03 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root      3472  2950  0 Nov03 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root      3473  3471  0 Nov03 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root      3474  3471  0 Nov03 ?        00:00:00 sort
root      5018  1783  0 Nov04 ?        00:00:00 CROND
root      5019  5018  0 Nov04 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root      5533  5019  0 Nov04 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root      5534  5019  0 Nov04 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root      5535  5533  0 Nov04 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root      5536  5533  0 Nov04 ?        00:00:00 sort
root     23564  1783  0 Nov05 ?        00:00:00 CROND
root     23565 23564  0 Nov05 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root     24116 23565  0 Nov05 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root     24117 23565  0 Nov05 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root     24118 24116  0 Nov05 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root     24119 24116  0 Nov05 ?        00:00:00 sort
root     15010  1783  0 04:02 ?        00:00:00 CROND
root     15011 15010  0 04:02 ?        00:00:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root     15699 15011  0 04:02 ?        00:00:00 /bin/sh /etc/cron.daily/rpm
root     15700 15011  0 04:02 ?        00:00:00 awk -v progname=/etc/cron.daily/rpm progname {?????   print progname ":\n"???
root     15701 15699  0 04:02 ?        00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n
root     15702 15699  0 04:02 ?        00:00:00 sort
root     10819  1720  0 18:53 ?        00:00:00 /usr/sbin/sshd
0
Comment
Question by:stanleyhuen
10 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 63 total points
ID: 9694083
The processes you see are the result of the daily job that updates /var/log/rpmpkgs with the current installed package list. My suspicion would be that your rpm database is damaged and the rpm command simply hangs. You can easily check that by executing 'rpm -qa' from a command line.

If the rpm databse isn't completed hosed a possible fix (after killing all of the "awk -v progname=..." processes, or rebooting) would be to run 'rpm --rebuilddb'.
0
 
LVL 20

Assisted Solution

by:Gns
Gns earned 62 total points
ID: 9694386
My experience is that a simple rebuild often doesn't help... In those cases, one might be lucky enough that the /var/lib/rpm/Packages file is intact, because then one can use this slightly more elaborate rebuild scheme:
mv /var/lib/rpm /var/lib/rpm.sav
mkdir /var/lib/rpm
rpm --initdb
cp -f /var/lib/rpm.sav/Packages /var/lib/rpm
rpm --rebuilddb

All done as root.
But do try Jims simple suggestions first.

If the above fails, one might have to use a slightly mor coumbersome semi-manual method, where one builds a rather simple scriptlet around the content of the last /var/log/rpmpkgs, and run a "rpm --justdb --nodeps ...." for all sources of rpms (CDs, up2date repository etc).
But lets hope you don't need that:-).

-- Glenn
0
 

Author Comment

by:stanleyhuen
ID: 9701679
Thanks.

it seems not working for only
rpm --rebuilddb

I will try Glenn's method now, but I found that there are some files in /var/lib/rpm too.
they are not important? only Packages is important?

Thank you.

Stanley
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 20

Expert Comment

by:Gns
ID: 9701719
Yep. Or rather "they are recreateable from Packages, more or less, so don't matter".

-- Glenn
0
 
LVL 2

Expert Comment

by:sam_sunder
ID: 9762028
hi stanley,

Can you please try removing rpm package and reinstalling it.

regards,

sam
0
 
LVL 20

Expert Comment

by:Gns
ID: 10182700
I assume my "recipe" helped.

-- Glenn
0
 
LVL 40

Expert Comment

by:jlevie
ID: 10183778
I agree.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10301762

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between jlevie and Gns
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question