wok-next view perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 12503
Up: xorg-recordproto, xorg-util-macros, xorg-xextproto, xorg-xf86vidmodeproto, xorg-xtrans
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 24 18:48:41 2012 +0200 (2012-04-24) |
parents | 471df2a3ab20 |
children |
line source
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use RRD::Simple();
8 if (@ARGV != 3) {
9 print "Usage: $0 rrdfile DSname DStype \n";
10 print "Example: $0 cpu.rrd nice COUNTER \n";
11 exit;
12 }
14 my $file = $ARGV[0];
15 my $dsname = $ARGV[1];
16 my $dstype = $ARGV[2];
18 my $rrd = RRD::Simple->new();
20 print "Add $dsname:$dstype into $file...";
21 $rrd->add_source($file, $dsname => $dstype);
22 print " ok.\n";