[rrd-users] Re: Simple method to get a list of data sources in a single RRD

rainer at roka.net rainer at roka.net
Tue Feb 8 13:29:23 MET 2000


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 08, 2000 at 11:01:58AM +0100, Alex van den Bogaerdt wrote:
> Bruce Campbell wrote:
> >=20
> > The question is:
> >=20
> > 	Is there a program currently to do a simple 'is this a valid data
> > 	source' or to list the available data sources, in a given rrd
> > 	file?
> >=20
> [...]
> >=20
> > or to simply list the data sources in a given rrd file? (which would be
> > better when I shift to perl - simple string comparison)
>=20
> What about=20
>=20
> 	rrdtool dump some.rrd | awk '/<name>/{print $2}'
>=20
> This should also be possible inside perl.

I think the following will need less cpu cycles:

rrdtool fetch squid1.rrd AVERAGE --start `rrdtool last squid1.rrd` |head -1

Unfortunately there is an error in the output so that the names get prin-
ted without spaces between them.

The same in perl will do pretty well.
Here is an perlscript which will do it.

Ciao
--=20
Rainer Nagel                                    | Rainer.Nagel at topnet.de
topnet EDV und Datenkommunikationsberatung GmbH | Tel.: +49 211 53087 423
Willst=E4tterStr. 13, D-40549 D=FCsseldorf          | Fax.: +49 211 53087 1=
19


-- Attached file removed by Listar and put at URL below --
-- Type: application/x-perl
-- Size: 692 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/rrdfetchnames.pl



-- Binary/unsupported file stripped by Listar --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
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



More information about the rrd-users mailing list