wok-current diff perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 7607

Up: pcre to 8.11.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Dec 11 08:45:59 2010 +0000 (2010-12-11)
parents 471df2a3ab20
children
line diff
     1.1 --- a/perl-rrd-simple/stuff/usr/bin/rrd_addsource	Fri Jun 26 17:57:24 2009 +0200
     1.2 +++ b/perl-rrd-simple/stuff/usr/bin/rrd_addsource	Sat Dec 11 08:45:59 2010 +0000
     1.3 @@ -5,16 +5,18 @@
     1.4  
     1.5  use RRD::Simple();
     1.6  
     1.7 -if (@ARGV != 2) {
     1.8 -   print "Usage: $0 rrdfile DSname\n";
     1.9 +if (@ARGV != 3) {
    1.10 +   print "Usage: $0 rrdfile DSname DStype \n";
    1.11 +   print "Example: $0 cpu.rrd nice COUNTER \n";
    1.12     exit;
    1.13  }
    1.14  
    1.15  my $file = $ARGV[0];
    1.16  my $dsname = $ARGV[1];
    1.17 +my $dstype = $ARGV[2];
    1.18  
    1.19  my $rrd = RRD::Simple->new();
    1.20  
    1.21 -print "Add $dsname into $file...";
    1.22 -$rrd->add_source($file, 'DS_name' => $dsname);
    1.23 +print "Add $dsname:$dstype into $file...";
    1.24 +$rrd->add_source($file, $dsname => $dstype);
    1.25  print " ok.\n";