| 1 | =head1 NAME | ||
| 2 | |||
| 3 | Probe::MachineInfo::Uptime - Host ID | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | blah | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | blah | ||
| 12 | |||
| 13 | =head1 PUBLIC INTERFACE | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | package Probe::MachineInfo::Uptime; | ||
| 18 | |||
| 19 | |||
| 20 | # pragmata | ||
| 21 | use base qw(Probe::MachineInfo::SimpleMetric); | ||
| 22 | use strict; | ||
| 23 | use warnings; | ||
| 24 | |||
| 25 | |||
| 26 | # Standard Perl Library and CPAN modules | ||
| 27 | use English; | ||
| 28 | |||
| 29 | # | ||
| 30 | # CLASS ATTRIBUTES | ||
| 31 | # | ||
| 32 | |||
| 33 | # | ||
| 34 | # CONSTRUCTOR | ||
| 35 | # | ||
| 36 | |||
| 37 | |||
| 38 | =head2 command | ||
| 39 | |||
| 40 | /usr/bin/uptime | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | sub command { | ||
| 45 | my($self) = @_; | ||
| 46 | |||
| 47 | return '/usr/bin/uptime'; | ||
| 48 | |||
| 49 | } | ||
| 50 | |||
| 51 | =head2 regex | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | sub regex { | ||
| 56 | my($self) = @_; | ||
| 57 | return qr/ up \s+ (.*?) , \s+ \d+ \s+ user /x; | ||
| 58 | } | ||
| 59 | |||
| 60 | 1; | ||
| 61 | |||
| 62 | =head1 AUTHOR | ||
| 63 | |||
| 64 | Sagar R. Shah | ||
| 65 | |||
| 66 | =cut |