| 1 | package System::Info::Irix; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use base "System::Info::Base"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | our $VERSION = "0.050"; | |
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | System::Info::Irix - Object for specific Irix info. | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | =head2 $si->prepare_sysinfo | ||
| 17 | |||
| 18 | Use os-specific tools to find out more about the system. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | 0 | ▶ | sub prepare_sysinfo { |
|
Subroutine
prepare_sysinfo: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 23 | 0 | my $self = shift; | |
| 24 | 0 | $self->SUPER::prepare_sysinfo; | |
| 25 | 0 | $self->prepare_os; | |
| 26 | |||
| 27 | 0 | chomp (my ($cpu) = `hinv -t cpu`); | |
| 28 | 0 | $cpu =~ s/^CPU:\s+//; | |
| 29 | |||
| 30 | 0 | chomp (my @processor = `hinv -c processor`); | |
| 31 | 0 | my ($cpu_cnt) = grep m/\d+.+processors?$/i => @processor; | |
| 32 | 0 | my ($cpu_mhz) = $cpu_cnt =~ m/^\d+ (\d+ MHZ) /; | |
| 33 | 0 | my $ncpu = (split " " => $cpu_cnt)[0]; | |
| 34 | 0 | my $type = (split " " => $cpu_cnt)[-2]; | |
| 35 | |||
| 36 | 0 | $self->{__cpu_type} = $type; | |
| 37 | 0 | $self->{__cpu} = $cpu . " ($cpu_mhz)"; | |
| 38 | 0 | $self->{__cpu_count} = $ncpu; | |
| 39 | |||
| 40 | 0 | return $self; | |
| 41 | } # prepare_sysinfo | ||
| 42 | |||
| 43 | =head2 $si->prepare_os | ||
| 44 | |||
| 45 | Use os-specific tools to find out more about the operating system. | ||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | 0 | ▶ | sub prepare_os { |
|
Subroutine
prepare_os: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 50 | 0 | my $self = shift; | |
| 51 | |||
| 52 | 0 | chomp (my $osvers = `uname -R`); | |
| 53 | 0 | my ($osn, $osv) = ($self->_osname, $self->_osvers); | |
| 54 | 0 | $osvers =~ s/^$osv\s+(?=$osv)//; | |
| 55 | 0 | $self->{__os} = "$osn - $osvers"; | |
| 56 | } # prepare_os | ||
| 57 | |||
| 58 | 2 | 1; | |
| 59 | |||
| 60 | __END__ | ||