HP-setup (python2) huge CPU load Topic is solved

Need help with your Linux distro? All questions are good - not all answers are -but we try

Moderator: jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

HP-setup (python2) huge CPU load

Postby viking60 » 09 Jun 2012, 15:37

I just realized that one of my boxes has a constantly high CPU load. I checked with inxi like this:

Code: Select all

[viking@viking60-server ~]$ inxi -t c
Processes: CPU - % used - top  5 active
           1: cpu: 60.0% command: hp-setup (started by: python2) pid: 1889

The workaround is simple:

Code: Select all

sudo kill -9 1889

This does not affect printing so all the functionality is there.

But what is the reason for this? :confused Anyone having a high python2 (Htop will show it like python2 load while inxi is more specific) or hp-setup load constantly running?
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: HP-setup (python2) huge CPU load

Postby rolf » 09 Jun 2012, 16:54

Code: Select all

# urpmf hp-setup
hplip:/usr/bin/hp-setup

# urpmq -i hplip
Name        : hplip
Version     : 3.11.5
Release     : 2
Group       : System/Printing
Size        : 9860054                      Architecture: x86_64
Source RPM  : hplip-3.11.5-2.src.rpm
URL         : http://hplip.sourceforge.net/
Summary     : HP printer/all-in-one driver infrastructure
Description :
This is the HP driver package to supply Linux support for most
Hewlett-Packard DeskJet, LaserJet, PSC, OfficeJet, and PhotoSmart
printers and all-in-one peripherals (also known as Multi-Function
Peripherals or MFPs), which can print, scan, copy, fax, and/or access
flash memory cards.

It is work in progress, but printing, scanning, memory card access,
ink/toner/battery/consumable level checking, and inkjet printer
maintenance are supported on most models, when either connected to the
USB or LAN (built-in interfaces or selected HP JetDirect models) on a
Linux workstation with CUPS printing system.

For status and consumable checking and also for inkjet maintenance
there is the graphical tool "hp-toolbox" available (Menu:
"System"/"Monitoring"/"HP Printer Toolbox").

# urpmq -l hplip
/etc/cups/pstotiff.convs
/etc/dbus-1/system.d/com.hp.hplip.conf
/etc/hp
/etc/hp/hplip.conf
[..]


Do you have a Hewlett-Packard printer involved with this machine? I don't and I don't have hplip installed, so I have to use the urpm query commands to find out what files it contains, can't see inside of /etc/hp/hplip.conf. I'm not sure you need this software, even with an HP printer but, if you do, maybe there is some switch inside /etc/hp/hplip.conf

It looks like "setup" is hung up. Maybe call it with a -h or --help switch (after killing any running instance), to see if there's a clue how to configure it. I don't see a man page.

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: HP-setup (python2) huge CPU load  Topic is solved

Postby viking60 » 09 Jun 2012, 16:59

Thanks. This is a box with a HP-photosmart printer which is used as a network printer. It all works fine with cups. But a recent update lead to this strange result.
Looking at /etc/hp/hplip.conf now.....
And found a suspect right away - you are the Guru! Under dirs there is a path
run=/var/run
Now in arch they just did what most distros will do later (I think), and changed the path to /run leaving a symlink in /var/run this might be hard to digest so I will now change it to:
run=/run
in /etc/hp/hplip.conf
......
Tamtada dam Ramda dada dam.......

That was it! :B
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby dedanna1029 » 09 Jun 2012, 20:25

I'd call that a reportable bug if they have the symlinks wrong. Correct me if I'm wrong, but that should be fixed for others.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby viking60 » 09 Jun 2012, 20:44

I don't think the symlinks are wrong. OTOH the conf setting should have worked with the symlink in place. I'll check it out...
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby dedanna1029 » 09 Jun 2012, 20:47

You had to change it, no?
viking60 wrote:so I will now change it to:
run=/run
in /etc/hp/hplip.conf

You also have a cause and effect here. Originally, before changing it, you were getting high CPU.

That spells bug to me.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby viking60 » 09 Jun 2012, 22:18

Yes but I am unsure if it was a one time effect of the update that created the symlink and deleted /var/run while hp-lip was running!
That is the likely scenario when I think about it.
HP-lip could not be expected to switch while it was running.
I had to do this rather brutal thing:

Code: Select all

pacman -Syu --ignore filesystem && rm -rf /var/run /var/lock && \
    pacman -S filesystem


So it is mea culpa that I did not stop all the running jobs first.
In any case a reboot would have fixed it, because by then the symlink would have taken care of it :-D Making my cry for help completely unnecessary - (but I did not know that at the time)

Rolfs help contributed to confuse me on yet a higher level though. Because I understand why now.
But a simple Windows behavior (reboot without even discovering the problem) would have taken care of it. So if I had paid less attention I would not even have discovered that this was a problem :-D
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby dedanna1029 » 09 Jun 2012, 22:32

Question, should you have had to reboot in the first place, or ?
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: HP-setup (python2) huge CPU load [SOLVED]

Postby viking60 » 09 Jun 2012, 22:44

No I should have stopped all background tasks!
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Help”