[rrd-users] Different Order?
Ingrassia, Rickey T
Rickey.T.Ingrassia at bankofamerica.com
Mon Mar 17 06:23:34 MET 2003
Hi everybody,
Quick question. Why does the RRDs perl module return data in different order than that of the rrdtool command. For instance, the two examples below are from the same file, but the order is different. Any way to change the order of the hash returned by RRDs::info to match rrdtool?
rrdtool command:
[rickey at madness ~/rrd]$ rrdtool info nccltb101ocr01-delay.rrd|egrep 'type'|awk {'print $1'}
ds[gaatlb101ocr01].type
ds[txdalb101ocr01].type
ds[azphxbz01ocr01].type
ds[calaxb1b1ocr01].type
ds[casfob1b5ocr01].type
ds[codenb103ocr01].type
ds[mokcmb101ocr01].type
ds[mostlb104ocr01].type
ds[ilchib104ocr01].type
ds[njewrb106ocr01].type
ds[mdbalb104ocr01].type
ds[varchb101ocr01].type
And perl (code first, then output):
#!/usr/bin/perl -w
use RRDs;
$info = RRDs::info("/home/rickey/rrd/nccltb101ocr01-delay.rrd");
for $key (keys %$info) {
if ($key =~ m/type/) {
print "$key\n";
}
}
[rickey at madness ~/Scripts]$ perl rrd_info.pl
ds[calaxb1b1ocr01].type
ds[txdalb101ocr01].type
ds[ilchib104ocr01].type
ds[mdbalb104ocr01].type
ds[codenb103ocr01].type
ds[varchb101ocr01].type
ds[azphxbz01ocr01].type
ds[mostlb104ocr01].type
ds[njewrb106ocr01].type
ds[casfob1b5ocr01].type
ds[gaatlb101ocr01].type
ds[mokcmb101ocr01].type
--rickey
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list