our %TypeTranslate =
(
cpu => sub { $_ = shift; $_->{'plugin_instance'} = $_->{'type_instance'}; $_->{'type_instance'} = undef; $_; },
+ hddtemp => sub { $_ = shift; $_->{'plugin'} = 'hddtemp'; $_->{'type'} = 'temperature'; $_->{'type_instance'} = _special_disk_instance ($_->{'type_instance'}); $_; },
if_errors => sub { $_ = shift; $_->{'type_instance'} = $_->{'plugin_instance'}; $_->{'plugin_instance'} = undef; $_; },
if_packets => sub { $_ = shift; $_->{'type_instance'} = $_->{'plugin_instance'}; $_->{'plugin_instance'} = undef; $_; },
nfs2_procedures => sub { $_ = shift; @$_{qw(plugin plugin_instance type type_instance)} = ('nfs', 'v2' . $_->{'type_instance'}, 'nfs_procedure', undef); $_; },
GetOptions ("indir|i=s" => \$InDir,
"outdir|o=s" => \$OutDir,
- "hostname=s" => \$Hostname) or exit (1);
+ "hostname=s" => \$Hostname) or exit_usage ();
die "No such directory: $InDir" if (!-d $InDir);
$dest_filename = get_filename ($dest);
print "./extractDS.px -i '$InDir/$orig_filename' -s 'rtime' -s 'wtime' -o '$OutDir/$dest_filename' -d 'read' -d 'write'\n";
}
+
+sub exit_usage
+{
+ print <<EOF;
+Usage: $0 [-i indir] [-o outdir] [--hostname myhostname]
+EOF
+ exit (1);
+}