Hi all,

Here we use a tool which reports some extra statistics through gmetric (job information). I have always assumed the following for the maximum of a gmetric message, which I found in the ChangeLog:

2002-08-30 22:17  sacerdoti

       * lib/ganglia.h (1.2): Maximum multicast message length is 1500
       bytes, the size of an ethernet frame.

2002-08-23 22:37  sacerdoti

       * gmetric/: cmdline.c (1.3), cmdline.h (1.3), gmetric.c (1.7): Now
       you can send gmetrics with up to 1400 characters in the value
       field.

However, that does not seem correct, a gmetric's value can't be 1400 characters. I have a gmetric here with total string size (including the XML tags and stuff) of 1030 characters, which gets wrapped:

>>> bla_str
'<METRIC NAME="TOGA-JOB-6718" VAL="name=ADDA_bs queue=q_parallel owner=myurkin requested_time=13:00:00 ppn=2 status=R start_timestamp=1141299521 report ed=1141307950 poll_interval=10 domain=irc.sara.nl nodes=gb-r28n16;gb-r28n16;gb-r28n15;gb-r28n15;gb-r28n14;gb-r28n14;gb-r28n13;gb-r28n13;gb-r28n12;gb-r28n12 ;gb-r28n11;gb-r28n11;gb-r28n10;gb-r28n10;gb-r28n9;gb-r28n9;gb-r28n8;gb-r28n8;gb-r28n7;gb-r28n7;gb-r28n6;gb-r28n6;gb-r28n5;gb-r28n5;gb-r28n4;gb-r28n4;gb-r28 n3;gb-r28n3;gb-r28n2;gb-r28n2;gb-r28n1;gb-r28n1;gb-r27n20;gb-r27n20;gb-r27n19;gb-r27n19;gb-r27n18;gb-r27n18;gb-r27n17;gb-r27n17;gb-r27n16;gb-r27n16;gb-r27n15;gb-r27n15;gb-r27n14;gb-r27n14;gb-r27n13;gb-r27n13;gb-r27n12;gb-r27n12;gb-r27n11;gb-r27n11;gb-r27n10;gb-r27n10;gb-r27n9;gb-r27n9;gb-r27n8;gb-r27n8;gb-r27 n7;gb-r27n7;gb-r27n6;gb-r27n6;gb-r27n5;gb-r27n5;gb-r27n4;gb-r27n4;gb-r27n3;gb-r27n3;gb-r27n2;gb-r27n2;gb-r27n1;gb-r27n1;gb-r26n20;gb-r26n20;gb-r26n19;gb-r2 6n19;gb-r26n18;gb-r26n18;gb-r26n17;gb-r26n17;gb-r26n16;gb-r26n16;gb-r26n15;gb-r26n15;gb-r26n14;gb-\n'
>>> len( bla_str )
1030
>>>

So I was checking from my tool for a length of 1400 characters, but I actually should be checking for a value length of around 900 characters I think. I probably shouldn't have assumed a old ChangeLog entry from 2002 was still accurate and it probably changed when APR was introduced (you know what they say about assumptions ;)), but I'd still like to know nevertheless.

So now is my question, what is the real maximum length for a gmetric (value)?

And perhaps we should incorporate better length/error checking in gmetric, because this wrapped/broken gmetric from above breaks my entire XML stream for the cluster:

Mar 2 16:45:17 ganglia /usr/sbin/gmetad[29108]: Process XML (LISA Cluster): XML_ParseBuffer() error at line 15191: unclosed token

If I have the time I will try to write a patch myself, but it seems buried deep down in the code somewhere and someone else might be able to spot/fix it faster than me.

Kind regards,
- Ramon.

--
ing. R. Bastiaans            HPC - Systems Programmer

SARA - Computing and Networking Services
Kruislaan 415                PO Box 194613
1098 SJ Amsterdam            1090 GP Amsterdam
Tel. +31 (0) 20 592 3000     Fax. +31 (0) 20 668 3167
---
There are really only three types of people:

 Those who make things happen, those who watch things happen
 and those who say, "What happened?"


Reply via email to