Show
Ignore:
Timestamp:
04/24/10 18:50:32 (5 years ago)
Author:
Jason Dixon <jdixon@omniti.com>
git-committer:
Jason Dixon <jdixon@omniti.com> 1272135032 +0000
git-parent:

[db0d94e2c95fb4b8565a345193809127b3f2f2b0]

git-author:
Jason Dixon <jdixon@omniti.com> 1272135032 +0000
Message:

add support for OpenBSD

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@322 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Core/Iostat.pm

    r6def6ce rf1a3f12  
    9797Number of transport errors. 
    9898 
     99=item kb_xfrd 
     100 
     101Kilobytes transferred. 
     102 
     103=item disk_xfrs 
     104 
     105Disk transfers. 
     106 
     107=item busy_sec 
     108 
     109Seconds spent in disk activity. 
     110 
    99111=back 
    100112 
     
    130142            die "Unable to find disk: $disk\n"; 
    131143        } 
     144    } elsif ($osname eq 'openbsd') { 
     145        my $output = run_command("$iostat_path -D -I $disk"); 
     146        if ($output =~ /\s+$disk\s+\n\s+KB xfr time\s+\n\s+(\d+)\s+(\d+)\s+(\S+).*/) { 
     147            return { 
     148                'kb_xfrd' => [$1, 'i'], 
     149                'disk_xfrs' => [$2, 'i'], 
     150                'busy_sec' => [$3, 'i'] 
     151            }; 
     152        } else { 
     153            die "Unable to find disk: $disk\n"; 
     154        } 
    132155    } else { 
    133156        die "Unsupported platform: $osname\n";