+sub special_disk
+{
+ my $orig_filename = shift;
+ my $orig = shift;
+ my $dest_filename = shift;
+ my $dest = shift;
+ my $dest_directory;
+
+ $dest->{'type_instance'} = undef;
+ $dest->{'plugin_instance'} = _special_disk_instance ($orig->{'type_instance'});
+ if ($dest->{'plugin_instance'} eq $orig->{'type_instance'})
+ {
+ print qq(echo "You may need to rename these files" >&2\n);
+ }
+
+ $dest->{'type'} = 'disk_merged';
+ $dest_filename = get_filename ($dest);
+
+ $dest_directory = dirname ($dest_filename);
+ if (!exists ($OutDirs{$dest_directory}))
+ {
+ print "[ -d '$OutDir/$dest_directory' ] || mkdir -p '$OutDir/$dest_directory'\n";
+ $OutDirs{$dest_directory} = 1;
+ }
+
+ print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rmerged:read' -m 'wmerged:write' -o '$OutDir/$dest_filename'\n";
+
+ $dest->{'type'} = 'disk_octets';
+ $dest_filename = get_filename ($dest);
+ print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rbytes:read' -m 'wbytes:write' -o '$OutDir/$dest_filename'\n";
+
+ $dest->{'type'} = 'disk_ops';
+ $dest_filename = get_filename ($dest);
+ print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rcount:read' -m 'wcount:write' -o '$OutDir/$dest_filename'\n";
+
+ $dest->{'type'} = 'disk_time';
+ $dest_filename = get_filename ($dest);
+ print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rtime:read' -m 'wtime:write' -o '$OutDir/$dest_filename'\n";
+}
+
+sub exit_usage
+{
+ print <<EOF;
+Usage: $0 [-i indir] [-o outdir] [--hostname myhostname]
+EOF
+ exit (1);