Info |
---|
The article explains how to debug long-running activating changes. |
Status |
---|
colour | Green |
---|
title | LAST TESTED ON CHECKMK 2.2.0P1 |
---|
|
Panel |
---|
borderColor | black |
---|
bgColor | #f8f8f8 |
---|
title | Table of Contents |
---|
|
|
Problem
Activating Changes, specifically, a CMC reload, takes a long time.
Solution
Debug long-running activate changes on a single site
With these commands, you will check the /var/check_mk/web and /local directories.
Code Block |
---|
|
OMD[mysite]:~$ find ~/var/check_mk/web -follow -type f | wc -l
OMD[mysite]:~$find ~/local -follow -type f | wc -l |
Note |
---|
If, for example, ~/var/check_mk/web has five-figure files, this can be problematic. A big ~/local directory could also cause a problem, as Checkmk creates a .tar file every time we activate changes. |
Debug long-running activate changes in a distributed setup
Please run this command on the central and remote sites to see if the local files are the same:
Code Block |
---|
|
OMD[mysite]:~$ find ~/local -follow -type f | wc -l |
It's also helpful to search for ASCII filenames or files containing ASCII characters:
Code Block |
---|
|
OMD[mysite]:~/local$ find . -type f | xargs ls -ltr |grep --color='auto' -P -n "[^\x00-\x7F]"^C
OMD[mysite]:~/local$ find . -type f | grep --color='auto' -P -n "[^\x00-\x7F]" |
Advanced debugging
If the above suggestions do not point you to the solution, you can use the profiling mechanism to profile Activate changes.
Tip |
---|
BTW: Every Checkmk command can be profiled. The whole syntax of the profile command is described here: Checkmk profiling. |
Let's run the following command on the central and remote sites to create a profile file of cmk -O
. cmk -O
is doing a configuration reload, which is part of a typical activation process.
Code Block |
---|
|
OMD[mysite]:~$ cmk -O --profile --debug -vv &>activation_debug.log |
Now three files will be created:
- show_profile.py
- profile.out
- activation_debug.log
If you want to debug the profile files alone, please follow the manual Checkmk profiling otherwise, please open a support case and include these three files.
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | CON |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ( "activate_changes" , "cmc" ) and type = "page" and space = "KB" |
---|
labels | activate_changes cmc |
---|
|