Page 1 of 1

cleaner.php cpu usage

Posted: Wed Mar 17, 2021 3:53 pm
by supportcl
Hi, I was checking the nagios server and found that the cleaner.php process is using a lot of CPU and clearly not progressing.
What could be happening?

This error is repeated in the cleaner.log file

Running callbacks:
----------------------------------
DIR: /usr/local/nagiosxi/nom/checkpoints/nagioscore
NUMFOUND: 10
KEEPING ALL GOOD CHECKPOINTS
DIR: /usr/local/nagiosxi/nom/checkpoints/nagioscore/errors
ls: cannot access '/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors/*.gz': No such file or directory
NUMFOUND: 0
KEEPING ALL ERROR CHECKPOINTS
DIR: /usr/local/nagiosxi/nom/checkpoints/nagiosxi
NUMFOUND: 10
KEEPING ALL SNAPSHOTS
----------------------------------
Running callbacks:
----------------------------------

Re: cleaner.php cpu usage

Posted: Thu Mar 18, 2021 3:39 pm
by ssax
Kind of looks like you have too many running. I would try killing those processes.

Code: Select all

kill -9 PID
Are you seeing any errors in this file?

Code: Select all

/usr/local/nagiosxi/var/cleaner.log
Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

Additionally, please send the output of these commands:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
This next command may fail, that's okay, not all systems run postgresql, send the output anyways:

Code: Select all

echo "SELECT relname as Table, pg_size_pretty(pg_total_relation_size(relid)) As Size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as ExternalSize FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;" | psql nagiosxi nagiosxi