Seite 1 von 1

CPU Usage at 60% +

Verfasst: 12 Nov 2015, 23:18
von syndrose
It started on the 9th, most of the day, and most of the time CPU usage has spiked and stays at 60% for both cores and is being used by opsiconfd. This slows down the system and is noticeable in the user interface. I have Opsi 4.0.6 installed.
All machines are configured to install on shutdown. I have verified that nothing is trying to install on client machines during this time. It should be sitting idle most of the time. Is there any way to find out what it is doing? or trying to do?
I restart the service and it takes about 20 minutes, but the CPU usage jumps right back up.

The only thing out of the ordinary in the opsiconfd.log file is this:

Code: Alles auswählen

[2] [Nov 12 13:49:25] Traceback: (Logger.py|234)
[2] [Nov 12 13:49:25]      line 551 in '_runCallbacks' in file '/usr/lib/python2.7/dist-packages/twisted/internet/defer.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 456 in 'writeResponse' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/http.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 726 in 'beginProducing' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/stream.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 588 in 'registerProducer' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/channel/http.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 543 in 'registerProducer' in file '/usr/lib/python2.7/dist-packages/twisted/protocols/tls.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 772 in 'stopProducing' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/stream.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 593 in 'unregisterProducer' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/channel/http.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 563 in 'unregisterProducer' in file '/usr/lib/python2.7/dist-packages/twisted/protocols/tls.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      ==>>> 'NoneType' object has no attribute '_producer' (Logger.py|235)
[3] [Nov 12 13:49:25] [twisted] Unhandled error in Deferred: (Logger.py|242)
[2] [Nov 12 13:49:25] Traceback: (Logger.py|234)
[2] [Nov 12 13:49:25]      line 551 in '_runCallbacks' in file '/usr/lib/python2.7/dist-packages/twisted/internet/defer.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 492 in '_processingReallyFailed' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/server.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 456 in 'writeResponse' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/http.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 726 in 'beginProducing' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/stream.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      line 581 in 'registerProducer' in file '/usr/lib/python2.7/dist-packages/OPSI/web2/channel/http.py' (Logger.py|234)
[2] [Nov 12 13:49:25]      ==>>> registering producer <OPSI.web2.stream.StreamProducer object at 0x20174d0> before previous one (<OPSI.web2.stream.StreamProducer object at 0x2ca8310>) was unregistered (Logger.py|235)
I don't know if that has anything to do with the problem or not, but the only other thing in the log file is expired and deleted sessions.

Thanks for you help in advance

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 07:55
von wolfbardo
Please have a look or post the info page

Code: Alles auswählen

https://<opsiserver>:4447/info
regards
bardo wolf

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 16:50
von syndrose
Thanks for the reply.
I am not sure what I am looking for.
Here is the graph taken from this morning, showing that the CPU usage isn't related to RPC calls
Bild

I don't know why the CPU usage would start at 7am, no one even enters the building until 7:30, then gets their coffee, then starts up their computers. Also per my original post, I have disable the install on startup, and configured them to install on shutdown, so even when the machines start up in the morning, they won't be trying to install any software.

Then this is the only thing that seems to stick out, this is taken from then RPC Statistics table
Bild

Everything else listed takes less then a second to process.

A little more info, this is a small installation, I have about 10 computers registered to the server, 2 of which are laptops which aren't on very often. Besides the ones that OPSI provides in their repo, I have 5 software packages created and uploaded to the server.

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 18:28
von wolfbardo
Do you use file-backend for inventory / audit

Code: Alles auswählen

/etc/opsi/backendManager/dispatch.conf
(have a look at

http://download.uib.de/opsi_stable/doc/ ... ig-backend

#
# Recommended standard configuration (dhcpd not at the opsi server)
# file as main backend, mysql as hw/sw invent
# and license management backend and opsipxeconfd backend:
)

regards,
Bardo Wolf

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 18:46
von syndrose
I will see if that helps, I changed my dispatch.conf to the following:

Code: Alles auswählen

# Recommended standard configuration of the pre-installed VM file as main backend, mysql as hw/sw invent and license management backend, 
# opsipxeconfd and dhcpd backend:
#        backend_.*         : file, mysql, opsipxeconfd
#        host_.*            : file, opsipxeconfd
#        productOnClient_.* : file, opsipxeconfd
#        configState_.*     : file, opsipxeconfd
#        license.*          : mysql
#        softwareLicense.*  : mysql
#        audit.*            : mysql
#        .*                 : file
Then ran

Code: Alles auswählen

opsi-setup --init-current-config
opsi-setup --set-rights
service opsiconfd restart
service opsipxeconfd restart
I will keep you posted

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 21:55
von SisterOfMercy
syndrose hat geschrieben:I don't know why the CPU usage would start at 7am, no one even enters the building until 7:30, then gets their coffee, then starts up their computers.
This could be a timezone-related thingie, so this might actually be 8 am.

Re: CPU Usage at 60% +

Verfasst: 13 Nov 2015, 22:34
von syndrose
Changing the settings as outlined above seemed to do the trick, haven't had any CPU issues since I made the changes.

Thanks for the quick support.