Solved

rpm problem?

Posted on 2003-11-06
10
1,045 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 20

Expert Comment

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

-- Glenn
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 2

Expert Comment

by:sam_sunder
Comment Utility
hi stanley,

Can you please try removing rpm package and reinstalling it.

regards,

sam
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
I assume my "recipe" helped.

-- Glenn
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I agree.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now