Code:
#!/usr/bin/perl
print “Enter the letter of the magnitude of data you need to backup (T(era),G(ig),M(eg),K(ilo)).\n”;
chomp($mag1 =
print “Enter the amount of the data you need to backup (1-999).\n”;
chomp($dataamt =
print “Enter the tape device that will be used to backup the data.\n”;
chomp($tape =
if ($mag1 eq “G”) {
$dataamt *= 1000000000;
}
if ($mag1 eq “T”) {
$dataamt *= 1000000000000;
}
if ($mag1 eq “M”) {
$dataamt *= 1000000;
}
if ($tape eq “lto2″) {
$tapespeedmax = 40000000;
$tapespeedavg = 25000000;
$media = 250000000000
}
if ($tape eq “lto1″) {
$tapespeedmax = 20000000;
$tapespeedavg = 10000000;
$media = 125000000000
}
if ($tape eq “lto3″) {
$tapespeedmax = 80000000;
$tapespeedavg = 65000000;
$media = 500000000000
}
$var2 = 40000000; #enter the speed the data will be backed up, in bytes.
$total = $dataamt / $tapespeedmax / 60 / 60;
$totlavg = $dataamt / $tapespeedavg / 60 / 60;
$medianeed = $dataamt / $media;
print “The hours needed to write $dataamt$mag1 is $total\n”;
print “The hours needed to write $dataamt$mag1 on average is $totlavg\n”;
print “The media needed to backup the total data is $medianeed\n”;
Recent Comments