Changeset 98538f897ff1162c69c1414eebbf1e82cac93411

Show
Ignore:
Timestamp:
05/07/10 02:33:51 (8 years ago)
Author:
Jason Dixon <jdixon@omniti.com>
git-committer:
Jason Dixon <jdixon@omniti.com> 1273199631 +0000
git-parent:

[91a1631ef115b681a756c9713ee059580d7e2cb5]

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

add mbits conversion on a couple metrics

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

Files:

Legend:

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

    r262d098 r98538f8  
    5252=item drop_pkts 
    5353 
     54=item mbits 
     55 
     56=item drop_mbits 
     57 
    5458=back 
    5559 
     
    7276                $metrics{"${1}_drop_pkts"} = [$4, 'L']; 
    7377                $metrics{"${1}_drop_bytes"} = [$5, 'L']; 
    74             } else { 
    75                 die "No queues found"
     78                $metrics{"${1}_mbits"} = ($3 > 0) ? [($3 * 8 / 1000000), 'n'] : [0, 'n']; 
     79                $metrics{"${1}_drop_mbits"} = ($5 > 0) ? [($5 * 8 / 1000000), 'n'] : [0, 'n']
    7680            } 
    7781        } 
     82        unless (keys %metrics) { 
     83            die "No queues found"; 
     84        } 
     85 
    7886    } else { 
    7987        die "Unknown platform: $osname";