Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

rpm problem?

Posted on 2003-11-06
10
Medium Priority
?
1,093 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 252 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 248 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

719 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