Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IcingaCheckTask: Add available I/O cpu semaphores as a perfdata #10248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yhabteab
Copy link
Member

Just to for easier debugging purposes.

@yhabteab yhabteab added the enhancement New feature or request label Nov 20, 2024
@yhabteab yhabteab requested a review from julianbrost November 20, 2024 14:05
@cla-bot cla-bot bot added the cla/signed label Nov 20, 2024
@yhabteab yhabteab force-pushed the extend-icinga-check-perfdata branch from 729bafd to a323bb3 Compare November 27, 2024 09:01
Copy link
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Don't we duplicate everything in check_icinga and our CIB, so that it can be queried via API?

@@ -85,6 +85,11 @@ boost::asio::io_context& IoEngine::GetIoContext()
return m_IoContext;
}

int_fast32_t IoEngine::GetCpuSemaphore() const
{
return m_CpuBoundSemaphore;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julianbrost Also, I'm wondering whether we can do this:

Suggested change
return m_CpuBoundSemaphore;
return m_CpuBoundSemaphore.load(std::memory_order_relaxed);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That function isn't used to synchronize access to any other memory, so ordering doesn't matter here (i.e. everything1 would be fine).

Footnotes

  1. Of course except those that result in undefined behavior when used for a load operation, C++ is fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants