#!/usr/bin/perl
$CheckNTPath='/usr/lib/nagios/plugins';

$TransitionPagesRepurposed  = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\Memory\\Transition Pages Repurposed/sec"`;
chomp $TransitionPagesRepurposed;
$PageReadSec      = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\Memory\\Page Reads/sec"`;
chomp $PageReadSec;
$PagesSec      = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\Memory\\Pages/Sec"`;
chomp $PagesSec;
$PagesInputSec     = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\Memory\\Pages Input/sec"`;
chomp $PagesInputSec;
$PagesOutputSec         = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\Memory\\Pages Output/sec"`;
chomp $PagesOutputSec;


print "TransitionPagesRepurposed:"        . $TransitionPagesRepurposed .
     " PageReadSec:"        . $PageReadSec .
     " PagesSec:"           . $PagesSec .
     " PagesInputSec:"      . $PagesInputSec .
     " PagesOutputSec:"      . $PagesOutputSec .
     "\n";
