#!/usr/bin/perl
use warnings;
use strict;
use Linux::Statistics;

my $obj = Linux::Statistics->new( ProcStats => 1 );
sleep(1);
my $stats = $obj->getStats;

print "Total statistics for ProcStats\n";
print "  User      $stats->{ProcStats}->{cpu}->{User}\n";
print "  Nice      $stats->{ProcStats}->{cpu}->{Nice}\n";
print "  System    $stats->{ProcStats}->{cpu}->{System}\n";
print "  Idle      $stats->{ProcStats}->{cpu}->{Idle}\n";
print "  IOWait    $stats->{ProcStats}->{cpu}->{IOWait}\n";
print "  Total     $stats->{ProcStats}->{cpu}->{Total}\n";
print "  New       $stats->{ProcStats}->{cpu}->{New}\n";
