projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zfs_arc plugin: Plug memory leak on Linux.
[collectd.git]
/
contrib
/
migrate-3-4.px
diff --git
a/contrib/migrate-3-4.px
b/contrib/migrate-3-4.px
index
699a471
..
ed19a7b
100755
(executable)
--- a/
contrib/migrate-3-4.px
+++ b/
contrib/migrate-3-4.px
@@
-167,25
+167,26
@@
for (@Files)
my $src_ds = $src_dses->[$i];
$dest->{'type_instance'} = $type_instances->[$i];
$dest_filename = get_filename ($dest);
my $src_ds = $src_dses->[$i];
$dest->{'type_instance'} = $type_instances->[$i];
$dest_filename = get_filename ($dest);
- print "./
extractDS.px -i '$InDir/$orig_filename' -s '$src_ds' -o '$OutDir/$dest_filename' -d '$dst_ds
'\n";
+ print "./
rrd_filter.px -i '$InDir/$orig_filename' -m '${src_ds}:${dst_ds}' -o '$OutDir/$dest_filename
'\n";
}
}
}
}
- elsif (exists ($TypeRename{$orig->{'type'}}))
+ else
+ {
+ print "cp '$InDir/$orig_filename' '$OutDir/$dest_filename'\n";
+ }
+
+ if (exists ($TypeRename{$orig->{'type'}}))
{
my $src_dses = $TypeRename{$orig->{'type'}}->{'from'};
my $dst_dses = $TypeRename{$orig->{'type'}}->{'to'};
{
my $src_dses = $TypeRename{$orig->{'type'}}->{'from'};
my $dst_dses = $TypeRename{$orig->{'type'}}->{'to'};
- my @sed_prog = ();
+ print "rrdtool tune '$OutDir/$dest_filename'";
for (my $i = 0; $i < @$src_dses; $i++)
{
for (my $i = 0; $i < @$src_dses; $i++)
{
- push (@sed_prog, 's/^' . $src_dses->[$i] . '$/' . $dst_dses->[$i] . '/g;');
+ print " --data-source-rename "
+ . $src_dses->[$i] . ':' . $dst_dses->[$i];
}
}
-
- print "rrdtool dump '$InDir/$orig_filename' | sed -e '" . join (' ', @sed_prog) . "' | rrdtool restore - '$OutDir/$dest_filename'\n";
- }
- else
- {
- print "cp '$InDir/$orig_filename' '$OutDir/$dest_filename'\n";
+ print "\n";
}
}
}
}
@@
-362,19
+363,19
@@
sub special_disk
$OutDirs{$dest_directory} = 1;
}
$OutDirs{$dest_directory} = 1;
}
- print "./
extractDS.px -i '$InDir/$orig_filename' -s 'rmerged' -s 'wmerged' -o '$OutDir/$dest_filename' -d 'read' -d 'writ
e'\n";
+ print "./
rrd_filter.px -i '$InDir/$orig_filename' -m 'rmerged:read' -m 'wmerged:write' -o '$OutDir/$dest_filenam
e'\n";
$dest->{'type'} = 'disk_octets';
$dest_filename = get_filename ($dest);
$dest->{'type'} = 'disk_octets';
$dest_filename = get_filename ($dest);
- print "./
extractDS.px -i '$InDir/$orig_filename' -s 'rbytes' -s 'wbytes' -o '$OutDir/$dest_filename' -d 'read' -d 'writ
e'\n";
+ print "./
rrd_filter.px -i '$InDir/$orig_filename' -m 'rbytes:read' -m 'wbytes:write' -o '$OutDir/$dest_filenam
e'\n";
$dest->{'type'} = 'disk_ops';
$dest_filename = get_filename ($dest);
$dest->{'type'} = 'disk_ops';
$dest_filename = get_filename ($dest);
- print "./
extractDS.px -i '$InDir/$orig_filename' -s 'rcount' -s 'wcount' -o '$OutDir/$dest_filename' -d 'read' -d 'writ
e'\n";
+ print "./
rrd_filter.px -i '$InDir/$orig_filename' -m 'rcount:read' -m 'wcount:write' -o '$OutDir/$dest_filenam
e'\n";
$dest->{'type'} = 'disk_time';
$dest_filename = get_filename ($dest);
$dest->{'type'} = 'disk_time';
$dest_filename = get_filename ($dest);
- print "./
extractDS.px -i '$InDir/$orig_filename' -s 'rtime' -s 'wtime' -o '$OutDir/$dest_filename' -d 'read' -d 'writ
e'\n";
+ print "./
rrd_filter.px -i '$InDir/$orig_filename' -m 'rtime:read' -m 'wtime:write' -o '$OutDir/$dest_filenam
e'\n";
}
sub exit_usage
}
sub exit_usage