wok-6.x diff perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 3879
linux: free initrd cpio data earlier
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 10 23:39:19 2009 +0200 (2009-08-10) |
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 Mon Aug 10 23:39:19 2009 +0200 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";