Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bkuebler
Copy link

@bkuebler bkuebler commented Aug 1, 2019

To use check_procs and it's mechanism to check threads on systems instead of processes. With this feature you can use "-n" flag to switch to threads overall instead of processes.

If you would like to use threads (lwp) in ps so calls NLWP (number of light weight processes) as metric now you can use "-m NLWP". For example if you use this you can check if the given process or any of the checked processes are reach the thread threshold defined with -c or -w

@bkuebler bkuebler changed the title Feature lightweight processes (threads) with check_procs check_procs: support of light weight processes (threads) Aug 2, 2019
@bkuebler bkuebler force-pushed the feature_check_procs_lwp branch from fd01163 to 46089d3 Compare October 15, 2020 13:10
@waja waja added this to the 2.4 milestone Dec 15, 2020
@waja waja closed this in dae075e Apr 7, 2021
waja added a commit that referenced this pull request Apr 7, 2021
Using snprintf which honors the buffers size and guarantees null temination. (Closes: #1601)
waja pushed a commit that referenced this pull request Apr 7, 2021
…ination. (Closes: #1601)

As strcpy may overflow the resulting buffer:

flo@p5:~$ /tmp/f/usr/lib/nagios/plugins/check_pgsql -d "$(seq 1 10000)"
*** buffer overflow detected ***: terminated
Aborted

I would propose to change the code rather like this, using snprintf
which honors the buffers size and guarantees null termination.
waja pushed a commit to waja/monitoring-plugins that referenced this pull request Apr 10, 2021
…ination. (Closes: monitoring-plugins#1601)

As strcpy may overflow the resulting buffer:

flo@p5:~$ /tmp/f/usr/lib/nagios/plugins/check_pgsql -d "$(seq 1 10000)"
*** buffer overflow detected ***: terminated
Aborted

I would propose to change the code rather like this, using snprintf
which honors the buffers size and guarantees null termination.
@bkuebler
Copy link
Author

@waja why is it closed? I would like to get any feedback.

@waja
Copy link
Member

waja commented Apr 12, 2021

@bkuebler sorry ... I accidentally closed it by #1663

@waja waja reopened this Apr 12, 2021
@waja waja modified the milestones: 2.4, 2.5 Jul 23, 2024
@bkuebler bkuebler force-pushed the feature_check_procs_lwp branch from 46089d3 to 60d8131 Compare July 23, 2025 10:02
@bkuebler
Copy link
Author

@waja i updated my PR to the current version to resolve all conflicts

@waja
Copy link
Member

waja commented Jul 23, 2025

@bkuebler Thanks for caring about the issue. You might have seen that the CI tests failed. I didn't looked into the PR itself, but if you didn't yet rebase your PR on recent master, I would recommend to do so.
Maybe you can fix the pipelines as well. Maybe you need to also adjust the test suite.

@bkuebler
Copy link
Author

Yes i am working on it and will fix it

@bkuebler bkuebler force-pushed the feature_check_procs_lwp branch from 60d8131 to 07a6e03 Compare July 23, 2025 10:43
@bkuebler bkuebler force-pushed the feature_check_procs_lwp branch from 07a6e03 to 38df3d0 Compare July 23, 2025 10:43
@bkuebler
Copy link
Author

JFTR I try to complete all open issues within the next 3 weeks.

  • Test cases for new features
  • Fixing issue with current tests due to incorrect test file
  • metric bases check currently not working as expected only threads instead of processes switch works properly.

@waja
Copy link
Member

waja commented Jul 28, 2025

JFTR I try to complete all open issues within the next 3 weeks.

Take your time!

@RincewindsHat RincewindsHat modified the milestones: 2.5, 3.1.0 Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants