<p>The following is being reported against<br>
monitoring-plugins-v2.1.1-39-g8095, though it applies as well to earlier<br>
releases.</p>
<p>There is a problem with the manner in which check_procs looks for<br>
command-line arguments (the "-a" option):</p>
<pre><code>-a, --argument-array=STRING
Only scan for processes with args that contain STRING.
</code></pre>
<p>The problem is that internally, check_procs depends on some variant of<br>
"ps" to scan for processes. And these days, many operating systems by<br>
default limit the length of the command-line string returned by "ps"<br>
to perhaps 80 characters or so. In the configuration and compilation<br>
of check_procs, an attempt is being made to overcome this limit, via<br>
the configured definition of PS_COMMAND placed into the config.h file<br>
by configure. Here I show the value produced on my Linux machine:</p>
<pre><code>#define PS_COMMAND "/bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'"
</code></pre>
<p>The problem is, a single "w" option only widens the "ps" output a bit,<br>
and not necessarily enough to encompass the target string a user is<br>
looking for with the check_procs -a option. (Processes can have very<br>
long argument lists, and the distinguishing string you need to identify<br>
a particular process of interest might not appear until close to the end.)</p>
<p>The Linux "man ps" output says this about the "w" option:</p>
<pre><code>w Wide output. Use this option twice for unlimited width.
</code></pre>
<p>So my request here is that the derivation of the PS_COMMAND value,<br>
at least on Linux platforms, be modified to use the "axwwo" options<br>
instead of the "axwo" options.</p>
<p>Alas, my configure-fu is quite limited, and my git-fu is nonexistent,<br>
so I can't propose exact code changes.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1328">Reply to this email on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFQl2alX1xAjRdIWWsK6m-8bYWVb81RPks5nz97HgaJpZM4DsyiO.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1328"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>