12.07.2015 Views

PDF (PDF) - SIOS Technology Corp. Documentation

PDF (PDF) - SIOS Technology Corp. Documentation

PDF (PDF) - SIOS Technology Corp. Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

収 集 した 詳 細 変 化 率 データの 解 析}if ($ENV{'OUTPUT_CSV'}) { print STDERR "\n" }return ($max, $maxindex, ($last - $first) * $blksize / ($interval * ($i -1)));}sub totals { # params: stat_hashmy $stat = shift;my @totalvals;foreach (keys %$stat) {next if (!defined($stat{$_}));my @vals = @{$stat{$_}};my $i;foreach (@vals) {$totalvals[$i++] += $_;}}return @totalvals;}# converts to KB, MB, etc. and outputs size in readable formsub HumanSize { # params: bytes/bitsmy $bytes = shift;my @suffixes = ( '', 'K', 'M', 'G', 'T', 'P' );my $i = 0;while ($bytes / 1024.0 >= 1) {$bytes /= 1024.0;$i++;}return sprintf("%.1f %s", $bytes, $suffixes[$i]);}# convert human-readable time interval to number of secondssub TimeHuman { # params: human_timemy $time = shift;my %suffixes = ('s' => 1, 'm' => 60, 'h' => 60 * 60, 'd' => 60 * 60 * 24);$time =~ /^([0-9]*)(.*?)$/;$time = $1;my $suffix = (split //, $2)[0]; # first letter from suffixif (exists $suffixes{$suffix}) {$time *= $suffixes{$suffix};SteelEye Protection Suite for Linux Technical <strong>Documentation</strong>Page 270

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!