wok-6.x annotate perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 3577
Add perl-rrd-simple
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 26 13:37:49 2009 +0200 (2009-06-26) |
parents | |
children | 471df2a3ab20 |
rev | line source |
---|---|
pascal@3577 | 1 #!/usr/bin/perl |
pascal@3577 | 2 |
pascal@3577 | 3 use strict; |
pascal@3577 | 4 use warnings; |
pascal@3577 | 5 |
pascal@3577 | 6 use RRD::Simple(); |
pascal@3577 | 7 |
pascal@3577 | 8 if (@ARGV != 3) { |
pascal@3577 | 9 print "Usage: $0 rrdfile DSname\n"; |
pascal@3577 | 10 } |
pascal@3577 | 11 |
pascal@3577 | 12 my $file = $ARGV[0]; |
pascal@3577 | 13 my $dsname = $ARGV[1]; |
pascal@3577 | 14 |
pascal@3577 | 15 my $rrd = RRD::Simple->new(); |
pascal@3577 | 16 |
pascal@3577 | 17 print "Add $dsname into $file..."; |
pascal@3577 | 18 $rrd->add_source($file, 'DS_name' => $dsname); |
pascal@3577 | 19 print " ok.\n"; |