Incorrect search filter: invalid characters - *.p[ml]
AIX-SysInfo

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

AIX::SysInfo is a Perl module for retrieving information about an AIX pSeries system

You can install it using the usual Perl fashion:

        perl Makefile.PL
        make
        make test
        make install

The documentation is in the module file.  Once you install
the file, you can read it with perldoc.

        perldoc AIX::SysInfo

If you want to read it before you install it, you can use
perldoc directly on the module file.

SysInfo.pm  view on Meta::CPAN


  use AIX::SysInfo;
  my %sysinfo = get_sysinfo;

=head1 DESCRIPTION

You can install it using the usual Perl fashion:

  perl Makefile.PL
  make
  make test
  make install

This module provides a Perl interface for accessing information about a pSeries machine running the AIX operating system.  It makes available a single function, B<get_sysinfo>, which returns a hash containing the following keys:

=over

=item B<hostname>

The value of this key contains the hostname of the system.

SysInfo.pm  view on Meta::CPAN

=item B<total_ram>

The value of this key contains the total amount of RAM in the system, in megabytes.

=item B<total_swap>

The value of this key contains the total amount of swap space in the system, in megabytes.

=item B<aix_version>

The value of this key contains the version of AIX and the latest complete maintenance level on ths system, in the form "VRMF-ML".

=item B<model_type>

The value of this key contains the hardware model as reported by uname -M (9117-570)


=item B<sys_arch>

The value of this key contains information on hrdware architecture. It is taken from uname -M and on most modern systems it is simply IBM

SysInfo.pm  view on Meta::CPAN

Most of the data is obtained by parsing output of these three AIX commands:  B</usr/bin/uname>, B</usr/bin/oslevel>, B</usr/sbin/prtconf>

=head1 VERSION

   1.1.1 (released on Wed Jun 17 15:07:35 CDT 2009)
   1.1   (released on Tue Jun 16 16:39:00 CDT 2009)
   1.0   (released 2000-07-03)

=head1 BUGS

With version 1.1 this module was rewritten from scratch. It has been tested on p570/p595 LPAR hardware and on several older stand-alone servers. This version works slower that version 1.0 because it relies on prtconf command which takes several secon...

=head1 TO-DO

=over 2

=item *  Add an object-oriented interface.

=item *  Add many more functions.

=back

t/get_sysinfo.t  view on Meta::CPAN

#!/usr/bin/perl
# Runs tests to make sure sysinfo hash values are all defined!

use warnings;
use strict;
use Test::More tests => 14; # currently 14 keys are populated
use AIX::SysInfo;

my %hash = get_sysinfo();
my @items = qw/ hostname
		serial_num 
		num_procs
		total_ram 
		total_swap
		aix_version
		model_type



( run in 0.360 second using v1.01-cache-2.11-cpan-87723dcf8b7 )