wok-current annotate perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 3582
perl-rrd-simple: update depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 26 17:57:24 2009 +0200 (2009-06-26) |
parents | 682806abeaec |
children | aa630ee8aa6f |
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@3582 | 8 if (@ARGV != 2) { |
pascal@3577 | 9 print "Usage: $0 rrdfile DSname\n"; |
pascal@3582 | 10 exit; |
pascal@3577 | 11 } |
pascal@3577 | 12 |
pascal@3577 | 13 my $file = $ARGV[0]; |
pascal@3577 | 14 my $dsname = $ARGV[1]; |
pascal@3577 | 15 |
pascal@3577 | 16 my $rrd = RRD::Simple->new(); |
pascal@3577 | 17 |
pascal@3577 | 18 print "Add $dsname into $file..."; |
pascal@3577 | 19 $rrd->add_source($file, 'DS_name' => $dsname); |
pascal@3577 | 20 print " ok.\n"; |