~ubuntu-branches/ubuntu/saucy/munin/saucy

« back to all changes in this revision

Viewing changes to plugins/node.d.linux/memory.in

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-06-11 12:54:28 UTC
  • mfrom: (8.1.30 sid)
  • Revision ID: package-import@ubuntu.com-20120611125428-k8z25s77rp755vxe
Tags: 2.0.0-1ubuntu1
* Resync with Debian unstable.
* d/munin-node.upstart,munin.upstart: Add upstart configurations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
=head1 LICENSE
50
50
 
51
 
Unknown license
 
51
GPLv2
52
52
 
53
53
=head1 MAGIC MARKERS
54
54
 
186
186
        print "inact_clean.draw LINE1\n";
187
187
        print "inact_clean.info Memory not currently used.\n";
188
188
    }
189
 
    for my $field qw(apps buffers swap cached free slab swap_cache page_tables vmalloc_used committed mapped active active_anon active_cache inactive inact_dirty inact_laundry inact_clean) {
 
189
    for my $field (qw(apps buffers swap cached free slab swap_cache page_tables vmalloc_used committed mapped active active_anon active_cache inactive inact_dirty inact_laundry inact_clean)) {
190
190
        my ($warning, $critical) = get_thresholds($field);
191
191
        my $total = $mems{MemTotal};
192
192
        $total = $mems{SwapTotal} if($field eq "swap");
227
227
    $mems{'VmallocUsed'} = 0;
228
228
}
229
229
 
 
230
# Having default values for mandatory fields, even when they are not on the system
 
231
$mems{'MemFree'} ||= 0;
 
232
$mems{'Buffers'} ||= 0;
 
233
$mems{'Cached'} ||= 0;
 
234
$mems{'Slab'} ||= 0;
 
235
$mems{'PageTables'} ||= 0;
 
236
$mems{'SwapCached'} ||= 0;
 
237
$mems{'SwapFree'} ||= 0;
 
238
$mems{'SwapTotal'} ||= 0;
 
239
 
230
240
print "apps.value ", $mems{'MemTotal'}
231
241
        -$mems{'MemFree'}
232
242
        -$mems{'Buffers'}