Re: [Nagios-devel] Double escaping in $ARGx$

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Double escaping in $ARGx$

Post by Guest »


On 11 Aug 2009, at 10:40, Andreas Ericsson wrote:

> I mean that we can get rid of roughly 35-40% of the load from Nagios
> by
> avoiding the extra fork()+execve() the shell causes by simply parsing
> the command ourselves.

I see. perl does something like that. You call system() with a string
(like "/bin/echo here I am") and it works out if there are any shell
meta characters in there. If so, it invokes via the shell, otherwise
it splits it based on spaces and then calls execve().

So the usual definitions of "$USER1$/check_icmp -H hostname" will
speed up, but something like "$USER1$/check_http -H hostname -s
'string'" won't.

We could do something like that as well, though there's potential
breakage with existing configurations.

I've never dug into perl's C code - this would be a handy excuse!

Ton






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked