Show
Ignore:
Timestamp:
11/28/07 22:56:15 (10 years ago)
Author:
Keri Johnson <keri@omniti.com>
git-committer:
Keri Johnson <keri@omniti.com> 1196290575 +0000
git-parent:

[f57f044b8002489d9766fde62d97fbaa77e8650c]

git-author:
Keri Johnson <keri@omniti.com> 1196290575 +0000
Message:

nifty hack for working this on solaris by theo

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Module/INODES.pm

    r4d4beb7 rbf11e9e  
     1keri@ngs-va-01[/opt/resmon/lib/Resmon/Module]$ sudo svcadm refresh resmon 
     2keri@ngs-va-01[/opt/resmon/lib/Resmon/Module]$ more INODES.pm  
    13package Resmon::Module::INODES; 
    24use Resmon::ExtComm qw/cache_command/; 
     
    57@ISA = qw/Resmon::Module/; 
    68 
     9my $dfcmd = ($^O eq 'solaris') ? 'df -Fufs -oi' : 'df -i'; 
     10 
    711sub handler { 
    812  my $arg = shift; 
     
    1014  return $os if $os; 
    1115  my $devorpart = $arg->{'object'}; 
    12   my $output = cache_command("df -i", 30); 
     16  my $output = cache_command($dfcmd, 30); 
    1317  my ($line) = grep(/$devorpart\s*/, split(/\n/, $output)); 
    1418  if($line =~ /(\d+)\s+(\d+)\s+(\d+)\s+(\d+)%/) { 
     
    2226 
    23271; 
     28