[rrd-users] Re: How to put commas in gprint numbers

Colht, Charles Charles.Colht at acsalaska.com
Mon Dec 5 21:55:42 MET 2005


I figured out a crude method to get thousands seperators in my graph
numbers:

Fetch the last values directly from the rrd
Add the commas
Use COMMENT instead of GPRINT

I came up with this bit of perl:
sub commafy {
    my $text = reverse $_[0];
    $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
    return scalar reverse $text;
}

I wrote this along time ago but couldn't figure out how to make rrd use
it. There is a Number::Format module that is much more flexible but this
gets the job done for me. 

Is there a way to get the values of DEFs and CDEFs without doing an
external fetch or maybe have rrd call my sub within a CDEF?

chuck

-----Original Message-----
From: rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch] On Behalf Of Colht, Charles
Sent: Wednesday, November 16, 2005 4:19 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] How to put commas in gprint numbers

Is it possible to put commas in the GPRINT numbers? 
Chuck Colht



************************************************************************
***********
This transmittal may contain confidential information intended solely
for
the addressee. If you are not the intended recipient, you are hereby
notified that you have received this transmittal in error; any review,
dissemination, distribution or copying of this transmittal is strictly
prohibited. If you have received this communication in error, please
notify
us immediately by reply or by telephone (collect at 907-564-1000) and
ask to
speak with the message sender. In addition, please immediately delete
this
message and all attachments. Thank you. ACS



--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list