Info |
---|
This article helps debug long-running Windows agents. |
...
Open PowerShell and run the agent locally to make sure how long it took
Code Block language bash theme RDark Measure-Command { C:\ProgramData\checkmk\agent\bin\cmk-agent-ctl.exe -vv dump > agent_output.txt } > agent_output_time.txt
Go through the check_mk.log* files and use the following grep commands:
Tip title Disclaimer For easier troubleshooting, I moved the files to a Linux server.
This command will give you a list of all the sections and how long each of them took. We'll also sort by the section name.Code Block theme RDark grep -roP "Section '\w+' took \[\d+\]" |sort -t '[' -k1,1n |uniq -c
This command will give you a list of all the sections and how long each of them took. We'll also sort by the time to list the long-running ones first.Code Block theme RDark grep -roP "Section '\w+' took \[\d+\]" |sort -t '[' -k2,2n |uniq -c
...