Is there a max length for a command_line ?

Steve Traylen s.traylen at rl.ac.uk
Tue Jul 4 18:21:49 CEST 2006


On Tue, Jun 20, 2006 at 04:05:09PM +0200 or thereabouts, nagios at sisyphus.ch wrote:
> On Tue, Jun 20, 2006 at 01:26:06PM +0100, Steve Traylen wrote:
> [...]
> > I don't see how it can be this, currently the command looks to be being truncated at
> > a very bizare 342 characters long.
> 
> in include/objects.h:
> #define MAX_PLUGINOUTPUT_LENGTH                 332     /* max. length of plugin output */
> 

Returning to this now after a while, the maximum length a command can be.

We are running Dag's build of nagios-2.4-1.el4.rf.

this has 

#define MAX_XODTEMPLATE_INPUT_BUFFER    65535

and

#define MAX_COMMAND_BUFFER  8192

after adding a micky mouse check_command equivalent to a check_cluster2

command_line /root/test-length.sh --host -l "Batch Cluster" \
  -w $ARG1$ -c $ARG2$ -d $HOSTSTATEID:node001$,$HOSTSTATEID:node002$,... \
      ... ,$HOSTSTATEID:node0998,$HOSTSTATEID:node0999$

where test-length.sh just contains

#!/bin/sh

echo "Testing Outout"
echo $@ > /tmp/output.txt

we end up with a /tmp/output.txt of 

--host -l Batch Cluster -w 1 -c 2 -d 0,0,...,0,1,0,$

which has a charecter length of 739. If we add on the '/root/test-length.sh '
then we get a total length of 760.


So it is still unclear what limit it is that we are coming up against and
so which one should be increased.

 Steve



  





> -- 
> 
> 
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-- 
Steve Traylen
s.traylen at rl.ac.uk
http://www.gridpp.ac.uk/

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list