Hi all,

I was having a go at getting a degree symbol into Ganglia output (for when I'm 
measured temperatures).  Whilst doing this, I noticed that gmetad seems to be 
corrupting its units string under certain circumstances.

To demo this out, I'm using gmetric:
        gmetric -n temperature -v 26 -t float -u "$(echo -e '\xb0'C)"

gmond has no problem with this.  The XML dump from gmond looks fine:

[EMAIL PROTECTED]:~$ telnet localhost 8659|grep \"temperature\"
Connection closed by foreign host.
<METRIC NAME="temperature" VAL="26" TYPE="float" UNITS="°C" TN="81652" 
TMAX="60" DMAX="0" SLOPE="both" SOURCE="gmetric" DESC="temperature - no 
description available"/>

When I query gmetric for its XML dump (xml_port is 8660) I get the following 
(the extra character (Â) is ASCII 0xc2):

[EMAIL PROTECTED]:~$ telnet localhost 8660|grep \"temperature\"
Connection closed by foreign host.
<METRIC NAME="temperature" VAL="26" TYPE="float" UNITS="°C" TN="81978" 
TMAX="60" DMAX="0" SLOPE="both" SOURCE="gmetric"/>

When I telnet to the gmetad's interactive_port I get the same result.

The extra character is also present in the host_gmetrics.php page:

                User Defined Metrics (gmetrics)
TN              TMAX    DMAX    NAME            VALUE
81563   60      0               temperature     26 °C


When I look at RRDtool-generated graph, the corruption is worse!  The units 
now have "Ã<box>Â" before the deg. C (<box> is the box symbol, usually 
meaning "don't have that character").

I can start to track down where this corruption is happening, but I wanted to 
first ask if I'm doing something wrong (or plain silly) here?

Cheers,

Paul.

Attachment: pgpxXyJLOl9Vh.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to